check swfaddress (using google).
Can you explain what you mean by that? My entire flash site including all the pages is in 1 .swf file. When I browse pages of the site, it only stays at 1 url.
By the way, are flash websites normally all in 1 .swf file?
you'll need to change your setup to use swfaddress. you can use 1 swf file and still use swfaddress to setup deep linking for your website.
here's an example website that consists of 1 swf (and several flvs) that i encoded using swfaddress: www.gdsquared.com
Thanks for the recommendation. I downloaded the SWFAddress file and extracted it but there doesn't seem to be any instructions on how to start using it. I get a bunch of folders, no setup.exe file. How do I even start launching the application?
Kglad, regarding SWFAddress and that nice tutorial video you've mentioned, one of the first steps is to add the .as files (SWFAddress.as and SWFAddressEvent.as) into the Global Actionscript Directory. He didn't explain how he did that in the video. What are the steps to do that? (those files are located in the folder: dist/as/2/com/asual/swfaddress)
He then later mentions that he wants to import those SWFaddress files and types in the code: import com.asual.swfaddress.*;
Is this the same thing as adding those files into the Global Actionscript Directory or is this a step that comes afterwards?
By the way he did not make reference to any other folder except the dist folder where we use those .as files and the swfaddress.js file. Are these the only files we need in that entire package?
you don't need to do both. either add them to the global path (file/publish settings/flash/settings/source path) or import them with the usual import statement like the one you listed.
and yes, there are only two as class files (that you listed). the js file will be added to your html file using something like:
(if swfaddress.js is in a swfaddress subdirectory of the directory that contains your html.)
I added the .as files as you had described. No problem. I also modified the .html file and uploaded the swfaddress.js file. But where would I add the actionscript code? If I’m not mistaken, it’s supposed to be added on the page/frame you want to appear in its own URL, right? In my case, a page is not all contained nicely in a single frame. Each page has 3 columns and each column is represented by a frame in a different symbol (that's how the template came).
For example, in the About Us page, the text for the first column of that page will be located in frame 2 of a symbol called PAGES1. The text for the second column of that page will be located in frame 2 of a symbol called PAGES2. And the text for the third column of that page will be located in frame 2 of a symbol called PAGES3. So these three different symbols combine somehow to form the page. And it’s like that for every page.
So where would I put the SWFAddress script? I actually tried adding it to the text frame of the first column (in the PAGES1 symbol) to see what happens. So this is the script that I added which is how the video has it:
Code from the Video Tutorial
if(e.value != "/")
SWFAddress.setTitle("My Website - " + e.value.substring(1));
But then I get the Compiler Errors:
Compiler Errors The class being compiled, ‘com.asual.swfaddress’, does not match the class that was imported, ‘SWFAddress’. (SWFAddress.as, Line 17)
The class or interface ‘com.asual.swfaddress.SWFAddressEvent’ could not be loaded. (SWFAddress.as Line 125)
The class being compiled, ‘com.asual.swfaddress.SWFAddressEvent’, does not match the class that was imported, ‘SWFAddressEvent’. (SWFAddressEvent.as, Line 11)
The class or interface ‘com.asual.swfaddress.SWFAddress’ could not be loaded. (SWFAddressEvent.as, Line 38)
A type identifier is expected after the ‘:’ //this is referring to the line: function onChange(e:SWFAddressEvent):void (which was typed exactly as from the video in line 5)
So the first question would be, am I adding the script to the right frame? If not, where should I be adding it? If it could be added to this frame, what did I do wrong?
check your swfaddress class file to see if the package matches its location and that matches your import statement.
I typed it exactly as you see above, so I didn't use an Import statement. Instead I did what you recommended: Publish Settings -> Flash -> Settings, browsed to the swfaddress folder and added it. I could try adding the Import statement but if I do, should I move the /com/asual/swfaddress folder structure into the same folder as the rest of my website files?
How about the question about where I should be placing the script in the first place? Do you think it would be ok to place it on the page's first column only? If yes, do you see anything wrong with how I typed it above? Also, does it matter which keyframe I put the script in? I just placed it in the same keyframe as the text (there was no previous actionscript there).
check your swfaddress class file to see if the package matches its location.
and, you'll need to understand swfaddress to use it correctly. but basically, every "state" of your app that you want to deep link should be passed through swfaddress. so, you should instantiate swfaddress at the start of your app. not everything needs to be passed through swfaddress, just all the changes that you want to deep link.