Basics...
øv! troede jeg ku slippe for det scripting...! - må hellere starte... - har fundet noget grundlæggende materiale på nettet, som forklarer det fra bunden...Har prøvet det her - men hvorfor virker det ikke...?
Making a simple counter: Making a counter is very easy, and is good for learning about dynamic text.
How to do it:
Ok, first, make a dynamic text on whatever layer. Go to it's instance name, and call it "counter." Next, create a small block anywhere on the screen. Convert it to a MOVIE CLIP. It must be a movie clip. Now, put this actionscript on the movie clip you just created's main actions:
Code:
onClipEvent(load) {
this._visible=false;
}
onClipEvent(enterFrame) {
_root.counter+=1;
}
That says: On the EnterFrame();, the dynamic text "counter" will be increased by one.
But we are not done yet. On the first frame in which "counter" appears, put this action script in the main movie's actions:
Code:
_root.counter=0;
That simply says that the dynamic text "Counter" is set up to be a number dynamic text. Play your movie. The dynamic text will increase by 1 very rapidly. Ta da.
er der en der lige gider rette fla filen her...?
http://www.1w.dk/counter.fla
