Hi all, I’m having a very specific problem with createChild
calls that I will try to sum-up as briefly as possible: A.SWF
loads B.SWF through a Loader component, both are originally flex
applications. A invokes a particular
method on B, passing down an instance
of Panel. In this method, B tries to perform a createChild call on
the passed panel, using a class definition contained
only in B and not in A. This results in a HTTP request being made (http://localhost:8888/WebApp/[type%20Function])
– looking at the Flex source, this seems to be the result of an attachMovie call returning undefined,
causing a call to loadExternal
from within the createClassObjectWithStyles method
in the View class. The documentation for MovieClip.attachMovie (http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00001487.html#3998340) seems
to suggest that what I’m trying simply cannot be done (without including a reference to the class
to be created within A.SWF, which
defeats the purpose of this slightly). From the documentation comments: ------------------------------------------------------------------------------------------------------------ chi chi latté said on Feb
16, 2005 at 2:52 PM : I was having problems attaching
symbols into mcs loaded dynamically using loadMovie(). ------------------------------------------------------------------------------------------------------------ mspres said on Mar 10,
2005 at 12:57 PM : Note: attachMovie() WILL work with
shared asset symbols unless the movie is loaded into another movie. For
example, consider that assetsUser.swf uses attachMovie() on shared asset symbols
imported from assets.swf. This works fine until a third movie,
assetsUserLoader.swf is used to load assetsUser.swf. Preloading the assets.swf
with assetsUserLoader.swf does not solve the problem. The only solution is to include design-time instances
of the shared asset symbols on assetsUser.swf stage; which, defeats the
reasoning for using attachMovie. ------------------------------------------------------------------------------------------------------------ Can anyone confirm this definitely cannot be done,
and there is no work-around? (Note that debug statements show everything else
up as being ok, the method on B is invoked, the class definition is visible,
the parent’s panel reference is fine, I’m 99% sure it’s the attachMovie
call that is returning undefined). Any advice, suggestions etc greatly appreciated.
Thanks in advance! (Code samples can be provided if it would help). Cheers Mike -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___ |