PDA

View Full Version : flashvars



thomasoa
August 26th, 2008, 03:31 PM
Hello - i am needing to do flash vars and have used the tutorial with this code

if (movie==1 or movie=="") {
trace("default");
}
if (movie==2) {
getURL("http://www.yahoo.com");
}

what do i need to do to the html to make this work?

thanks
amanda

JonnyR
August 27th, 2008, 03:53 AM
If your flashVar is called "movie" then you may need to reference it directly off of the root timeline, for examples:

In your HTML:


<embed src="myMovie.swf?movie=2" />



In your ActionScript


trace ("flashVar: " + _root["movie"]); // traces 'flashVar: 2'

rosyTown
August 27th, 2008, 03:59 AM
Is it an AS2 or AS3 project?