all groups > flash actionscript > january 2005 >
You're in the

flash actionscript

group:

Creating own Events


Creating own Events Smirnoff103
1/3/2005 11:34:47 PM
flash actionscript:
Hi,

Is it possible to create an own event lijk in .NET for exemple ?

You see, i would like to something every time a movieclip is at the end of it.

But unfortunatly i couldn't find anything in the help about this kind of event.

I hope you can help me.

Thanks.
Re: Creating own Events Smirnoff103
1/3/2005 11:45:46 PM
Yes i know, but you see i have this in the last frame:

var iCount:Number = 1;
iCount++;

if (iCount < 10)
{
trace(iCount);
}
else
{
trace("stop");
}

the problem is that i always get a "2" in the trace he doesn't add each time a
"1" cause i redeclare everytime that iCount .

Hope you understand what i just write :p

Thanks
Re: Creating own Events Smirnoff103
1/4/2005 12:19:47 AM
I'm afraid you were right ;)

Re: Creating own Events Jeckyl
1/4/2005 10:37:00 AM
but some script in the last frame of the clip .. easy.
--
All the best,
Jeckyl

Re: Creating own Events Jeckyl
1/4/2005 10:51:42 AM
[quoted text, click to view]

Of course its always going to the 2 .. you set it to one and bump it up each
time. Rather silly.

How about

if (iCount == undefined) {
var iCount:Number = 1;
} else {
iCount++;
}

then it will only get set to 1 the first time (when iCount is undefined),
and then the second time it will be 2, the third 3 etc etc
--
All the best,
Jeckyl

AddThis Social Bookmark Button