A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Error with flash's TimerEvent?

  1. #1
    Senior Member
    Join Date
    May 2009

    Error with flash's TimerEvent?

    I have a timer in my class file. Its suppose to refresh a movieclips position based on the x and y of a rectangle given by a physics engine running in the background. Its working just fine but the thing is im getting this output ever 10 milliseconds. Since that is what I set my timer for, im guessing its coming from the timer.

    Here is the function.
    PHP Code:
    function refreshPositionF(e:TimerEvent):void
                    if (
    counterR == AD.numberOfProjects)
    counterR 0;
    bodyPosition:b2Vec2 cardB2[counterR].GetPosition();
    bodyRotation:Number cardB2[counterR].GetAngle();
    cardMC[counterR].= (bodyPosition.AD._Ratio) + 900;
    cardMC[counterR].= (bodyPosition.AD._Ratio) + 1100;
    cardMC[counterR].rotation bodyRotation * (180 Math.PI) % 360;
    I get this every 10 milliseconds...
    TypeError: Error #1010: A term is undefined and has no properties.
    	at MethodInfo-672()
    	at flash.utils::Timer/_timerDispatch()
    	at flash.utils::Timer/tick()
    Any help would be appreciated thanks!

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Oregon, USA
    Something in that function is undefined - comment out each line till you find it then trace each object in the offending line.
    Please use [php] or [code] tags, and mark your threads resolved 8)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center