Flasher Archive

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


Subject: Re: FLASH: Targeting variables in nested attatched MC's?
From: Helen Triolo
Date: Wed, 8 Nov 2000 14:14:40 GMT

If they're dynamically named, array-type addressing works better than
dot syntax.

dot syntax (what you have now but corrected to use F5 syntax):
_root.MC1.MC2.Var1

array syntax (where a variable mcname holds the name of 2nd movieclip):
_root.mc1[mcname].Var1

This works because every object has an array of the objects within it,
and they are referred to by their names. (If you've ever done
Javascript rollovers and referred to images by name, you've probably
used this syntax there -- it's the same in JS as F5). There are more
details on dot-syntax vs array-syntax in this tutorial at flashkit if
you're interested:

http://www.flashkit.com/tutorials/5_ad_piect/tute_piechart.shtml

Regards,
Helen
-----------------------------------------------------
i-Technica � http://i-technica.com � 301.424.6037
developer resources: http://i-technica.com/whitestuff

nick stevenson wrote:
>
> I have a Movie Clip contraining data which is passed to flash from a
> database & vice versa.
>
> What I have done is loaded this MC into another MC which acts on the values
> passed in by the MC which contains the data from the database.
>
> I am having problems communicating between the MC's. I can communicate
> betwwen them as follows :
> _root.MC1.MC2/:Var1
> However this is not practical as the MC's are dynamically named at runtime.
>
> Any help/advice you have appreciated.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: Targeting variables in nested, Anil Hamal

Replies
  FLASH: Targeting variables in nested att, nick stevenson

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