Hi,

I was hoping someone would be able to help me with a problem i've been
fiddling with for a long time. I would have thought it's fairly common,
but Googling and searching this ML archive has yeilded nothing, so...

I have a fairly complex application using Flash which i wont bore you
all with the specifics here, but basically you have one movie which
loads others as pluggable modules via external SWF files. These SWF
files contain a MovieClip symbol which is linked to an AS class,
which then displays stuff and communicates with the parent SWF via
a standard interface.
This is done with (what i assume is) the usual method of...

  tmp_mc=attachMovie('blankClip', 'mc'+depth, depth);
  tmp_mc.loadMovie(moduleName+'.swf');
  <code to wait for the load here...>
  thingie=tmp_mc.attachMovie(moduleName, 'mod'+depth, depth);

It is my understanding that layers are a kind of tree like layout, is
this correct? So no matter what i do in tmp_mc.attachMovie() calls,
movieclips will always be in the same plane as tmp_mc as far as the
root clip is concerned.

What i need to do, is be able to somehow attach a symbol from the
moduleName+'.swf' file on a layer in the root space, not in tmp_mc's
space.
The reason for this, is the class that gets loaded for this particular
module may need to do some kind of overlay on the display, so it'd
make some call like mc=_root.requestOverlay(this, symbolName, etc etc).

Am i making sense so far?
There are three ways i can see to do this:

 1) Find a way to address symbols located in moduleName+'.swf' from
 the root MovieClip.

 2) Find a way to transfer MovieClips from one depth to
 another. I.e. tmp_mc.attachMovie(blah) and then move the result into
 root. This probably isn't possible...?

 3) The method i am currently using, is to simply just load the module
 SWF a second (or third, fourth, etc...) time into a different depth,
 and attach much as i would the main module clip. This seems wasteful,
 though... and it also makes implentation much more clumsy because the
 method in the root clip cannot return the overlay clip immediately,
 it simply returns a handle and then notifies the caller at a later
 time when it is loaded.

Is 1 or 2 possible? Or can you think of another method?


Regards,
 - Daniel



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to