A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Creating an image gallery using AS2

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    7

    Question Creating an image gallery using AS2

    Hi,

    I did this tutorial just fine in as3 and worked out well. But recently I had to switch my project from as3 to as2 to link buttons to scenes. Now I have a ton of compiler errors from the switch. I was wondering if I can still make this tutorial work out for me in as2, if so what do I have to change?

    http://www.youtube.com/watch?v=7mdJeGt_v0Y

    Heres some of the scripting I did from the tutorial in my project.

    stop();

    btn1.addEventListener(MouseEvent.CLICK,play1);

    function play1(event:MouseEvent):void{
    gotoAndStop("totem");
    }
    btn2.addEventListener(MouseEvent.CLICK,play2);

    function play2(event:MouseEvent):void{
    gotoAndStop("eyeball");
    }

    Thanks a mill!

    Nichole

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Try and find a tutorial for AS2?

    gparis

  3. #3
    Junior Member
    Join Date
    Jul 2010
    Posts
    7
    Yea I have tried that.

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Good. AS2 and AS3 are very different.

    gparis

  5. #5
    Junior Member
    Join Date
    Jul 2010
    Posts
    1
    Thanks ........

  6. #6
    Junior Member
    Join Date
    Jul 2010
    Posts
    7
    No as in I've tried looking for a tutorial similar to the previous one but in AS2 and have not found one. Should I be changing the void in the script?

  7. #7
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    What do you mean by "changing the void"?

    gparis

  8. #8
    Junior Member
    Join Date
    Jul 2010
    Posts
    7
    When I look at my compiler errors it take me to the line with void in it.

    Basically I'm trying to find out how to link my thumbnail buttons to my main image on the stage. So that the user can click on the thumbnail and see the image.

    With that tutorial I could accomplish this, so I'm trying to find another way but in AS2.

  9. #9
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Do you know how to write button actions in AS 2.0?

    gparis

  10. #10
    Junior Member
    Join Date
    Jul 2010
    Posts
    7
    No I kind of just got thrown into this website class and I'm not that familiar with flash let a lone scripting at all.

  11. #11
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    I doubt you'll be able to translate AS3 into genuine AS2 then, it'd be like trying to translate japanese into cantonese when speaking neither of those languages.. I strongly suggest you find an AS 2 tutorial. There are tons. Google "Actionscript 2.0 image gallery".

    gparis

  12. #12
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    Have you tried something like this for your AS buttons?

    this will only work if these are AS2.0 BUTTON COMPONENTS on the stage though..

    Code:
    var btn1_litenerObject:Object = new Object();
    btn1_litenerObject.click = function(eventObj:Object){
        gotoAndStop("totem");
    };
    btn1.addEventListener("click", btn1_litenerObject);
    
    var btn2_litenerObject:Object = new Object();
    btn2_litenerObject.click = function(eventObj:Object){
        gotoAndStop("eyeball");
    };
    btn2.addEventListener("click", btn2_litenerObject);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center