|
-
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
-
Try and find a tutorial for AS2?
gparis
-
-
Good. AS2 and AS3 are very different.
gparis
-
-
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?
-
What do you mean by "changing the void"?
gparis
-
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.
-
Do you know how to write button actions in AS 2.0?
gparis
-
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.
-
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
-
Senior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|