KECrawford
04-09-2008, 06:15 PM
Hi.
I have some code that uses an extended SWFLoader to load flash swf content.
I have some methods that are called on init and complete to make assignments.
I can then call methods in the loaded content via MovieClip(this.content).myMehtod(); etc..
However.. when I move to embed the source, I can no longer get init or complete events to get called and when I access the content it says the methods are not accessable.
Does the @Embed add an additional layer in there or something?
Works with this:
<ns1:IMAPSSWFLoader x="35" y="454" width="112" height="31" id="test" source="mc/test.swf" scaleContent="false"/>
Breaks when I embed:
<ns1:IMAPSSWFLoader x="35" y="454" width="112" height="31" id="test" source="@Embed('mc/test.swf')" scaleContent="false"/>
Accessor:
/**
*
* loadedMC contains an instance of the loaded MovieClip
* @param value:MovieClip
* @return MovieClip;
* */
public function get loadedMC():MovieClip
{ if (_loadedMC == null)
_loadedMC = MovieClip(this.content);
return _loadedMC;
}
I have searched and found nothing on google on this.
Any pointers in the right direction would be helpful.:(
I have some code that uses an extended SWFLoader to load flash swf content.
I have some methods that are called on init and complete to make assignments.
I can then call methods in the loaded content via MovieClip(this.content).myMehtod(); etc..
However.. when I move to embed the source, I can no longer get init or complete events to get called and when I access the content it says the methods are not accessable.
Does the @Embed add an additional layer in there or something?
Works with this:
<ns1:IMAPSSWFLoader x="35" y="454" width="112" height="31" id="test" source="mc/test.swf" scaleContent="false"/>
Breaks when I embed:
<ns1:IMAPSSWFLoader x="35" y="454" width="112" height="31" id="test" source="@Embed('mc/test.swf')" scaleContent="false"/>
Accessor:
/**
*
* loadedMC contains an instance of the loaded MovieClip
* @param value:MovieClip
* @return MovieClip;
* */
public function get loadedMC():MovieClip
{ if (_loadedMC == null)
_loadedMC = MovieClip(this.content);
return _loadedMC;
}
I have searched and found nothing on google on this.
Any pointers in the right direction would be helpful.:(