A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Can images imported with xml be used as buttons?

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    13

    Can images imported with xml be used as buttons?

    I'm putting together a website in Flash CS4, and my Actionscript knowledge is pretty minimal. The site has a portfolio section with a scrollbar, which I modified from a downloadable example I found here: http://www.flashmo.com/preview/flash...umbnail_slider
    The prewritten code uses xml to import the thumbnails into the scrollbar- all of this is fine and working beautifully so far. What I'd like to do is to have each thumbnail act as a button, so that when clicked, you jump to another page/frame on the timeline. I see that it's very straightforward to either open a 'full' image or to go have the thumbnail take you to an html page, but is there a command that can go into the xml text that will simply take you to another spot on the timeline?

    Thanks so much for any advice!!

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    this ouldnt go anywhere in the XML file..

    XML is nothing more than text/data.. a place to STORE information for your project.. (actually its more of a way to organize/group you data...but whatever)

    think of it like a .text file.. or a database..

    it only holds the data you want/need..

    you still have to write code in your flash project to handle load and handle this data.. and then do whatever actions you want with this data..

    you might be able to add the frame number or frame label in the XML file..and then use that to jump to a certain frame in your 'timeline'.. but you still need to have the thumbnails be buttons and call the correct function to do so.

  3. #3
    Junior Member
    Join Date
    Apr 2011
    Posts
    13
    Thanks for the advice. I think, unfortunately, this is a bit beyond my Actionscript abilities at the moment.. I'll give it a shot when I have time tomorrow to focus on it and hopefully I can figure out how to write proper AS functions.
    Thanks again, I appreciate it.

  4. #4
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    believe me when I say this..

    it is only hard because you havent done it yet..

    once you do it once or twice.. you'll wonder how you ever lived without XML.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center