AS3 - how to put links into the app that google can index? - actionscript-3

How should one place links in a Flash app such that google can index them?
If I have a textfield that renders html and the html contains a tag, will google index that? how does google search for links in a flash app, and how does it get the context?

Actually SWFs are indexed. Read this FAQ. They got a special Flash player which is used by robots to index stuff.
But as far as I know google doesn't get indexed much this way because MOST of flash sites are dynamic. You have to have actual strings of text embeded in your SWF to get indexed.
And I don't know if they fixed that or not but if you load XML data into SWF it got indexed separately. Which doesn't make much sense.

As far as I understand it, you should put whatever you want Google to index in your html file as swfs don't get indexed last time I checked.

Related

Adding an in-page search and display within a Mediawiki page

I have been requested to add some functionality to a Mediawiki page. I am learning MW as fast as I can. We have a MW page with a very large wikitable of bibliographic data. The data is also kept in an external Excel file. It has been requested to add an input field and button so that visitors can search that bibliography and redisplay just the rows that contain a match for the search. I've looked at a lot of extensions and have tried to work out how I could patch together this functionality (Maybe External Data and URLGetParameters but how to do the input field?) I've thought about using an Iframe for the whole thing, and simply do it in PHP using the external spreadsheet but then the information in the IFrame is not visible to the MediaWiki search, yes? Perhaps Javascript/JQuery but I haven't worked out how to execute that on a MW page yet. Does anyone know a proven path for doing this type of thing so I can possibly cut out some of the dead ends I am investigating?

Insert external link to swf (using a wysiwyg editor)

I have developed a website for a friend, which has to include some swf files. Those files come from his customers who want to get advertised at his site, and therefore cannot be edited.
The site is made with the use of Joomla 2.5.
My problem is that some of the swf files, do not have the target URL as part of them, and I'm trying to add it using the WYSIWYG editor that Joomla administrator panel provides.
I have tried various things reading different opinions in forums, but nothing works.
And another weird thing, is that when I click one of those, it takes me to a blank page, with the url "http://www.mysite.com/_level0.clickTAG" (where http://www.mysite.com is the name of my friend's site)
Is there a way of inserting a link externally to a swf file, or this is something that cannot be done?
Thank you in advance for your time.
Edit 1:
I have modified my html into
<p><object width="300" height="240" data="images/BANNERS_2014/bannername.swf?clickTAG=http:/www.customersite.com" type="application/x-shockwave-flash"><param name="src" value="images/BANNERS_2014/bannername.swf?clickTAG=http:/www.customersite.gr" /></object></p>
and now then I click on the banner, it takes me to http://www.mysite.com/www.customersite.com
instead of http://www.customersite.com
any ideas?
You need to pass the clickTAG as a parameter when you are embedding your SWF. I would have two fields on Joomla. One for the SWF and one for the destination URL. Then you can compose your embed code combining both. Read the article below and pay close attention to the bottom of the page:
http://www.adobe.com/resources/richmedia/tracking/designers_guide/
You can also have a similar set up as the one I outlined above and overlay a div on top of your SWF with the click event on it and the destination URL. You should have more control that way in the event that the SWFs you are getting are not formatted correctly.

Get only images

Is there any way to get only images (only audio or video) using box-api.
I tried to use search api and If-Match condition but didnt find any way to do this.
Please suggest...
Do your audio/video files have extensions? The Search API should work in this case. You can search for multiple extensions at one time if you put a space between them:
GET /2.0/search?query=jpg%20mp4%20png

live content from html to html

I'm using UIWebView to display data from my organization data (publicize and legal), however, for instance, I would only want to pull specific data from the html file rather than pulling the whole URL. e.g. I want to pull the "News" section of the html and I want the user to only stay in that page, not enabling them to go into other parts of the website (e.g. home page, contact us) and allowing them to view the PDF article on the HTML file.
I've asked around and read up on DOM and screen scraping, but it seem that the data pulled are stored in a database instead.
Is there any way that I can pull just the HTML "News" section with the PDF URL into my customized HTML file and that it will be updated live (maybe every 30second it will refresh and pull information from the website so that the content and list of PDF are up to date)(e.g. added in 3new article into the main website, my customize HTML file will also refresh and pull information from website and update my article list)
If anyone can point to me a specific method that allow HTML to HTML data passing (live), that will be great and I can go do more research on it. Currently very lost and confuse as it is my first time doing this. Any help/feedback will be very much appreciated :)
EDIT: For example, google map or google search. I don't want to use the whole google webpage, just taking the important thing that i want like the search result or map display.
This will involve quite a lot of learning on your part - you'll have to learn HTML / the DOM / JavaScript and iOS/UIWebVIew.
Lets leave the live refresh part for now, I'll post another answer or edit to that later on.
That's not going to easy either (check out my earlier posting today on background execution issues that will affect you, unless the update is only to take place in the foreground
iOS Run Code Once a Day)
You will have to do something like this. And note that I've never tried this, nor seen posting of people who have on here, but in theory it should work, but there will be a lot of learning as I've said, and lots of trial and error. Its a big task when you're not familiar with these things.
1) Download the html page and load it in a UIWebView, but that UIWebView is hidden so the user's can't see it.
2) When the page has loaded its dom will be accessable.
3) You can use Javascript to access the DOM and look for the parts you want.
How you inject and run the Javascript in UIWebView can be answered in a separate question (this answer will get too long if all the exact details are included).
4) Remove the parts of the dom you are not interested in. Or use use events to make only those parts you are interested in appear, jQuery can probably help here.
5) Display the UIWebView
Alternatively the HTML could be saved to a file and string parsing could be used to search for the bits you are looking for and create a new text html file from it. I think this would get very messy, better to take advantage of the fact that UIWebView will parse the HTML page and create the dom for you.

How to embed a PDF file in a web site?

I simply want to embed a PDF file in a web site.
The best solution I've found is Google Docs Viewer (http://docs.google.com/viewer), but it does not work for IE and obviously that is not going to work for me.
Anyone have a clean, easy solution to this?
Update: I should add that one of the benefits of embedding the PDF file the Google viewer way is that as the PDF file I link to gets updated (and it could without notice to me), my site would automatically be holding the same PDF file (provided the full pathname doesn't change, which it does not). For this reason converting the file to an image is not preferred while.
Well since you obviously don't want to force someone to download the bloated insecure pdf plugin, why not let them use the bloated insecure flash player?
http://flexpaper.devaldi.com/
But really it is just a simple as
<iframe src="path/to/pdf" width="500" height="700">
If you do stick with the pdf embedded option, Byron is right although embedded pdf files don't look so great on a webpage. Anyway, be sure to be strict about the coding. Hence:
<iframe src="path/to/pdf" width=500 height = 700>
Should be
<iframe src="path/to/pdf" width="500" height="700">
Small alteration.
Updated answer for HTML5:
<object data="filename.pdf" type="application/pdf">
Your browser does not support pdfs, <a href="filename.pdf">click here to
download the file.</a>
</object>
You can read about it here:
http://www.w3schools.com/tags/tag_object.asp
How long is the pdf file? Can't you convert it to a very long image and display that in a div with a scrollbar?
Probably the best approach is to use the PDF.JS library. It's a pure HTML5/JavaScript renderer for PDF documents without any third-party plugins.
Online demo: http://mozilla.github.com/pdf.js/web/viewer.html
GitHub: https://github.com/mozilla/pdf.js
enter link description here
You can also use Google PDF viewer for this purpose. As far as I know it's not an official Google feature (am I wrong on this?), but it works for me very nicely and smoothly. You need to upload your PDF somewhere before and just use its URL:
<iframe src="http://docs.google.com/gview?url=http://example.com/mypdf.pdf&embedded=true" style="width:718px; height:700px;" frameborder="0"></iframe>
I just ftp mine, I do not use Google or any other s/w
you must have some need other than a PDF file sitting in a directory, what is it?
Also, why would you convert the image (and reduce PDF resolution and clarity) ?
Response to Comments
That is the ugliest thing I have seen since my last trip to Africa. You are not seriously thinking of posting that much information on a single page, are you. No one can read it, and I tried every magnification.
For that amount of info, you need to take an architectural approach.
Put a few controls on the front page, and feed the user a small amount of manageable info, about the area that they chose. Only.
Get the info from the source website/database and feed it into your website/database. Only needs to change when the source data changes. The whole linkage can be automated.
Then you just create nice clean pages, with a reasonable quantity of info, in a readable form, on each page.
This is a 20th Century Timetable. Note, not a 21st century timetable (look at Berlin or München for one of those). You really can't just scan an intense doc and provide it as an embedded PDF.
Note that you do not need the elaborate controls of CityRail. you can have just a few to allow select of the line and timetable.
then produce a page that is a simple form of the CityRail page.
or (the absolute minimum) one fully viewable, full size PDF per web page.
.
Like this simple viewable PDF. That example could be served up in one PDF for page 1 and 4 separate PDF pages for the rest; PDFs already have basic navigation, so I have used that feature and produced one 5-pager instead. Make sure you find and use the blue glass buttons and follow the navigation hints on the left top and bottom of each page.
Second to demonstrating the PDFs and navigation, look at the folder: the files are all PDFs.
Back to the original question. Now you can embed PDFs, but if you do, please do not mess with them. All the controls you have on the linked page are redundant; any browser facilitiates that even now, and will be doing so better in future. Eg. in simple viewable PDF, use your browser controls to increase/decrease magnification, move around the doc, etc.
Let's assume you finish your Google Maps page, that's the first or index page. Draw all the train lines in; when the user clicks on a train line, it takes them to either (a) a clean page produced from your db as per (1) which will look like (2), or (b) a single clean PDF in readable form as per (3). You could do the whole project just by manipulating files in directories.
A lot less work. No Google docs; no intermediate s/w to constrict you or work around. You can forget about IE and its multiple incarnations and strangulations; any other browser and its limitations. Concentrate on the data, and getting it out there in presentable form, not on the pitiful s/w and its fits and starts.
Cheers
From HTML5 :
<embed src="url" type="media-type" height="" width=""/>
For media-type refer, http://www.iana.org/assignments/media-types/media-types.xhtml
Google Docs offers an undocumented feature that lets you embed PDF files and PowerPoint presentations in a web page. The files don't have to be uploaded to Google Docs, but they need to be available online.
Here's the code I used to embed the PDF file:
but you should replace the bold URL with your own address. As I mentioned, the document viewer works for PDF and PPT files.
http://googlesystem.blogspot.com/2009/09/embeddable-google-document-viewer.html