PDA

View Full Version : nested objects


jagguy
09-11-2006, 12:33 PM
//can i create nested objects like this at runtime, because this is supposed to be an image inside a scrollpane ? It loads the image on top of the scrollpane with no scrollbars visible.

this.createClassObject(mx.containers.ScrollPane, "sp", this.getNextHighestDepth());
sp.setSize(100, 100);

sp.createEmptyMovieClip("mc7", sp.getNextHighestDepth());

sp.mc7.attachBitmap(bmp2, sp.getNextHighestDepth());
sp.vScrollPolicy = "on";

Kraken
09-11-2006, 12:56 PM
just quickly, getNextHighestDepth doesn't work when you have a component on the stage. Try setting the depth manually.

jagguy
09-11-2006, 01:11 PM
just quickly, getNextHighestDepth doesn't work when you have a component on the stage. Try setting the depth manually.

I don't have anything on the stage , I have a blank screen?
Setting it manually is not inserting the image inside the scrollpane.