Jump to content


Photo

XML Gallery


  • Please log in to reply
10 replies to this topic

#1 Sumpson

Sumpson

    Young Padawan

  • Members
  • Pip
  • 32 posts
  • Gender:Male

Posted 21 July 2006 - 08:58 AM

Hello there, I am working on a project where I need to load images by XML, they should switch after 10 seconds, change when pressing the < > buttons and be able to have a link.

I currently have images loaded by XML and when pressing the < or > button switching to previous/next image. so what I need to add is: being able to link the images, and have them switch automaticly after 10 seconds.

This is what I got so far: www.desiredesign.org/SSMarketing/banner/banners.html

Here you can have a look at the XML file: www.desiredesign.org/SSMarketing/banner/banners.xml
and the FLA file: www.desiredesign.org/SSMarketing/banner/banners.fla

I really hope someone will be able to help me out :o

#2 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 21 July 2006 - 09:29 AM

put this code in after your last function has been closed:

setInterval(nextImage,1000);

with this you calling the function nextImage every 1000ms (1sec), if you want to change the image in 10secs, then just use 10000

hope this helps

funkysoul

#3 Sumpson

Sumpson

    Young Padawan

  • Members
  • Pip
  • 32 posts
  • Gender:Male

Posted 21 July 2006 - 10:31 AM

Thanks did help allot indeed, hope someone is able to help out on the image linking too :o

#4 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 21 July 2006 - 03:49 PM

what do you mean exactly with:

I need to add is: being able to link the images, and have them switch automaticly after 10 seconds.



#5 Sumpson

Sumpson

    Young Padawan

  • Members
  • Pip
  • 32 posts
  • Gender:Male

Posted 21 July 2006 - 04:23 PM

When you go to www.desiredesign.org/SSMarketing/banner/banners.html you will see it has different images and you are able to switch them, each image should be clickable and have a link (+target), this should be possible to add in the XML but I have no idea how to do this I hope someone here does.

#6 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 21 July 2006 - 08:36 PM

what about adding an extra node to each picture with a link on it, and assign the value of that link like you did with the image, to the corresponding picture?

#7 Sumpson

Sumpson

    Young Padawan

  • Members
  • Pip
  • 32 posts
  • Gender:Male

Posted 22 July 2006 - 09:07 AM

I don't really know how I could do this, I have no created the current code used but got it from a tutorial.

#8 Wowzers

Wowzers

    Young Padawan

  • Members
  • Pip
  • 40 posts

Posted 23 July 2006 - 08:23 AM

can you use that set interval thing on other things? Like having it go back to frame 1 after like 10 seconds on anything?

#9 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 24 July 2006 - 07:04 AM

Sumpson: I've wrote a not so bad tutorial over at twodded ( the ladybug upthere) about xml basics, and if you also go through the first mp3 player tutorial you will get an idea on how to do it -_-

Wowzers: Yeh you can use the setInterval for almost everything, also for framejumping.. but keep in mind to delete the Interval as soon as it's done, otherwise it will jump every xxms to a frame :)

#10 Wowzers

Wowzers

    Young Padawan

  • Members
  • Pip
  • 40 posts

Posted 25 July 2006 - 11:52 AM

Really? I tried altering it so it would work on this ad I made, But I guess I didn't do it right, I wanted the ad to reply but after like 10 seconds, and I didnt want to do it by adding like 150 frames and having it go through them.

#11 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 26 July 2006 - 08:29 AM

I just did a small test, and everything worked fine for me.. just keep your maincode in the firstframe.

eg.

stop();
function jumpframe(){
gotoAndStop(10);
}
setInterval(jumpframe,10000);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users