PDA

View Full Version : loading external swf entering frame/without mouse event


littlemoonboot
02-21-2011, 10:54 PM
Hello ladies and gents,

I'm new, I'm mostly an illustrator and my flash skills are much stronger when it comes to layout, animations and visuals than doing scripting.

I'm trying to load an external swf when you enter a specific frame but all the tutorials I've seen mostly involved loading the movie with the onclick event. But I'd like to know how to load a clip when entering a frame rather than being controlled by a button.

I haven't done anything involving scripting in a long time, previously I understood how to do this prior to Actionscript 3 but now....argh.

Is there some information out there on how to do this? If this involves a considerable amount of time, in exchange I'll...dunno... draw you something cool. :D

FEK315
02-22-2011, 01:39 AM
Try:

onEnterFrame = function(){
trace("Do Something");
}

http://www.noobflash.com/actionscript-30-onenterframe/

good luck:)

littlemoonboot
02-22-2011, 11:23 AM
Thanks FEK315!

(Yay Seattle! Grew up in WA state...100 miles east in little Ellensburg.)

Your link has gotten me started on the right track -- for some reason the external swf does load, but acts really screwy with the enter frame event code snippet -- it acts like it's constantly playing. For some reason it doesn't do this with the mouse event.

I did find some code that does load it beautifully at iheartactionscript (I'm not cool enough to post links yet)
but now can't get it to unload and they didn't seem to have a solution posted. I will search the forum and see what others have tried to do...

For the time being I will just use the mouse event because I need to get the thing up and running, there were a few little animations I wanted to add in each section prior to loading the swf but will just skip for now and check back in later, I'm sure I'll have other problems along the way. Back to the forkin' tutorials! :eek:

Thanks again.