On Tue, Dec 8, 2009 at 3:58 AM, beno - <flashmeb...@gmail.com> wrote:

> On Mon, Dec 7, 2009 at 5:38 PM, Karl DeSaulniers <k...@designdrumm.com>wrote:
>
>> My suggetion to you bueno is to rewrite your code using the suggestions
>> provided by this list. Keep all variables different. If your attaching
>> multiple instances , use the for loop to assign their names. Trace trace
>> trace.
>>
>
Looking at the code again, it seems clearly that the problem has to do with
trying to access the public function myLeftHand. The first two declarations
of mcHandInstance2 in the unrevised code submitted yesterday were from
earlier incarnations of trying to resolve this problem. I have eliminated
them, and uncommented the call to myLeftHand:

  public function init():void {
    hatAndFace();
    eyeball1();
    eyeball2();
    myRightHand();
//    var mcHandInstance2:mcHand = new mcHand();
//    addChild(mcHandInstance2)
//    mcHandInstance2.addFrameScript(20, myLeftHand)
    myLeftHand();
  }


Here is the code for myLeftHand:


  public function myLeftHand(e:Event=null):void
    {
    if (e.target.currentFrame == 10) { trace("yes") };
    var mcHandInstance2A:mcHand = new mcHand();
    addChild(mcHandInstance2A);
    mcHandInstance2A.x = 800;
    mcHandInstance2A.y = 200;
//    if (e.target.currentFrame == 40) TweenMax.to(mcHandInstance2, 2,
{x:200, startAt:{totalProgress:1}}).reverse();
  }
 }
}


The swf plays without myLeftHand, but throws a 1009 error, apparently
indicating that I'm referencing something (myLeftHand) that doesn't exist.
Therefore, my function is not being read. Can you please inform me why?
TIA,
beno
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to