Sunday, March 28, 2010

um...confusion???

See http://pastebin.com/m8779b35

Now there is a button called Answera, which when clicked should have a symbol (movie clip) called Check appear at the cordinated specified.

Check exists in the libary (but does not have an instance name) and no where else on the stage.

when I run this code I get:

1180: Call to a possibly undefined method Check. -%26gt; var rightCheck = new Check();

How is it undefinded if it exists in the libary?

um...confusion???

you must provide a class name for this clip and it should have a flash.display.MovieClip as base class;

Do this: Right click on symbol from library, click Advance button if its not open advance menu,?check Export for Actionscript. In the field Class write the name. Than the?instance of the symbol can be created with new

um...confusion???

Ok After doing that I get, upon running it, 1026: Constructor functions must be instance methods. -%26gt; location symbol 'Check'

The name of the simbol in library must be different from the name of the class. Can you give me a?fla fail to check it?

Here is a sample, the Movie name in the libary is called Check. and I know its a mess in there but i havent had time to clean it all up

Use a different name for the class generated for this simbol. In field Class write unique class name ( for example myCheckClassName ). After than you can create an instance of myCheckClassName in this way

var myCheckInstance: myCheckClassName?= new myCheckClassName ();

Now assuming?I go to a diffrent frame How would i erase those (the check mark) objects on screen?

I know its removeChild(Class ID here); but i only want it to happen WHEN I leave the frame...

Add evet listener to catch Event.ENTER_FRAME and chack current frame.

No comments:

Post a Comment