Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Make A Zoom Button With Flash MX?? 1

Status
Not open for further replies.

klear

Technical User
Mar 10, 2003
16
US
How Do I Make A Zoom Button Using Flash MX?? Do I Need Any Scripts? If You Have One Made Can You Contact Me @ Rykk00@yahoo.com

Thanks In Advance
 
what exactly do you mean by a zoom button?
making the button bigger on clicking it; zooming into an image on clicking it,...? regards

Firegambler
 
I wanted to enlarge it by clicking on it
to have it zoom out would also be good if anyone has the information on how to do so....
 
i'd try the following:

put this script on the instance of the button

on(release){
this._xscale+=10;
this._yscale+=10;
}


this way you'll get the button 10% bigger everytime you click it. i hope that's what you were looking for. regards

Firegambler
 
Thanks i got the zoom to work but i have another problem. the problem is i want to specify a certain area that i want to zoom. How would i do that? (any code would be greatly appreciated (firegambler))
once again thanks in advance.
 
oh i forgot to mention when i zoom my buttons grow with the zoom. i've tried inserting the buttons into another layer but it doesn't work. any help is greatly appreciated
thanks again in advance.
 
so do you want to zoom the button or part of the button or some other object when you click the button? sorry, but i couldn't quite get that out of your thread. regards

Firegambler
 
okay thanks firegambler for your reply i didnt specify enough. wat i want to do is have a zoom button that when i press makes an image small but in doing so the zoom button stays the same size and place. i want to have like a box with the image and the zoom button outside of it so the button doesn't get larger with the click only the image.
 
ah, ok, i understand now.

try this:

put the image on the stage and convert it into a movieclip (press f8 and select moveiclip).
then select the movieclip on the stage and give it a name in the properties-inspector (when the clip is selected its on the top-left of the inspector).
for this example i give it the name imageclip1

then you'll need a button (i guess you already know how to do that ;-) ) on the button you put this script:

on(release){
_root.imageclip1._xscale+=10;
_root.imageclip1._yscale+=10;
}

the number after the "=" determins for how many percent the movieclip containing the picture will grow.
Make sure that both (the button and the movieclip containing the image) are on the main timeline.
if you select both and convert them into a movieclip you'll have to use _parent instead of _root since _root adresses the main timeline. generally you'll have to keep an eye on the path to the movieclips you want to work with but thats not the topic of this thread. :)

u know, just put another comment if my explanation was not sufficient, it occurs from time to time that my elaborations are rather intransparent ;-)
regards

Firegambler
 
Thanks i got the zoom to work but i have another problem. the problem is i want to specify a certain area that i want to zoom. How would i do that? (any code would be greatly appreciated (firegambler))
once again thanks in advance.

 
Thanks to all who helped and gave their input. everything helped in it's own way. thanks especially to firegambler who was key in helping. i have the flash working now and i want to thank all who helped again :)

sincerely
klear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top