Hey Matt are you trying to import a swf into flex that contains actionscript code of it's own? if so then using the embed tag strips all code from the swf file. never really understood why this happened, i think it may have something to do with compatibility issues between as2 and as3 but seems like a cop-out to me...
anyway, there is a way you can embed your swf into a flex project with your code intact! have a look at the Basic_InteractiveTexture example in the demos folder of the svn or teh dems zip in away3d.com/downloads and you should see this in action. hth Rob On Mon, Jun 29, 2009 at 2:48 PM, MattMac <[email protected]> wrote: > > Hi mates, > > Please forgive me if that particular issue was already treated, but I > couln't find any fix in the group. > > Here is my unsolv-able/ed issue : > > I used Away 3D 3.3.3 to create 5 planes positionned to make a cube. > These 5 planes are, for now, textured with a video (VideoMaterial). > > It's been a long time since I've thought about making one of the plane > becoming interactive. Therefore, i wanted to texture it with an > external swf, for instance one created with Away 3D (for example > rotating the camera around a cube). > > The thing is, no matter how I load it, i'm unable to see it on my > scene, and i got some null reference issues and the plane is not > created. > > Here is how i proceed : > > [Embed(source="Basics.swf")] > private var basicsEmbedded:Class; > > var topMaterial:MovieMaterial = new MovieMaterial(new basicsEmbedded > (), {interactive:true, smooth:true, precision:5}); > > and then, of course : > var topPlane:Plane = new Plane({material:topMaterial, width: > 400, height:400, segmentsW:2, segmentsH:2, ownCanvas:true}); > > I tried to use a Loader with a URLRequest, and the plane is created is > what seems to be a basic material (purple, wireframe). > > Am I missing smth obvious ? is the type of swf influencing the > material ? > > Thanks in advance for your time and answers. > > Peacefully, > > Matt -- Rob Bateman Flash Development & Consultancy [email protected] www.infiniteturtles.co.uk www.away3d.com
