Skip to main content
Inspiring
June 28, 2006
Question

same movieclip in consecutive frames

  • June 28, 2006
  • 1 reply
  • 164 views
I have an empty movieclip with this code attached to it.

class com.mcTakePicture extends MovieClip{


//*****************************
// public functions
//*****************************
public function mcTakePicture() {
init();
}
//*****************************
// end


//*****************************
// getters and setters
//*****************************
//*****************************
// end


//*****************************
// private functions
//*****************************
private function init():Void {
trace("init");
}
//*****************************
// end

}


The movieclip is placed in the first 3 frames of the timeline. Each in its
own keyframe. Basically when I run it I want it to output 'init' 3 times.
However it only does it once. If I take out the second movieclip it outputs
'init' twice like expected. Shouldn't init be called each time for each
movieclip? It seems that Flash is determining that since they are the same
to only runs once. I don't want to call an onEnterFrame function. Any ideas
on how to get around this. I'm outputting the file as Flash 6.

TIA
Jeff


This topic has been closed for replies.

1 reply

Inspiring
July 2, 2006
I tested this out using Flash 8 publishing as Flash player 6 and AS 2.0.

The empty MovieClip is placed on stage with different instance names and
will generate an init message for each when you test movie.



--
Lon Hosford
www.lonhosford.com
Flash, Actionscript and Flash Media Server examples:
http://flashexamples.hosfordusa.com
May many happy bits flow your way!
"Jeff Schumann" <jschumann@imedstudios.com> wrote in message
news:e7u93p$fjk$1@forums.macromedia.com...
>I have an empty movieclip with this code attached to it.
>
> class com.mcTakePicture extends MovieClip{
>
>
> //*****************************
> // public functions
> //*****************************
> public function mcTakePicture() {
> init();
> }
> //*****************************
> // end
>
>
> //*****************************
> // getters and setters
> //*****************************
> //*****************************
> // end
>
>
> //*****************************
> // private functions
> //*****************************
> private function init():Void {
> trace("init");
> }
> //*****************************
> // end
>
> }
>
>
> The movieclip is placed in the first 3 frames of the timeline. Each in its
> own keyframe. Basically when I run it I want it to output 'init' 3 times.
> However it only does it once. If I take out the second movieclip it
> outputs 'init' twice like expected. Shouldn't init be called each time for
> each movieclip? It seems that Flash is determining that since they are the
> same to only runs once. I don't want to call an onEnterFrame function. Any
> ideas on how to get around this. I'm outputting the file as Flash 6.
>
> TIA
> Jeff
>