Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: can't see wood for the trees
From: Helen Triolo
Date: Thu, 2 Nov 2000 20:06:06 GMT

I love these F5 addressing issues! You want

_root[mc].gotoAndPlay("fade");

(I think you also want just mc = subMenArray[i] before it too; no string
function necessary).

Here's a general rule:

1) for an instance name, use quotes:

_root["mcinstancename"].gotoAndPlay("fade");

(this is the associative-array equivalent of
_root.mcinstancename.gotoAndPlay("fade"); -- either one works)

2) for a variable that contains an instance name, no quotes:

_root[variable].gotoAndPlay("fade");

(no dot syntax equivalent of this)

If you want more notes on addressing issues like that, the first couple
pages of a tutorial i did at flashkit attempts to explain it:
http://www.flashkit.com/tutorials/5_ad_piect/tute_piechart.shtml

Regards,
Helen
---------------------------------------------------
Flash 5 Journal: http://i-technica.com/flash5
Flash Q&A archive: http://i-technica.com/flashlist

carl captieux wrote:
>
> Hi All,
> I have a number of mc's I want to tell to go and play frame "fade"
>
> The loop goes through the array with mc equalling the items from array.
>
> subMenArray = new
> array("experience","products","trends","services","community","index");
>
> function moveSubMens (){
> for(i=0; i< subMenArray.length; i++){
> mc = String(subMenArray[i]);
> _root.mc.gotoAndPlay("fade");
> }
> }
>
> However, the problem seems to be the line: _root.mc.gotoAndPlay("fade");
> What seems to be wrong with this?
>
> telltarget("_root"+mc){
> gotoAndPlay("fade")
> }
> Tell Target works, but I would like to use the new syntax.
>
> Thanks,
>
> Carl
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save £200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: can't see wood for the trees , carl captieux

Replies
  FLASH: can't see wood for the trees, carl captieux

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]