[Embed(source="Mxml.swf")]
private var mv:Class;
private var topMaterial:MovieMaterial = new MovieMaterial(new mv(),
{interactive:true, smooth:true});
But I need to transform swf into MovieMaterial from external file, so
I thought it must be :
private var frontMaterial:MovieMaterial;
...
var loader:Loader = new Loader();
loader.load(new URLRequest("Mxml.swf"));
frontMaterial=new MovieMaterial(loader);
But it doesn't work. Need help. Thanks.
onCompleteHandler
http://gotoandlearn.com/play?id=85
It's in the docs that you have to apply event handlers to loader's contentLoaderInfo in order to get the events to fire properly. Once the events are done, then build your movie clip mat. If you try building it before Event.COMPLETE, it will fail.
The other thing that I don't think anybody asked is: are you testing this locally, or on a website? Flash likes to lock you out of loading local files unless you know how to flip the switch to local files and turn off network access. Dunno if that's still an issue in CS4.
~ C
var loader:Loader = new Loader();
loader.load(new URLRequest("Mxml.swf"));
add event listener for listening if the downloading complete or not?
Soory for my bad english.
[Embed(source="Mxml.swf")]
private var mv:Class;
private var topMaterial:MovieMaterial = new MovieMaterial(new mv(),
{interactive:true, smooth:true});
I get "topMaterial" which are swf file wich embeded into my project,
and i can use it as a texture(material) for any primitive.
In this way :
var loader:Loader=new Loader();
loader.load(new URLRequest("Mxml.swf"));
addChild(loader);
I have loaded external SWF. But I can't transform it into
MovieMaterial, which I want to use as texture(material) for any
primitive.
Hope for HELP. Thanks.
On 30 янв, 18:39, Peter Kapelyan <flashn...@gmail.com> wrote: