|
Bob,
The ViewStack component has a createChild method to dynamically add components into the view stack. createChild(class,name,initprops). You could create a new mx:Image. You may have to create a container component with the mx:Image inside since containers can lay themselves out.
the view stack may only allow containers as children. You could create a container extending VBox with an image inside. Then you would add the child dynamically like:
function setLink(url) { myViewStack.createChild(MyLinkContainer, undefined, {source: url} ); }
MyLinkContainer.mxml: <?xml version="1.0" ?> <mx:VBox xmlns:mx="http://www.macromedia.com/2003/mxml" initialize="img.source=source;"> <mx:Script> // source contains the url to an mxml file load e.g. link0.mxml.swf var source; </mx:Script> <mx:Image id="img" width="500" height="400"/> </mx:VBox>
Dan
-----Original Message-----
I have my menu on the left side of the screen and the
'working area' |

