--- In [email protected], "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

