Thanks Amy,

 

I actually managed to get it to work as a Flex component in the end, it
was pretty fiddly but once figure out its simple, I can create the
3dwall instance and add it to a view state or container and don't have
ANY code in flash at all.  But I still have complete code completion in
flex from the generated swc.  

 

Basically my fla has the 3dwall in the library and I export a swc, pull
into flex and wrap it in a UIComponent and I'm done.

 

I'm going to blog about  how to set it up if you're interested I can let
you know once I post.

 

Grant

 

 

...........................................

> b l u e t u b e i n t e r a c t i v e.

.: Development solutions for creatives :.

.: grant davies

.: 404.428.6839 (c)

.: 404.921.9550 (F)

> gr...@bluetubeinteractive.com

http://www.bluetubeinteractive.com

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Amy
Sent: Wednesday, February 04, 2009 5:44 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Geting the 3dWall Pro to work as flex
component ?

 

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Grant Davies" <gr...@...> wrote:
>
> Hey guys,
> 
> 
> 
> I have the 3d wall pro component from :
> 
> 
> 
> http://www.flashloaded.com/flashcomponents/3dwall/
> 
> 
> 
> I successfully created a flex component from it, added it to a view
> component and initialized its instance with code
> 
> 
> 
> Like :
> 
> 
> 
> var wall : com.flashloaded.Wall3DPro.Wall3DPro = mainView.wall;
> 
> 
> 
> wall.setMediaPaths("/assets/img/portfolio/",
> "/assets/img/portfolio/");
> 
> 
> 
> var obj:Object = new Object();
> 
> obj.type = "image/jpeg";
> 
> obj.src ="aso-calendar-200x150.jpg";
> 
> obj.width="200";
> 
> obj.height="150";
> 
> 
> 
> var objArray : Array = new Array();
> 
> 
> 
> objArray.push(obj);
> 
> wall.addElements( objArray, "array");
> 
> 
> 
> wall.init();
> 
> 
> 
> 
> 
> I then run my app in the debugger and I do see the wall loading the
> jpegs correctly but the wall is "never" visible.
> 
> 
> 
> If I check the instance in the debugger its visible is true, its 
width
> and height look good, its parents width/height/visible all look good
> too.
> 
> 
> 
> 
> 
> I then used an fla and published a swf instead and embedded the swf 
with
> the same code and it works and displays. I'd prefer to use it as a 
flex
> component but I can't figure out why its "running" but isn't 
visible.

IIRC, the XML and object methods of loading work completely 
differently. If you're using an object, you need to use "url" 
instead of "src". I think if you get that wrong it will fail without 
error. I also recall I had to "read between the lines" of their docs 
to figure that out.

What I did with my component is that I had a setup() method that I 
called in the constructor that fed in some dummy data while I was 
still in the Flash environment. That way I could make sure 
everything was working before I exported the swc, and if I had a 
problem, the FlashLoaded engineers couldn't play the "don't support 
Flex" card. Just before I exported the swc, I'd comment out the setUp
() call, and then I'd do the actual setup from Flex.

HTH;

Amy



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
2/3/2009 5:48 PM

<<image001.png>>

Reply via email to