So you have a browser hosting the Flash Player, running a Flex app that
contains a SWFLoader that loads a Flash SWF.  In that Flash SWF, you
implemented a UIComponent and inside of that you want to display a Flex
application that you are going to build dynamically.  Is that correct?

 

If so, why so convoluted?

 

Is the Flex framework available from within the Flash SWF?  Also,
UIComponent is not a container and will not do any automatic sizing or
layout of the content.  You will have to do that yourself.  That means
implementing the lifecycle, layout and measurement functionality.  Say
again why you want to do this?  I'm not saying it is bad, just trying to
be sure you have a god reason.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of specdout
Sent: Monday, January 19, 2009 12:05 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Populating a Flex Container in Flash

 

Does anyone else have any thoughts on this problem?

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "specdout" <ratu...@...> wrote:
>
> Thanks for your reply, Paul.
> 
> --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> , "Paul Andrews" <paul@> wrote:
> >
> > Does anything get added to the display list?
> When the example code executes I do see the FlexContentHolder symbol
> (<Fx>) on the display where I would expect it to be, i.e. positioned
> where I would expect, with the dimensions I would expect, so I think
> it's already on the DisplayList. As well, I can make it invisible if
> I want, so it does appear to be available and active - it's just the
> Flex content that doesn't show.
> 
> > 
> > ----- Original Message ----- 
> > From: "specdout" <raturne@>
> > To: <flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> >
> > Sent: Thursday, January 15, 2009 5:42 PM
> > Subject: [flexcoders] Populating a Flex Container in Flash
> > 
> > 
> > > Hi All,
> > >
> > > I'm currently developing a Flex application that loads a Flash
SWF for
> > > use as a background image. In other words, the app's main window
has
> > > as its first child a SWFLoader component into which I've loaded
a SWF
> > > developed in Flash. So far, so good.
> > >
> > > Now, rather than open up dialogs or create direct child windows
of the
> > > main window, I want to host Flex content within the Flash SWF
itself.
> > > I installed the Flex Component Kit in my Flash CS3 environment and
> > > proceeded to created a MovieClip symbol that contains a
> > > FlexContentHolder. From Flex, I can access the symbol and set Flex
> > > content on that symbol but the Flex content never appears. An
example
> > > of how I've attempted to do this is as follows:
> > >
> > > // get a reference to the Flex Content MovieClip
> > > var swf:MovieClip = _swfLoader.content as MovieClip;
> > > var fc:Object = swf["flexContainer"];
> > >
> > > // create some Flex content to display
> > > var button:Button = new Button();
> > > button.width = 200;
> > > button.height = 100;
> > > button.label = "Click me!";
> > >
> > > // create a top-level container for the Flex content
> > > var uiComponent:UIComponent = new UIComponent();
> > > uiComponent.width = fc.width;
> > > uiComponent.height = fc.height;
> > > uiComponent.alpha = 1.0;
> > > uiComponent.addChild(button);
> > > uiComponent.visible = true;
> > >
> > > fc.content = uiComponent;
> > >
> > > Am I doing something wrong here? Conceptually, am I on the right
> > > track? In other words, should what I'm trying to do be possible?
I'd
> > > appreciate any help or insight anyone might be able to offer.
> > >
> > >
> > > ------------------------------------
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
<http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> 
> > > Alternative FAQ location: 
> > >
>
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-
1e62079f6847
<https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf
-1e62079f6847> 
> > > Search Archives: 
> > > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
<http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo> !
Groups 
> > > Links
> > >
> > >
> > >
> >
>

 

Reply via email to