XML Gallery
Started by
Sumpson
, Jul 21 2006 08:58 AM
10 replies to this topic
#1
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
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
#2
Posted 21 July 2006 - 09:29 AM
put this code in after your last function has been closed:
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
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
Posted 21 July 2006 - 10:31 AM
Thanks did help allot indeed, hope someone is able to help out on the image linking too
#4
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
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
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
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
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
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
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
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
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.
eg.
stop(); function jumpframe(){ gotoAndStop(10); } setInterval(jumpframe,10000);
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users