make link on SWF File to another HTML
Solution 1
You can use SWFObject to add a flashvar like this:
<script type="text/javascript">
var flashvars = {};
flashvars.targetURL = "http://www.stackoverflow.com";
var params = {};
var attributes = {};
swfobject.embedSWF("myflashmovie.swf", "myAlternativeContent", "800", "600", "9.0.0", false, flashvars, params, attributes);
</script>
That being said, this is assuming that within your Flash movie, it is coded such that the Flash movie is expecting that flashvar and using that link to the stipulated URL
In AS 2.0 it would be:
getURL(_root.targetURL);
In AS 3.0 it would be:
var flashvars:Object = LoaderInfo(this.root.loaderInfo).parameters;
var linkURL = flashvars['targetURL'];
var link:URLRequest = new URLRequest (linkURL);
navigateToURL(link);
Solution 2
I think I fixed it. Here is what I did:
made a clear png graphic the same size as the area you want your flash video to be in
make a new layer (div tag) over the flash video - you must be in standard view to edit layers - layers are like tables: they hold images,text, etc.(beware: if you are using tables, the div tag will float over the table when you resize your browser)
add the blank png into the new layer
link the blank png using the properties window in dreamweaver!
Within your object tag that holds the flash object add this line of code . This sets the background of your flash movie to transparent and allows the png layer to be placed above it. If you still need your flash movie to have a background, just create a colored box in your flash movie and use it as a background.
Related videos on Youtube
Diego Fosso
Updated on July 05, 2022Comments
-
Diego Fosso almost 2 years
I am having a problem with SWF File. I have a SWF File on my HTML page and i need to link it to another HTML i used but the anchor is not working. Any one can help me. How to link a SWF file. Thanks
-
Trufa almost 13 yearsPlease format your code appropriately, click on the orange question-mark in the question or answer text box for help. Thanks!