I think you should ensure that hte movieclip is actually loaded
completely - most frequent cause of such errors.
hth
-K
On 17/11/05, Radley Marx <[EMAIL PROTECTED]> wrote:
>
>
>
> Hello coders,
>
>
> I've been having mixed results with dynamic movieclip naming. For
> some reason, using the same code doesn't work each time and I don't
> know why.
>
> I used to use "eval", but since it's going to be phased out I've been
> trying more accepted approaches using "this" (instead of "_root").
>
>
>
> For example:
>
> // myImageString: usually "image0" or "image"
> // myCounter: to loop through a series
>
> var myMC:String = (myImageString + myCounter + "_mc");
> var myImageHolder:MovieClip = this[myMC];
>
>
>
>
> I'll use the above pair a few different times in my movie. The first
> time it works fine.
>
>
> trace(myImageHolder._name+ " width is " +myImageHolder._width);
> trace(myImageHolder._name+ " height is " +myImageHolder._height);
>
>
> image01_mc width is 514
> image01_mc height is 120
>
>
>
>
> Later on I reuse the same code, and get different results:
>
>
> trace ("myImageHolder name is " +myImageHolder._name);
> trace ("myImageHolder width is " +myImageHolder._width);
>
>
> myImageHolder name is image01_mc
> myImageHolder width is 0
>
>
>
> Help please. What am I doing wrong?
>
> thnx =)
>
> -radley
>
>
> PS: If there's a typo, it's prolly from a bad copy/paste into this
> email.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders