Hi there,
I see 2 possibilities...
First...
Take a look at Photoshow.mxml. I don't see where your pictures array
is initialized as in "pictures = new Array();" When the swf is loaded
into the browser, your pictures array is still null. It is possible
that IE just has a problem with that while the others don't.
//all the pictures
private var pictures:Array;
//this changes the set of pictures
public function set dataProvider(value:Array):void {
pictures = value;
currentIndex = 0;
updateCurrentPicture();
}
Second...I feel better about this possibility...
Try the edits below in your XMLPhotoshow.mxml:
// Set pictures as Bindable
[Bindable] public var pictures:Array;
public function set xmlSource(xml:XML):void {
var index:int = 0;
pictures = new Array();
//var pictures:Array = new Array();
for each( var image:XML in xml..image ) {
pictures[index] = new PhotoshowImage();
pictures[index].name = image.itemName;
pictures[index].caption = image.itemCaption;
pictures[index].width = image.itemWidth;
pictures[index].height = image.itemHeight;
index++;
}
// photoshowContainer.dataProvider = pictures;
}
]]>
</mx:Script>
<!-- Set the dataProvider in the mxml with the Bindable var -->
<controls:Photoshow id="photoshowContainer" dataProvider="{pictures}" />
Hope this helps,
Bob I.
// ----- Original Code below...Expand messages to
// hopefully retain formatting.
// public setter for xmlSource.
// Typically called by xmlReceived when the xml file
// has been loaded, but it can be used to set the xml directly
public function set xmlSource(xml:XML):void{
var index:int = 0;
var pictures:Array = new Array();
for each( var image:XML in xml..image ) {
pictures[index] = new PhotoshowImage();
pictures[index].name = image.itemName;
pictures[index].caption = image.itemCaption;
pictures[index].width = image.itemWidth;
pictures[index].height = image.itemHeight;
index++;
}
photoshowContainer.dataProvider = pictures;
}
]]>
</mx:Script>
<controls:Photoshow id="photoshowContainer" />