Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 15 of 15
  1. #1
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts

    image transition

    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 view the transition at www.jasongold.org

    Thanks in advance for any help.

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    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?

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    http://www.theorigin.net/view_post/111.html Here is an example. If you do this, you will be starting with a new file anyways.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #5
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    on that example it stops at 4 where i would want it to back to 1?

  • #6
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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.

  • #7
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    Thanks, i'll do the pictures in the morning and then report back.
    Last edited by j05hr; 11-07-2008 at 03:28 AM.

  • #8
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    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?

  • #9
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    You need the XML2Object script that it talks about, follow that link and add that to flash first.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #10
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    this confuses me soo much, would it be possible to break it down into exactly what i need for example

    in the xml i need...

    in the .fla i need...

    i downloaded the XML2Object script and no idea how to use/where to put it

    thanks for the help

  • #11
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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.

  • #12
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    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)
    }

  • #13
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Yes, assuming that you also installed the extension like I described, that should be the method of importing the library for use. Does it function?
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #14
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    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.

    I now would like to make my gallery an xml file so my client will be able to add photos himself. Do you know of any tutorials of a gallery like this (http://www.softsia.com/FlexiGallery-...nload-wbkt.htm)

    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.

    Thanks a lot for all your help.

  • #15
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •