I need help with Flash Multiple getURL's

  • dgroup1
  • Born
  • Born
  • No Avatar
  • Joined: Mar 26, 2011
  • Posts: 1
  • Status: Offline

Post March 26th, 2011, 8:54 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 26th, 2011, 8:54 am

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post April 4th, 2011, 4:00 am

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. }
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 34 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.