PDA

View Full Version : flashlite movie actionscript


taboo
01-29-2006, 03:27 AM
hi, im by all standards not great with flash, but as luck would have it, im stuck having to do a mobile flash game, using flashlite of course.

im trying to add some actionscript into the movie so that this graphic moves constantly. and for that an onClipEvent(enterFrame) is usually used. But in this case flash 8 doesnt accept as this are of flash 5 standards. I've heard of the usage of functions but im not sure how it works, any help? I know what are the codes going into the function, but not how the function itself works from the moment the movie loads.Any help is appreciated , thanks.

sfire2112
01-29-2006, 04:06 PM
Try some of these on the main timeline:

If you want something to act as soon as the movie loads:
//enter your movieclip
movieclip_mc.onEnterFrame = function() {
your actions;
}
or
//select the root time line.
_root.onEnterFrame = function() {
your actions;
}

If you want to call a function, try this.....

function makeItMove() {
_root.onEnterFrame = function() {
your actions;
}
}

// then call it like this... say you put it on a button...

myButton_btn.onRelease = function() {
makeItMove();
}

Don't know if this helps, i'm sure there are plenty of other suggestions out there. I've only been scripting for a few months.


Good Luck.

taboo
01-30-2006, 04:08 AM
thank you very much for your reply fire, i'll try it out, and then get back to you , have a good feeling about it too since i was searching around found some similar codes. Thanks again and have a great day~