Action Script Super Basic

Ok, I am a complete idiot in Action Script for Flash MX

I need some super basic help…like what commands are always needed, for example if any of you know C++ you know that theres always this

void Main()
{
}

thing and other stuff., but what about action script?
I see alot of this Onclipevent.
thing and I don’t even know what it means.

I went to the

“ActionScript Tricks”
(Basic and Advanced ActionScript behaviors presented in a straight-forward manner.)section and I couldn’t make much of it, they jumped right into “drawing dpi”

i kinda of understand that, but what can I do with a square?
not much, guess i need to learn more, but what puzzles me is what is:

_root.createEmptyMovieClip(“holder”,1);

that root thing and stuff??
and…

holder.lineStyle();

holder.moveTo();

holder.lineTo();

what do these “holder.” things stand for?

also what is : “onclip.event”?

do i need these for every single animation i make?:q:

if someone understands my situation i’d appreciate it if you helped me out, thanks…

remember I am a actionscript newbie and know close to nothing about it, cept it can make a lot of cool animations easier and simpler.

i wanna make something like this: go to “www.tas.edu.tw” that my schools website, and theres a flash design by one student, but i duno him, it be a help if you guys taught me how he made that text fall and turn, i am pretty sure he did it with action script.

thanks…:smirk:

onClipEvent() {
<actions here>
}
is used for movieclip instances. Like when you put actions on a movieclip they have to be within an onClipEvent() handler.
onClipEvent(enterFrame)
enterFrame means that the actions that are within that onClipEvent handler are executed every frame. (every frame when the movieclip where the action are put on is on the stage)
load means that the actions are executes once when the movieclip appears on the stage.
these were the main 2 onClipEvent()handlers.

_root. refers to the main timeline.
If you make a movieclip and go inside it (like double click on it) you can’t see the main timeline (_root) but you can see the timeline of the movieclip
If you make a movieclip, give it an instance name “mc” and make an animation inside it and make a stop() action on the first frame and you want it to play when you click a button. Then you make a button, give it actions:

on(press/release) {
_root.mc.play();
}

press/release: press is when the user presses the mousebutton and release is when the user release the mouse button after the press.
_root. -> the main timeline
mc-> the timeline of the movieclip
play() -> the action for it to start playing.

_root.createEmptyMovieClip(holder,1)
holder is just an instance name for the movieclip that you just created you can change it to whatever you want.
BUT then you have to change the other actions too.
like for example you change it to “mymc”
holder.lineStyle();
should be
mymc.lineStyle() then…

createEmptyMovieClip(); is for creating an empty movieclip dynamically.
:slight_smile:

hey thanks…i think i got the idea, wellz i just go experiment with actionscripts, and look through the tutorials on this site…it might help…
thanks again…

Hey , i need some help again, can anyone tell me how this guy did the following animations? he used actionscript…

go to
www.tas.edu.tw
and watch the flash banner about “The Terry Fox Run”
I am wondering, how he made the words comedown like that…yeah

and

go to
http://www.freakyfreaky.net/spirit/
i am wondering how he did the blocks popping up and all, thats actionscript also

so can anyone help me out??

the animations of the text in example 1 are stock in a prg called Flax, and is imported as an swf into Flash into frames, then controlled as Movie Clips with AS (more than likely) .

Rev:elderly:

[EDIT] it could have also been done in Swish, as they both are text animation prg [/EDIT]

well i know you can do it with swish and all, but is there ANY possible way to do it, PURLEY useing flash mx action script?

The first one-
It’s easily done in Swish but in flash it’s some hard tweening…
The second one–
There’s a .fla @ flashkit.com
http://www.flashkit.com/movies/3D/3D_Flyin-Tommaso_-5969/index.php

ok, hmmm, then can you explain how to do the first one with tweening? i know its hard, but i tried, and it doens’t come out right…

and the second one,
at

http://www.flashkit.com/movies/3D/3D_Flyin-Tommaso_-5969/index.php

i looked at the .fla file… did the person use flashmx to make the 3d cube spin? or did he import it from another prog and then add it into the .fla?
i am kinda confused.looks liek he just used motion tweening and some movie clips to do all of it.
the only actionscript i can see, is the “stop” at the very beginning

thanks again