0

I'm developing Adobe Air application. To show additional window, I create NativeWindow object. In the object, "stage.addChild( Sprite Obj )" does work, but almost all other flex components do not work. Actually I want to add 'spark.components.BorderContainer', 'spark.components.Group', 'mx.controls.Image', etc., but cannot.

One solution I found is to use 'flash.html.HTMLLoader' and to display rich content (that includes images and styled text) into the window.

Is there any better way to show rich content?

Jason
  • 29
  • 5
  • They should all work. Can you quantify what "Not works" mean. Are you getting compiler errors? Or runtime errors? Can you share your code? Are you sure you're using the Flex 4 SDK for your project? – JeffryHouser Oct 16 '10 at 02:08
  • Also, what happens when you call this.addChild rather than stage.addChild? As Flextras said, all of those components should work just fine with AIR and the NativeWindow component. – Wade Mueller Oct 16 '10 at 19:54

1 Answers1

2

NativeWindow is not a Flex container.

Use spark.components.Window or mx.core.Window - they allow BorderContainer, Group and Image to be added (do not forget to use window.addElement() method).

Badr
  • 10,384
  • 15
  • 70
  • 104
Maxim Kachurovskiy
  • 2,992
  • 2
  • 21
  • 24