Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorphilips
    • CommentTimeDec 4th 2006
     
    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 !
    • CommentAuthorjustnajm
    • CommentTimeDec 10th 2006
     
    Hi,

    I hope you know that movieclip does not provide such capability of mouse events as compare to buttons, as if you use the code:

    onClipEvent(mouseDown){
      gotoAndPlay("Scene 2", 1);
    }

    it will play the scene even if you click anywhere on the current scene or any other object.

    But the solution is little tricky,
    1. Create a movieclip with very small dot that should not be visible to user.
    2. Put it on the main scene and on first frame put the code:

    dot.startDrag(true);

    3. In movie clip ClipEvent put the following code to acheive the purpose:

    onClipEvent(mouseDown){
        if(hitTest(_root.dot)){
            gotoAndPlay("Scene 2", 1);
        }
    }