Hi all.
Building my first flash site ever, and still struggling…
especially with the easy stuff!
Im buiding a little image gallery type thing, hich has about 100 buttons, all identical, but ive named them differnetly (obviously).
What i want to know is this:
All of these buttons do exactly the same function (load a jpeg), but vary in their name and in the name of the jpeg they load… so rather than writing out the same function 100 times, how can i do this with variables??
i know it must be easy, but my head hurts already, and i just cant get my head round it.
my code:
btnAdv1.onRelease = function(){
createEmptyMovieClip(“holder”, 100);
holder.loadMovie(“adv1.jpg”);
holder._x = 0;
holder._y = 0;
}
btnAdv2.onRelease = function(){
createEmptyMovieClip(“holder”, 100);
holder.loadMovie(“adv2.jpg”);
holder._x = 0;
holder._y = 0;
}
etc.etc. - as you can see all that changes is the name of btnAdvX and the image, advX.jpeg
any help would be appreciated