Tuesday, January 29, 2008

Script Your Life Away.

Flash uses what's called the "actionscript" in conjunction with the graphics/movie clip/buttons in your Library, this is my most favorite part of using flash, if you don't know already, I'm not a programmer, so I've had no previous experience with scripting what so ever, but in creating flash files more and more, I've found it easy to control, once you know how you want your movie/game to react after being published.

Since we're using flash here, and it's geared towards user friendly, it's greatest benefit with learning actionscript, is the "behavior", it opens another window like the "library". In the "behavior", it have tons of pre-built actions, with each sucessful action, you can view the original script in the "actionscript" window, this is exceptionally helpful especially if you were like me with no knowledge of any type of scripting at all.

Once you're played enough with the behavior, you can basically start learning how to actionscript from scratch, there are a few things you have to remember, the main thing is to keep it neat.

Here's a few things to keep in mind
  1. having the script within an object is different then having the script in a frame, usually, most of the scripting is written within the frames, but on occasion, it's easier to leave the script in the object
  2. Understand how each script will be read, different actions will have different ways for flash to read the script, think for a moment, do you need the specific action to happen in a loop or just once or on release of a certain button
    • Scripting in a frame, look up "onEnterFrame" or "onLoad" or "onRelease"
    • Scripting in an object, look up "onClipEvent"
    • Then again, if you only need the script to look once, you can always just script it without having all the handler to begin
Everything takes time to be perfected, and remember there's always someone on the web willing to help you out if you have questions.

No comments: