Eloo Home about us
You are now at Eloo.VirtualReality.Flash Tutorials-


How to start this ActionScript Stuff?
-Make It Real!-

Where you write..

Here only has tow possible places for you to write ActionScript. One is on the Frames in Timeline, another is on the Instance.

Write on the Instances

Do it by: Selecte the Instance, and open the ActionScript Panel.
Write it for: There only have tow situations you'll be involved in that either in a MovieClip Instance or in a Button Instance. You write ActionScript to make action happen to these instances. Therefore, it comes to you that you should know what a MovieClip Instance can do and can not do or what a Button Instance can do or can not do.
on MovieClip instance:
onClipEvent(movieEvent)
{
    another codes?.. (statements)
}
This is a mini movie, all the actions you write on this MovieClip will attach to this Clip. You start it by using "onClipEvent()" handler, and we call the its optional events for this handler "movieEvent".

on Button instance:
on(mouseEvent)
{
    another codes?.. (statements)
}
We use "on()" event handler to assign action to Button instance, and we call its optional events for this handler "mouseEvent".

Memo:A movieEvent could be enterFrame, Load, MouseDown,,, etc, you can search for onClipEvent() in the Help Panel. A mouseEvent could be pres, rollOver, release,,, etc, you can also check out more mouseEvent by searching on() in Help Panel.

After you've start the event handler correctly, you can script any codes between {}, to write your statement of event.

Write on the Frames in Timeline

Do it by: Click on the Frame in Timeline, and open the ActionScript Panel.
Write it for:When you write ActionScript on the frame, there has tow situations that you might be on. One is on the frames in stage, or on the frames in an instance. For the Frames in Timeline itself, it doesn't need particular event handler to trigger actions you assign into, on the other hand, since a Movie starts, this Flash Movie application will start execute those codes written on the Frames in Timeline, and Frames by Frames continuously until there has no Frames left in this Flash Movie application.
Event on Frames in Timeline:
object.(eventMethod) = function
{
    another codes?.. (statements)
}
However, if you want to trigger certain actions of certain instance and active it from Frames in Timeline, you'll have to find the correct path to the target instance, then use event method you want. It is like saying if the government wants to hurry you to pay tax, they have to find the correct address of you, afterward could take action, and knock on your door.

Memo:object(in the example script above) is the target instance you want the event applies to. An eventMethod could be onPress, duplicateMovieClip, Load,,,etc.


Until here, this is the last step to the core of ActionScript, in the next section, you'll find out what an ActionScript means to a Flash Movie application.






--Index--
  
Project Log
New tips
(Jan 28th,2004)
Pass value of ASP querystring to FlashMovie rather useing loadVariables method.
Piano Chords Finder
(Oct 4,2004)
After a little tired of making flash for web, started making this music tool to entertain myself hee:)
New Tutorial
(Sep 19,2004)
Glad...Once I had topic about web programming. ActionScript is such a cute thing that gives designers so much imagination to explore.
player 3.0
(Sep 9,2004)
A new design from mp3 streaming player2.0, also add volume control.
Never imagine how you want to be creative.


Virtual Reality .What's new .Delphi .Asp   .Snippets&Resources .My articles
Flash Workshop .My Tutorials .My Tips .Feedback Log
Sound of Music .Latest works .My Compositions .My Performances
Color,Light,Visual What's new .Vector Art .Photo Fusion .My Stock
Physics .My Articles
Extras .Blog .Photo Album .Guestbook

Eloo Fiction Plant
Copyright 2004-2010©izlenim.com All rights reserved. 

- Last Update on: 25 December 2007 18:50:40 / Tuesday -