Groups | Blog | Home
all groups > flash (macromedia) > july 2004 >

flash (macromedia) : MX -- loaded SWF into mc, actions not running


Lori Ross
7/6/2004 10:06:16 PM
I'm attempting to set global variables using code placed on the first frame
of my SWF, which happens to be a calendar:

_global.viewYear = 2004;
_global.viewMonth = "July";

I have no references to _root, or to _level in the code, which I realize
will create issues when my SWF is loaded into a movie clip in my main movie.

Run alone, the variables trace with correct values. Apparently, simply
loading the SWF into the movie clip will not cause the SWF's code to run.
I've just spent all day searching Google's archives of this forum for
answers. There has to be something simple I'm missing.

Also, the calendar SWF has a simple array defined in its timeline called
dayBlocks. Run alone I access the values with a for loop using dayBlocks[i].
Works fine. Once the SWF is loaded into my nested movie clip ("mcHolder") it
is inside this path from the main movie:

_level0.fileMC.mcHolder

Is there some way I can target the array on the SWFs timeline? What is the
correct syntax, since I'm accessing each of the array elements with a for
loop and array-access notation; i.e., dayBlocks[i].


--
Thanks,

~Lori

.........................................................
Lori Ross
lross@slocumblatt.com
Slocum Blatt Network
Ross Designs & Consulting

Lori Ross
7/6/2004 11:31:23 PM
Scratch the issue with _global variables -- figured it out and it was
something simple.

I still have the problem with needing to access the values of the array on
the external SWF timeline using array-access notation, not dot syntax.

Thanks,
~L


[quoted text, click to view]

Peter Blumenthal
7/7/2004 1:54:37 PM

[quoted text, click to view]


fileMC.mcHolder.dayBlocks[i]

AddThis Social Bookmark Button