Hmmm...
I have a flash file that's on an ASP 3.0 page. When the user finishes the interactions on the flash page, I need to post back to the current page and pass a variable so the system goes to the results page.
I'm currently doing this (POSTing the value and then navigating to the page), but it doesn't seem to work consistently. Sometimes it passes the "choice" 1 value, sometimes it doesn't...any ideas??
Is there another way to navigate to a URL and pass a variable without using a GET and putting it in the URL?Code://pageURL is the current page URL and is being correctly set via ExternalInterface function writeScore() { var scriptRequest:URLRequest = new URLRequest(pageURL); var scriptLoader:URLLoader = new URLLoader(); var scriptVars:URLVariables = new URLVariables(); scriptLoader.addEventListener(Event.COMPLETE, handleLoadSuccessful); scriptLoader.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError); scriptVars.choice = 1; scriptRequest.method = URLRequestMethod.POST; scriptRequest.data = scriptVars; scriptLoader.load(scriptRequest); function handleLoadSuccessful($evt:Event):void { trace("Message sent."); var url:String; url = pageURL; var request:URLRequest = new URLRequest(url); try { navigateToURL(request, '_self'); } catch (e:Error) { trace("Error occurred!"); } } function handleLoadError($evt:IOErrorEvent):void { trace("Message failed."); } }
Thanks!




Reply With Quote