So i have an image transition on my site. When you go on the site, it jaggers and sort of lags, is there a way to fix this or is it because the file is too big or something?
Also the last image in the transition (the only black and white one) doesn't restart from the beginning how i want it to. Is there something i can do on the timeline or some actionscript i can use to make it rotate like the rest of the images?
You can have it restart by putting this code in the actions panel on the last frame which will restart the flash file from the start. I don't think this is the issue though.
Code:
gotoAndPlay(1);
How did you make the player, and how large are the images? The SWF is 224 kb, which is a bit large to load over slower connections. But after it is loaded it runs normally.
Maybe a solution is to have it setup as an XML image gallery, so the images are not directly embedded in the SWF.
__________________
jeremy - gnomeontherun Educated questions often get educated answers, and simple questions often get simple answers.
I'll try the code later although i don't think it will solve the case either, what i want it to do is carry on playing from the beginning as if it hasn't got to the end?
I'm not sure of the size of the images as i haven't got them at the moment with me. I made the player by using motion tween to fade images in and out overlapping each other using the alpha color function.
How would i go about loading it as an XML rather than embedded?
Once you have it working, I can help add the missing code to repeat. It basically just requires to modify so that it resets the counter and starts again.
__________________
jeremy - gnomeontherun Educated questions often get educated answers, and simple questions often get simple answers.
i've been looking at this this morning. I downloaded the zip version but the images don't load when i go to view it. Is there something i need to change or is it just broken?
You have to add it using the Extension Manager by Macromedia or Adobe, depending on which version you have. So open the Extension Manager, Add it, and then the code should function.
__________________
jeremy - gnomeontherun Educated questions often get educated answers, and simple questions often get simple answers.
is this the right code that i should be adding for it?
Code:
/**
* How to use the XML2Object class
* in order to convert XML files into
* AS native objects
*/
// import the class. you need to install first
// the .mxp file provided with the zip, using the
// Macromedia Extension Manager
import it.sephiroth.XML2Object
// xml file for the test
xmlFile = "./test.xml"
// now load the XML using the classic
// XML class
myXML = new XML();
myXML.load(xmlFile);
myXML.onLoad = function(){
trace("XML loaded");
// now initialize the XML2Object class
var xml_loader:XML2Object = new XML2Object();
// get the native flash object using the parseXML method, and
// passing the XML itself as argument
as2obj = xml_loader.parseXML(this);
// let's parse the Object now...
// if a node is multiple it will be traslated as an Array, like the
// IMAGE tag of the XML file
trace("Image 1: " add as2obj.MAIN.IMAGE[0].data add ", with ID: " add as2obj.MAIN.IMAGE[0].attributes.id)
trace("Image 2: " add as2obj.MAIN.IMAGE[1].data add ", with ID: " add as2obj.MAIN.IMAGE[1].attributes.id)
// some other tag
trace("TEXT: ")
trace(as2obj.MAIN.TEXT.ID.data)
trace(as2obj.MAIN.TEXT.ALT[0].data)
trace(as2obj.MAIN.TEXT.ALT[1].data)
}/**
* How to use the XML2Object class
* in order to convert XML files into
* AS native objects
*/
// import the class. you need to install first
// the .mxp file provided with the zip, using the
// Macromedia Extension Manager
import it.sephiroth.XML2Object
// xml file for the test
xmlFile = "./test.xml"
// now load the XML using the classic
// XML class
myXML = new XML();
myXML.load(xmlFile);
myXML.onLoad = function(){
trace("XML loaded");
// now initialize the XML2Object class
var xml_loader:XML2Object = new XML2Object();
// get the native flash object using the parseXML method, and
// passing the XML itself as argument
as2obj = xml_loader.parseXML(this);
// let's parse the Object now...
// if a node is multiple it will be traslated as an Array, like the
// IMAGE tag of the XML file
trace("Image 1: " add as2obj.MAIN.IMAGE[0].data add ", with ID: " add as2obj.MAIN.IMAGE[0].attributes.id)
trace("Image 2: " add as2obj.MAIN.IMAGE[1].data add ", with ID: " add as2obj.MAIN.IMAGE[1].attributes.id)
// some other tag
trace("TEXT: ")
trace(as2obj.MAIN.TEXT.ID.data)
trace(as2obj.MAIN.TEXT.ALT[0].data)
trace(as2obj.MAIN.TEXT.ALT[1].data)
}
I installed the exstension but didn't really play with it enough as i found another one that seems to work ok (www.jasongold.org) I do want to have a proper go at yours when i finish the project and get some free time as this whole process is all about learning.
So i can learn how to do something along the same lines. The gallery has to have thumbnails. Have a slider on the thumnails and not play automatically.
There are many out there, and honestly I don't know which are best. There is a link in my signature to good sites, and things on the site are likely to be good quality (which some things you find via Google might not). That way you find a tutorial that you feel comfortable tackling instead of one that I post which may not be exactly what you need.
As always, if you struggle you can post!
__________________
jeremy - gnomeontherun Educated questions often get educated answers, and simple questions often get simple answers.