Ran across this question and thought it was pretty interesting. The question asked if it was possible to load an external .swf movie as a material. I figured this was just a simple workaround to get an external .swf loaded in as a material.
What I did was set up a MovieAssetMaterial to be loaded in on my object surface. The MovieAssetMaterial dimensions where 52x52 (of course I could change this to be whatever I wanted). So I made another fla, set the size to 52x52 and then published it. Then, back in my MovieAssetMaterial movieClip I simply set up the external .swf to be loaded in.
//load in an external .swf movie from within a MovieAssetMaterial movieClip
//be sure the MovieAssetMaterial dimensions match the external .swf dimensions.
var l:Loader = new Loader();
l.load(new URLRequest("loadMe.swf"));
this.addChild(l);
example: Loading external swf as a material
source: Get files here.
skip to main |
skip to sidebar
Jim Foley's Brain. Flex, Flash, Papervision 3D, Swift 3D and other cool stuff.
Back on top ^
created by Nuvio | Webdesign
MAD VERTICES © 2008 Ken ahlin | Converted to XML Blogger Template by ThemeLib
how do i change the resolution
such as 52x52 to 100x100
nm i figured it out all you have to do is open 2-PV3D-MovieAssetMaterial.fla and click on the movie clip and change the size of it
Just in case anyone else needs to figure out how to change the dimensions, all you'd have to do is set the dimensions of the movieClip shape to the dimensions of your new intended material.
Jim-
Thanks for the great tutorials, they have been the most comprehensive ones out there. I am sure I will be back with more questions later.
invalid hostname?
Hi,
Is it possible to have a navigation within the swf that is loaded in externally? so that you can have more interactivity than just having a plane as one single button. Ive been googling but cant seem to find a straight answer really.
@Charlie - when you apply your material to your object set its "interactive" property to true. Also, you would need to use a MovieMaterial material type for your materials to be interactive. So, drop your material on the stage, give it an instance name, set its visible to false, make sure that your viewport is set to interactive (this is usually declared in your "new Viewport3D(...)" var, then set your MovieMaterial "movieClip" to be the instance name of the mc you put on your stage. Again, set the MovieMaterial property "interactive = true".
Hope this helps.
Hi,
I've loaded a swf file into the MC that's used for the movie material, but the loaded swf doesn't accept mouse events, etc. Any ideas why? Thanks in advance for any help.
Thats great stuff joe, tell me though, Im trying to see in the .as file the refrence to the "loadMe.swf"
ive even been looking in the material scripts in the class library and im still lost how do i make refrence to this? Sorry if im being an eejit
Sorry it was in the symbols actions, feel like a right trouser
I get a message "invalid hostname" :(