Hi, 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
Perhaps you can post a little more info on what you are trying to do. Any actionscript?
I have a Flash Movie on my HTML page. When i click on this movie i want to link this to another HTMl File so onClick it move to my next HTML page same like we make links with . I have tried like this but its not working is there any other way to link a Flash file. Please refer any sample thanks.
Here is a link to a blog post about how to navigate to a url through flash:
I need a example of Java Script i don't want to embed the URL code in my flash file. I am using the SWFOBJECT.js File to embed my Flash movie. So is there any parameter or variable with that i can pass my URL so when i click anywhere on my SWF Object it will take me to that page such as "http://www.index.php".
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);
you can also add javascript command but onclick does not work because it is already preset. by using onmouseover command will do the trick but do you want to do it that way? if so
`<object type="application/x-shockwave-flash" onMouseOver="parent.location='http://www.mysite.com'"> <param name="wmode" value="transparent" /><param name="movie" value="101.swf" /></object>