Flash AS3, Redirect after movie plays - with php driven querystring

chucho85

New Member
I've got a situation where I have a visitor arriving at a php page with a ID key. They then navigate to page 2 where they key id is carried along in a querystring variable. i.e. http://www.mysite.com?x=abcde12345Page 2 has a flash video on it - that is playing a movie. Once the movie stops playing I want flash to redirect to page 3 - bringing the querystring along with it, as page 3 needs to use the querystring to look up a database value.I used to have this working great in older flash with GetURL - but need it in AS3 now. I've searched for quite awhile on it - and I can see how to redirect with a querystring - but can't see how to redirect with a dynamic querystring - and i'm pretty lost when it comes to flash.Any ideas?Thank you.Update: I'm not sure where I am going wrong here.Here is my HTML code\[code\]<script>document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'); document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"');document.write('WIDTH="550" HEIGHT="400" id="movie" ALIGN="">');document.write(' <PARAM NAME=movie VALUE="http://stackoverflow.com/questions/3722964/Movie-test.swf">');document.write(' <PARAM NAME=FlashVars VALUE="http://stackoverflow.com/questions/3722964/x='+toPage+'">');document.write(' <PARAM NAME=quality VALUE=http://stackoverflow.com/questions/3722964/high>');document.write(' <PARAM NAME=bgcolor VALUE=http://stackoverflow.com/questions/3722964/#FFFFFF>');document.write('<EMBED src="http://stackoverflow.com/questions/3722964/Movie-test.swf"');document.write(' FlashVars="x='+toPage+'"');document.write(' bgcolor=#99CC33 WIDTH=550 HEIGHT=400 ');document.write(' TYPE="application/x-shockwave-flash">');document.write(' </EMBED>');document.write(' </OBJECT>');</script>\[/code\]And my AS3 code\[code\]var params:Object = this.loaderInfo.parameters;var id:String = params.x;//then after the movie completesfunction onComplete(event:Event):void{ var page3URL:String = "page2.php?" + "x=" +id; navigateToURL( new URLRequest( page3URL ) );}\[/code\]The video just loops and replays on itself.What I've got is layer 1 has the movie, up to frame 2993. I created Layer2, and on Layer 2 - frame 2993 I inserted a keyframe - and put the above as3 script.Can you see where I'm going wrong?Thank you.
 
Back
Top