AnimatorFactory error


hi guys, i'm trying head around animatorfactory class first time , keep hitting errors.

 

essentially i'm trying create game involving bugs moving around screen. straight line tweens weren't kind of movement wanted, hunted around , found function allows convert pre-designed motion tween as3 code use.

 

i've created animationmanager class store details of possible motions, , each new instance of bug randomly assigned 1 of these motion paths when 'go()' function called. here function:

 

public function go():void

        {

            _mymotion = _myanimationmanager.getananimation();

 

            _myanimfactory = new animatorfactory(_mymotion);

            _myanim = _myanimfactory.addtarget(_mybug, 1);

            _myanim.addeventlistener(motionevent.motion_end, motionfinishhandler);

        }

 

_mymotion instance of motion class, _myanimfactory instance of animationfactory class, _myanim instance of animationbase class. _mybug simple movieclip child of class conatining go() function. variables protected class variables.

 

the code compiles fine when runs keep getting error:

 

referenceerror: error #1069: property instance454 not found on code.game.mobs.smallfly , there no default value.

    @ fl.motion::animatorbase$/processcurrentframe()

    @ fl.motion::animatorfactorybase/addtargetinfo()

    @ fl.motion::animatorfactorybase/addtarget

 

the "instance454" thing seems refer _mybug variable. don't understand why should not found? smallfly class subclass of generic "bug" class contains go() function.

use trace(_mybug,_mybug.stage) see problem is.



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support