Bring to Front using Actionscript
Hello. Is there an ActionScript 3.0 command that forces an object/symbol to the front?
Hello. Is there an ActionScript 3.0 command that forces an object/symbol to the front?
Thanks for the references.
The error happens because you're referencing the class itself and not an instance of the class.
For example: you have a Movie Clip on stage called player. You change the alpha of this instance writing player.alpha = 0.5; and not MovieClip.alpha = 0.5;.
You have to create an instance of your ShotsCount symbol and then access the text field inside of it through the instance name. For example:
var shots:ShotsCount = new ShotsCount();
shots.shotstxt = String(score);
addChild(shots);
Please let me know if you have any further questions.
Regards,
JC
I'm really to be a pain. I now get this compiler error message.
I added your script to the function as shown in the attached.
I also included the varaiables I already have set if that helps?


Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.