Hi John, No in this case no need to pass the Event. Try classifying the SWF file as local-with-networking or trusted.
Check for allowScriptAccess="always" in the containing document. You will not be able to navigate the windows "_self", "_top", or "_parent" if the SWF file is contained by an HTML page that has set the allowScriptAccess to "none", or to "sameDomain" when the domains of the HTML file and the SWF file do not match. Check all of these Cheers Deepanjan Das On Thu, May 27, 2010 at 8:38 PM, John Singleton <[email protected]>wrote: > From: Deepanjan Das <[email protected]> > > > >To: Flash Coders List <[email protected]> > >Cc: [email protected] > >Sent: Thu, May 27, 2010 10:57:38 AM > >Subject: Re: [Flashcoders] Funny, Code Worked Before... > > > >Just a guess as I am not aware of the whole picture: > >try this - > > > > function completePreloader(e:Event) > > > > Well, I tried that, but what argument am I supposed to pass? Again, this > doesn't seem to be on track, because this same code works fine with another > *.as file. All I've done is changed this: > > private function imageLoaded9(event:Event):void > { > imgFlag9 = true; > if (imgFlag1 == true && imgFlag2 == true && imgFlag3 == true && > imgFlag4 == true && imgFlag5 == true && imgFlag6 == true && imgFlag7 == true > && imgFlag8 == true && imgFlag9 == true) > { > completePreloader(); > } > trace('9'); > } > > which is called after each image is loaded (in this case the 9th). When all > the images load, then completePreloader() is called, and it gets called > because the trace in the same prints. But for some reason this: > > navigateToURL(new URLRequest('index.py')); > > never gets called. Why?? > TIA, > John > > > > >as you call this on an event. > > > >Let me know. Also check if your debugger is on. > > > > > >>On Thu, May 27, 2010 at 8:13 PM, John Singleton < > [email protected]> wrote: > > > >>>Hi; > >>>>I have this code: > >> > >>>> function completePreloader() > >>>> { > >>>> navigateToURL(new URLRequest('index.py')); > >>>> trace('yep'); > >>>> } > >> > >>>>that is triggered after all the assets have loaded in the preloader. It > prints the trace. But it doesn't surf to the URL. It just sits there. Also, > when I run the other code that works, which is basically identical, it > prints this error: > >> > >>>>Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found. > >> > >>>>because it can't surf to that relative URL. But my new *.as file > doesn't print that error. Why? > >>>>TIA, > >>>>John > >> > >> > >> > >> > >> > >>>>_______________________________________________ > >>>>Flashcoders mailing list > >>[email protected] > >>>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > >> > > > > > >-- > >Warm Regards > >Deepanjan Das > >M: +91 9836582808 > > > >"Think of the environment before printing this email" > > > > > > > -- Warm Regards Deepanjan Das M: +91 9836582808 "Think of the environment before printing this email" _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

