Skip to main content
Known Participant
July 4, 2010
Answered

Loading XML generated image scroller

  • July 4, 2010
  • 2 replies
  • 5938 views

I need some help. I am have a button on my main.fla that loads an image scroller that is conected to an XML file.

I can post the code for the button, or the code from the swf i'm trying to load.

I am getting this error message:

loading xml from: Mixed-Media-Thumbs.xml
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:

/Mixed-Media-Thumbs.xml
at mixed_media_fla::MainTimeline/frame1()

This topic has been closed for replies.
Correct answer kglad

then add your loader to:

MovieClip(root);

instead of the default timeline.


this should get your default image to load.  then you can work on the next problem.

var Xpos:Number = 275;
var Ypos:Number =   180;
var jpg:MovieClip;
var loader:Loader = new Loader();

var defaultIMAGE:URLRequest = new   URLRequest("swfs/mixed_media/one.jpg");

loader.load(defaultIMAGE);
loader.x =Xpos;
loader.y   =Ypos;
MovieClip(root).addChild(loader);
///////////////////////////////////////////////////////////////////

//Btns Universal function

function  btnClick(event:MouseEvent):void{
var newJPGRequest:URLRequest = new   URLRequest("swfs/mixed_media/"+event.target.name+".jpg");
loader.load(newJPGRequest);
}


//Btn Listeners
one.addEventListener(MouseEvent.CLICK,   btnClick);
two.addEventListener(MouseEvent.CLICK, btnClick);
three.addEventListener(MouseEvent.CLICK,   btnClick);
four.addEventListener(MouseEvent.CLICK, btnClick);
five.addEventListener(MouseEvent.CLICK,   btnClick);
six.addEventListener(MouseEvent.CLICK, btnClick);

2 replies

Known Participant
July 6, 2010

ioerror means probably can not find the file it is trying to read. server is down, there is no script with that name, etc

kglad
Community Expert
Community Expert
July 6, 2010

we're already past that part.

read his most recent post if you want to help with the most recent problem.

Known Participant
July 6, 2010

Ok. I have abandoned that scroller for now. Its a bit above my head. Instead I have made a simple scrollpane with components in flash. I have thumbnails in a movie that is linked to the scrollpane and I have made each one a button. But I am not able to get the larger version load when I test the movie and click on one of the thumbnails. Here is the code I have put into the movie that is linked to the scrollpane:

var Xpos:Number = 275;
var Ypos:Number = 180;
var jpg:MovieClip;
var loader:Loader = new Loader();

var defaultIMAGE:URLRequest = new URLRequest("swfs/mixed_media/one.jpg");

loader.load(defaultIMAGE);
loader.x =Xpos;
loader.y =Ypos;
addChild(loader);
///////////////////////////////////////////////////////////////////

//Btns Universal function
function btnClick(event:MouseEvent):void{

removeChild(loader);
var newJPGRequest:URLRequest = new URLRequest("swfs/mixed_media/"+event.target.name+".jpg");
loader.load(newJPGRequest);
loader.x =Xpos;
loader.y =Ypos;
addChild(loader);
}
//Btn Listeners
one.addEventListener(MouseEvent.CLICK, btnClick);
two.addEventListener(MouseEvent.CLICK, btnClick);
three.addEventListener(MouseEvent.CLICK, btnClick);
four.addEventListener(MouseEvent.CLICK, btnClick);
five.addEventListener(MouseEvent.CLICK, btnClick);
six.addEventListener(MouseEvent.CLICK, btnClick);

kglad
Community Expert
Community Expert
July 4, 2010

you probably have an incorrect path and/or file name.

Known Participant
July 5, 2010

I got the part of the image scroller to load into my main.fla

But, it is only loading the images and the mouse over effect. It is missing the background and it is not contained. The original image scroller is 400 x 150 pixels. And you can only see four of the thumbnail images in the scroller at one time. But when it is loaded in to my main.fla you can see all the thumbnails and the container and background are missing.

kglad
Community Expert
Community Expert
July 5, 2010

1.  where's the background?  is that loaded into your scroller swf?

2.  you're using a mask in your scroller swf?  if yes, where's the mask and how are you assigning the mask?