This content has been marked as final. Show 2 replies
"Garfyld" <firstname.lastname@example.org> wrote in message
> I want to create a slide show (sort of - only one picture should be
> visible at
> one time) with embedded images.
> My idea was to create an array full of image-objects like this:
> <mx:Array id="ImageDataSet">
> <mx:Image id="i04" source="@Embed('c:\blabla\blub.jpg')" />
> and to set the selected image (I want to use a slider, that returns an
> (int) for the selection) as my displayed image - something like this :
> <mx:Image id="realImage"/> //my displayed image container
> realImage = ImageDataSet[index]; //activated in a AS-function when
> slider index changes
> It does not work this way.
> An other idea was to use DisplayObjectContainer and the addChild function,
> I didn't got it to display the child on the top in my "realImage".
> Can somebody help me to display embedded images in one image container
> like a
> slide show?
This might help:
I found one possible solution. Use the ViewStack element!
<mx:ViewStack id="ImageViewStack" selectedIndex="0">
<mx:Image id="iv01" scaleContent="true" source="@Embed('blabla/image001.png')" />
< ... next canvas with image ...>
To select the different levels/images I used a slider:
<mx:HSlider id="ImageSlider"... change="ImageViewStack.selectedIndex=ImageSlider.value-1" />
With this change-attribut it is possible to scroll through the images.