-
Senior Member
[AS3] Changing stage variables from within a movie clip
I'm brand new at as3, just switched from as2. I want to change variables on the main stage's code from within a movie clip.
Say for example, I want to change a variable called 'chair'
In AS2, this is how I would do it:
(on the main stage)
(in the movie clip)
So in AS3 I have:
(stage)
Code:
var chair:Number = 2;
(movie clip)
But all I get is a 1119 error saying 'Access of possibly undefined property chair through a reference with static type flash.displayisplayObject.'
I tried googling this problem but I couldn't quite word it right. Help?
-
AKA [ Paul Bainbridge]
-
Senior Member
Thank you very much
I do have one more minor question
My movie clip is set to stop at frame 1. I set a var to trigger my movie clip to gotoAndPlay (2);
It just goes to 2 and stops. I tried adding play(); to frame 2 in the movie clip but it still gets stuck on frame 2. :/
-
Prid - Outing
Could you post the code or possibly even the FLA file?
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|