I need help with Flash Multiple getURL's

  • dgroup1
  • Born
  • Born
  • dgroup1
  • Posts: 1

Post 3+ Months Ago

I have a carousel gallery with 14 small images
The first large image I have linked to a html page successfully.
How do I link the rest of the images to different html pages in my site?
Right now they all link to the same page.
I have used this script:

ACTIONSCRIPT Code: [ Select ]
mcLoader.addListener(loadListener);
   mcLoader.loadClip(images[i], innner);
   
   inner.onRelease = function() {
      getURL("http://www.mysite/mypage","_blank","GET");
  1. mcLoader.addListener(loadListener);
  2.    mcLoader.loadClip(images[i], innner);
  3.    
  4.    inner.onRelease = function() {
  5.       getURL("http://www.mysite/mypage","_blank","GET");


Do I have to number each link and write corresponding script?
This is probably something simple, any help would be appreciated.
Thanks
dgroup
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

In this situations, usually you keep track of the current loaded image index.
So let's say you have
images = Array("img1.jpg", "img2.jpg", ... "img14.jpg"); // or however you build it.
Next add a new array
var imagesTargetURL:Array = new Array("http://www.google.com", "http://www.yahoo.com", .... );
and then your code:
Code: [ Select ]
mcLoader.addListener(loadListener);
innner.currentIndex = i;
mcLoader.loadClip(images[i], innner);
inner.onRelease = function()
{
 getURL(imagesTargetURL[this.currentIndex],"_blank","GET");
}
  1. mcLoader.addListener(loadListener);
  2. innner.currentIndex = i;
  3. mcLoader.loadClip(images[i], innner);
  4. inner.onRelease = function()
  5. {
  6.  getURL(imagesTargetURL[this.currentIndex],"_blank","GET");
  7. }

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.