Hi;
I have the following code. All the functions go in infinite loops *except*
the first one, which is strange to me, since both it (hatAndFace, and both
eyeball1 and eyeball2) all use the same greensock codes, yet the latter two
repeat ad infinitum the alpha tween. Why is this? How do I control it such
that it only plays once? I thought putting a "stop();" at the end would do
the trick, but no :(
TIA.
beno

package
{
 import flash.display.MovieClip;
 import com.greensock.*;
 import com.greensock.plugins.*;
 import com.greensock.easing.*;
 public class Main extends MovieClip
  {
  public function Main():void
    {
  }
  public function hatAndFace():void
    {
    var mcHatAndFaceInstance:mcHatAndFace = new mcHatAndFace();
    TweenPlugin.activate([AutoAlphaPlugin]);
    addChild(mcHatAndFaceInstance);
    mcHatAndFaceInstance.x = 350;
    mcHatAndFaceInstance.y = 100;
    mcHatAndFaceInstance.alpha = 0;
    TweenLite.to(mcHatAndFaceInstance, 2, {autoAlpha:1});
  }
  public function eyeball1():void
    {
    var mcEyeballInstance1:mcEyeball = new mcEyeball();
    TweenPlugin.activate([AutoAlphaPlugin]);
    addChild(mcEyeballInstance1);
    mcEyeballInstance1.x = 380;
    mcEyeballInstance1.y = 115;
    mcEyeballInstance1.alpha = 0;
    TweenLite.to(mcEyeballInstance1, 2, {autoAlpha:1});
  }
  public function eyeball2():void
    {
    var mcEyeballInstance2:mcEyeball = new mcEyeball();
    TweenPlugin.activate([AutoAlphaPlugin]);
    addChild(mcEyeballInstance2);
    mcEyeballInstance2.x = 315;
    mcEyeballInstance2.y = 115;
    mcEyeballInstance2.alpha = 0;
    TweenLite.to(mcEyeballInstance2, 2, {autoAlpha:1});
  }
  public function rightHand():void
    {
    var mcHandInstance1:mcHand = new mcHand();
    addChild(mcHandInstance1);
    mcHandInstance1.x = 400;
    mcHandInstance1.y = 200;
  }
  public function leftHand():void
    {
    var mcHandInstance2:mcHand = new mcHand();
    addChild(mcHandInstance2);
    mcHandInstance2.x = 800;
    mcHandInstance2.y = 200;
  }
 }
}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to