Re: [flexcoders] difference between stage and application?

2009-04-25 Thread Joseph Balderson
If memory serves, Container.addChild() overrides DisplayObject.addChild(), and 
requires that the argument implement the IUIComponent interface, which means 
only Flex components can be added.

You need to use Container.rawChildren.addChild(Sprite) instead. You may also 
have to override updateDisplayList() to get it to layout correctly, because 
you're basically bypassing the Flex framework layout mechanism. So unless you 
really need to, using the Flex Integration Kit is much less hassle. What the 
kit 
does is wrap your Sprite or MovieClip object in a UIMovieClip class, which 
implements the bare bones interfaces required for a non-Flex object to work 
with 
the Flex framework, such as IUIComponent.

You can also use the UIMovieClip class source to wrap your Sprite or non-Flex 
object without the Flex Integration Kit, this way you can bypass using Flash 
altogether if you find you don't need it.

___

Joseph Balderson, Flex  Flash Platform Developer :: http://joeflash.ca
Author, Professional Flex 3 :: http://tinyurl.com/profx3book


Alex Harui wrote:
 
 
 You should use the Flash/Flex Component Kit to wrap your Flash content.  
 Flash content won’t work well in Flex without being wrapped in some 
 fashion.  The minimum thing you could do is stick in an mx:UIComponent 
 of the appropriate size in the application and addChild the sprite to it.
 
  
 
 Alex Harui
 
 Flex SDK Developer
 
 Adobe Systems Inc. http://www.adobe.com/
 
 Blog: http://blogs.adobe.com/aharui
 
  
 
 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] 
 *On Behalf Of *michaeljonknight
 *Sent:* Wednesday, April 22, 2009 2:33 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] difference between stage and application?
 
  
 
 
 
 
 Hello,
 
 I am somewhat new to flex. We are working on a project that uses an 
 exported swc from Flash and running into some problems getting 
 everything we want to show up layered correctly.
 
 I want to add a menu bar (mx.controls.MenuBar) on top of some content 
 from the flash swc (flash.display.Sprite). I can only get the menu bar 
 to show up if I call application.addChild and the sprite to show up if I 
 call application.stage.addChild. But the menu bar popups are behind the 
 sprite.
 
 I don't really understand the difference between the application and the 
 stage either. Can anyone help? And is there an established way to work 
 with mx.controls and flash.display.sprite data?
 
 thanks in advance,
 madmik3
 
 
 
 




--
Flexcoders Mailing List
FAQ: 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
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [flexcoders] difference between stage and application?

2009-04-25 Thread Joseph Balderson
Sorry, I realized you were talking about UIComponent.addChild(), not 
Container.addChild(), my bad.
___

Joseph Balderson, Flex  Flash Platform Developer :: http://joeflash.ca
Author, Professional Flex 3 :: http://tinyurl.com/profx3book


Joseph Balderson wrote:
 If memory serves, Container.addChild() overrides DisplayObject.addChild(), 
 and 
 requires that the argument implement the IUIComponent interface, which means 
 only Flex components can be added.
 
 You need to use Container.rawChildren.addChild(Sprite) instead. You may also 
 have to override updateDisplayList() to get it to layout correctly, because 
 you're basically bypassing the Flex framework layout mechanism. So unless you 
 really need to, using the Flex Integration Kit is much less hassle. What the 
 kit 
 does is wrap your Sprite or MovieClip object in a UIMovieClip class, which 
 implements the bare bones interfaces required for a non-Flex object to work 
 with 
 the Flex framework, such as IUIComponent.
 
 You can also use the UIMovieClip class source to wrap your Sprite or non-Flex 
 object without the Flex Integration Kit, this way you can bypass using Flash 
 altogether if you find you don't need it.
 
 ___
 
 Joseph Balderson, Flex  Flash Platform Developer :: http://joeflash.ca
 Author, Professional Flex 3 :: http://tinyurl.com/profx3book
 
 
 Alex Harui wrote:

 You should use the Flash/Flex Component Kit to wrap your Flash content.  
 Flash content won’t work well in Flex without being wrapped in some 
 fashion.  The minimum thing you could do is stick in an mx:UIComponent 
 of the appropriate size in the application and addChild the sprite to it.

  

 Alex Harui

 Flex SDK Developer

 Adobe Systems Inc. http://www.adobe.com/

 Blog: http://blogs.adobe.com/aharui

  

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] 
 *On Behalf Of *michaeljonknight
 *Sent:* Wednesday, April 22, 2009 2:33 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] difference between stage and application?

  




 Hello,

 I am somewhat new to flex. We are working on a project that uses an 
 exported swc from Flash and running into some problems getting 
 everything we want to show up layered correctly.

 I want to add a menu bar (mx.controls.MenuBar) on top of some content 
 from the flash swc (flash.display.Sprite). I can only get the menu bar 
 to show up if I call application.addChild and the sprite to show up if I 
 call application.stage.addChild. But the menu bar popups are behind the 
 sprite.

 I don't really understand the difference between the application and the 
 stage either. Can anyone help? And is there an established way to work 
 with mx.controls and flash.display.sprite data?

 thanks in advance,
 madmik3




 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: 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
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 
 
 
 




--
Flexcoders Mailing List
FAQ: 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
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] difference between stage and application?

2009-04-22 Thread michaeljonknight
Hello,

I am somewhat new to flex.  We are working on a project that uses an exported 
swc from Flash and running into some problems getting everything we want to 
show up layered correctly.

I want to add a menu bar (mx.controls.MenuBar) on top of some content from the 
flash swc (flash.display.Sprite).  I can only get the menu bar to show up if I 
call application.addChild and the sprite to show up if I call 
application.stage.addChild.  But the menu bar popups are behind the sprite.   

I don't really understand the difference between the application and the stage 
either.  Can anyone help?  And is there an established way to work with 
mx.controls and flash.display.sprite data?

thanks in advance,
madmik3



RE: [flexcoders] difference between stage and application?

2009-04-22 Thread Alex Harui
You should use the Flash/Flex Component Kit to wrap your Flash content.  Flash 
content won't work well in Flex without being wrapped in some fashion.  The 
minimum thing you could do is stick in an mx:UIComponent of the appropriate 
size in the application and addChild the sprite to it.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of michaeljonknight
Sent: Wednesday, April 22, 2009 2:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] difference between stage and application?





Hello,

I am somewhat new to flex. We are working on a project that uses an exported 
swc from Flash and running into some problems getting everything we want to 
show up layered correctly.

I want to add a menu bar (mx.controls.MenuBar) on top of some content from the 
flash swc (flash.display.Sprite). I can only get the menu bar to show up if I 
call application.addChild and the sprite to show up if I call 
application.stage.addChild. But the menu bar popups are behind the sprite.

I don't really understand the difference between the application and the stage 
either. Can anyone help? And is there an established way to work with 
mx.controls and flash.display.sprite data?

thanks in advance,
madmik3