I’ve been tinkering with flashvars for the past two days, and have finally gotten my simple variable (‘marker’) to pass from the html to the swf. I have one swf that is loaded into each page of my website, but at different frames depending on the page. The value of the variable is simply the frame label I want the swf to go to. here’s my code:
var paramObj:Object=this.loaderInfo.parameters.marker;
var marker=String(paramObj);
var tf:TextField = new TextField();
tf.autoSize = TextFieldAutoSize.LEFT;
tf.border = true;
addChild(tf);
tf.appendText(marker);
if (marker=='null') {
gotoAndPlay ('film_stop')
}
else {
gotoAndPlay (marker)
}
the text field was just a way for me to test that the vars were being passed, which they are. The strange thing now is that the movie won’t go to the proper frames when I test the site from Dreamweaver. The index page works fine - I have the swf starting from the first frame of the movie, but when I try to get to the frames ‘film_stop’ for the films page or ‘collective_stop’ for the collective page - passing those through flashvars - the swf just goes to the first frame in the timeline with a stop() action, which I just find to be weird. As a test, I even wrote " marker=‘film_stop’; gotoAndPlay (marker) " at the end of the code and tested it in Flash - it went to the proper frame, but when I published the same movie and tried testing the site through Dreamweaver, it again went to the first frame with a stop() action. Anyone have any thoughts cause this boggles my mind.
Thanks,
LeJazz