Moodynet
asked on
Adobe Flash CS4 ActionScript URL relative-path
Im a newbie in Flash authoring tool and need a help in following case:
I have a source Flash .FLA file. This file contains an animated picture or flash. However, when produce this file to .SWF format and put it on a web page, it purpose is that when a mouse hover over it to show some animation. On mouse click, it should instruct browser to load a specific .html file.
I dont know anything about ScriptAction language, but I did text search using Adobe Flash CS4 on that file to find a text of .html and I found the exact script as shown below:
onClipEvent (load) {
this.p = 4;
this.lnk = "Support.html";
}
The above script works only if Support.html file is in root-site folder AND the .html file that contains the .SWF is in root-site folder!
Considering my root site is like www.abc.com and I have a sub-folder called xxx; If I change the word Support.html in above script to /Support.html then insert the .SWF file in any .html file located in the xxx sub-folder of the root-site, then on mouse click browser will try to load the file Support.html from that sub-folder not from root-site. Like this:
http://www.abc.com/xxx//Support.html which is an error due to double //
Where it should be, AFAIK, http://www.abc.com/Support.html
What should I type in the script as a path? I need to know what relative path to type.
Thank you for ant reply &
I have a source Flash .FLA file. This file contains an animated picture or flash. However, when produce this file to .SWF format and put it on a web page, it purpose is that when a mouse hover over it to show some animation. On mouse click, it should instruct browser to load a specific .html file.
I dont know anything about ScriptAction language, but I did text search using Adobe Flash CS4 on that file to find a text of .html and I found the exact script as shown below:
onClipEvent (load) {
this.p = 4;
this.lnk = "Support.html";
}
The above script works only if Support.html file is in root-site folder AND the .html file that contains the .SWF is in root-site folder!
Considering my root site is like www.abc.com and I have a sub-folder called xxx; If I change the word Support.html in above script to /Support.html then insert the .SWF file in any .html file located in the xxx sub-folder of the root-site, then on mouse click browser will try to load the file Support.html from that sub-folder not from root-site. Like this:
http://www.abc.com/xxx//Support.html which is an error due to double //
Where it should be, AFAIK, http://www.abc.com/Support.html
What should I type in the script as a path? I need to know what relative path to type.
Thank you for ant reply &
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Using entire URL means using absolute path and this is not good for a site being moved from domain to another.
To: aneeshchopra
Using ../ means going 1 level up in directory. This is not good when I have several pages distributed in several sub-directories.
I will keep this discussion open to receive more comments. Meanwhile, I'd like to add:
I know in Linux that the tilde mark "~" refer to home directory of a user and in DOS that the slash mark "/" refer to root directory. Using these principles, what is the mark that refer to root-site that Adobe Flash CS4 understand?
I'm using Dreamweaver CS4 to edit .html pages and Adobe Flash CS4 to edit .fla and produce .swf files. So how DW can show broken links contained in .swf file?
Thanks for those commented and any new comments