Hey
I have the same button several times in a loaded swf.
On release, I want this buttons to attach a “mcextra” into target x
This mcextra moves on vertical position and shows inside a jpeg.
How can I use the same code to all the buttons so I can attach the mcextra and load diferent jpeg images? I guess Ill have to set a variable calling the jpeg, isnt?
Hey guys!
I got some help from a friend and we used the following solution.
In the first frame of the main timeline we created this function:
function loadextra (i) {
// here it attaches the mc into an empty mc
_root.attachextra.attachMovie(“mcextra”, “mcextra”, 1);
// here it sets the final Y position for the attached mc
_root.attachextra.posY = 400;
// here it loads the image into “loadimg” inside mc extra
_root.attachextra.mcextra.loadimg.loadMovie ( i + “.jpg”, 1);
}
On the button action we set:
on(release) {
// call the function and set the parameter to load the img
_root.loadextra(“art/images/img” + “01”);
}
Thanks for your help!
Creating engaging and entertaining content for designers and developers since 1998.