PDA

View Full Version : javascript in flash HELP!!!


soundgarden
07-23-2003, 05:45 PM
Ok heres the scenario...

I have a main movie (main.swf). In that main movie I have a button which loads a separate movie(gallery.swf) using the loadMovie() script. Ok in the LOADED movie i have a button. I put this javacript code on the buutton to open a page

on(release){
getURL("
spawnWindow ('test.html','','toolbar=no,location=no,status=no, menubar=no,scrollbars=no,resizable=no,width=400,he ight=400');
")
}


NOw here is the important part...
I put the function on the published HTML page of the MAIN movie.
NOw when i test the movie and I click the button i get an error.

My guess is that the javascript code in the loaded movie can't access it's function, which resides in the main published html page. Is there a way I can get around this.

I hope you understood me.

patmanwb
07-23-2003, 05:50 PM
try adding the javascript url syntax to the front of your call:

getUrl("javascript:function()");

soundgarden
07-23-2003, 06:00 PM
Lol, i figured it out right after I posted the thread. Thats exactly waht i did wrong. Thanks anyways.