PDA

View Full Version : SWFLoader & @Embed issue


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.:(

KECrawford
04-09-2008, 06:18 PM
Has anyone seen a cheat to embed flv files into your Flex application and play them back. I would hate to use embedded swf's to do this, but its all I have seen. Does anyone know of a way to get this in.

It would have been nice to add this, because everyone can not afford Flash Media Servers. :cool:

Thanks,
Kev.

box86rowh
04-10-2008, 03:23 AM
Has anyone seen a cheat to embed flv files into your Flex application and play them back. I would hate to use embedded swf's to do this, but its all I have seen. Does anyone know of a way to get this in.

It would have been nice to add this, because everyone can not afford Flash Media Servers. :cool:

Thanks,
Kev.
Why do you think you need a flash media server to play an flv?

kahuja
04-10-2008, 03:50 AM
You already are in a Flash runtime, so you can simply load the file in a cabvas or any container for that matter and execute it, as box86rowh asked, why do you want another external interface?

unhitched
06-16-2008, 01:21 PM
You already are in a Flash runtime, so you can simply load the file in a cabvas or any container for that matter and execute it, as box86rowh asked, why do you want another external interface?
Sorry confused here - i can't seem to embed an flv file into a tile, grid, canvas or other Flex component without calling it externally via an flv player component. Kahuja, can you please explain?