Mint_Sauce
December 31st, 2007, 02:15 PM
Hi, first post here. :) I'm not sure how much help i'll be for a while as i'm quite new to actionscript. I've been making something which needs to be complete for tomorrow and being new years eve I'm getting more and more desperate to get this done so I can go out. So instead of continuing to trawl through Google I've decided to ask! :)
Here's my question:
I've got a variable that is the name of a movieClip but if I try doing basically the following it doesn't work:
(This is a simplified example, not what i'm actually doing)
var myVar:String;
myVar= "myMovieClip";
myVar.alpha = .50;
This in my brain is saying, make the "myvar" variable have the value "myMovieClip" and then on the last line it's basically saying, myMovieClip.alpha = .50
So, is it because it's a String variable that's causing the issue or something else?
Cheers for helping me out in advance and Happy new year!
Here's my question:
I've got a variable that is the name of a movieClip but if I try doing basically the following it doesn't work:
(This is a simplified example, not what i'm actually doing)
var myVar:String;
myVar= "myMovieClip";
myVar.alpha = .50;
This in my brain is saying, make the "myvar" variable have the value "myMovieClip" and then on the last line it's basically saying, myMovieClip.alpha = .50
So, is it because it's a String variable that's causing the issue or something else?
Cheers for helping me out in advance and Happy new year!