Can I give link to movieclip

  • sanjay
  • Born
  • Born
  • sanjay
  • Posts: 2

Post 3+ Months Ago

Hi,
I had displayed images on movieclip using duplicateMovieclip
from array like this

list=["a.jpg","b.jpg","c.jpg","d.jpg"];
amount = 5;
var j=10;
var i=0;

while (amount>0) {
duplicateMovieClip (_root.flower, "bb"+i, i);
setProperty ("bb"+i, _x, j+2);
loadMovie(list[i],"bb"+i);
setProperty ("bb"+i, _y, 10);
var ss="bb"+i;
i++;
j=j+50;
amount--;
}

Now I want to give different links to each image thats why it will redirect to different scene.
Is it possible?
If yes please help me I am sticked on this point from 3 hours

Thanks in advance !
  • 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

Code: [ Select ]
urlList = ("http://url1.com", "http://url2.com", "http://url3.com", "http://url4.com");
.... // your code here, untill while
while (amount>0) {

duplicateMovieClip (_root.flower, "bb"+i, i);
this["bb"+i].onRelease = function()
{
   getURL(urlList[i])
}
.... // rest of your code here
  1. urlList = ("http://url1.com", "http://url2.com", "http://url3.com", "http://url4.com");
  2. .... // your code here, untill while
  3. while (amount>0) {
  4. duplicateMovieClip (_root.flower, "bb"+i, i);
  5. this["bb"+i].onRelease = function()
  6. {
  7.    getURL(urlList[i])
  8. }
  9. .... // rest of your code here
  • sanjay
  • Born
  • Born
  • sanjay
  • Posts: 2

Post 3+ Months Ago

Thank u for help but its not working
I am not much familier wiyh flash so please tell if anything wrong.
Thanx


stop();
list=["a.jpg","b.jpg","c.jpg","d.jpg"];
urlList = ("http://url1.com", "http://url2.com", "http://url3.com", "http://url4.com");
list=["a.jpg","b.jpg","c.jpg","d.jpg"];
amount = 5;
var j=10;
var i=0;

while (amount>0) {
duplicateMovieClip (_root.flower, "bb"+i, i);
setProperty ("bb"+i, _x, j+2);
loadMovie(list[i],"bb"+i);
this["bb"+i].onRelease = function()
{
getURL(urlList[i]);
}
setProperty ("bb"+i, _y, 10);
var ss="bb"+i;
i++;
j=j+50;
amount--;
}
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

also you're not familiar with the ozzu rules.
1) write your code inside a code tag
well, next step:
2) why you duplicate a movie clip if just after that you load something inside it? you could use createEmptyMovieClip instead.
well, never mind.


Code: [ Select ]
stop();
jumpList = ("frame1", "frame2", "frame3", "frame4");
list=["a.jpg","b.jpg","c.jpg","d.jpg"];
amount = 5;
var j=10;
var i=0;

while (amount>0)
{
    this.duplicateMovieClip("flower", "bb"+i, i);
    this["bb"+i]._x = j+2;
    this["bb"+i]._y = 10;
    var ss="bb"+i;    
    j=j+50;
    amount--;
    this["bb"+i].loadMovie(list[i]);
    this["bb"+i].onRelease = function()
    {
        this._parent.gotoAndPlay(jumpList[i]);
    }
    i++;
}
  1. stop();
  2. jumpList = ("frame1", "frame2", "frame3", "frame4");
  3. list=["a.jpg","b.jpg","c.jpg","d.jpg"];
  4. amount = 5;
  5. var j=10;
  6. var i=0;
  7. while (amount>0)
  8. {
  9.     this.duplicateMovieClip("flower", "bb"+i, i);
  10.     this["bb"+i]._x = j+2;
  11.     this["bb"+i]._y = 10;
  12.     var ss="bb"+i;    
  13.     j=j+50;
  14.     amount--;
  15.     this["bb"+i].loadMovie(list[i]);
  16.     this["bb"+i].onRelease = function()
  17.     {
  18.         this._parent.gotoAndPlay(jumpList[i]);
  19.     }
  20.     i++;
  21. }

p.s.: frame1, frame2, frame3, frame4 or however you want to name them, must be name of the frames where you want the movie to play. also, dont use scenes, use movieclips instead.

Post Information

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

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