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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to create user-controlled zoom? 2

Status
Not open for further replies.

flashaddict

Technical User
Oct 4, 2003
4
GB
Hi all,
glad i joined in, some very helpful posts here!:)
I want to create a flash movie where the end-user actually has zoom control over an object (movieclip?) on the stage. Ideally, this will be a slider which enlarges the mc and shrinks it down, with maybe different sliders for corresponding objects. Does anyone know how I can achieve this? A downloadable sample swf would be perfect.
Thanks for your help!
Flashaddict
 
Correction: it should be a sample .fla instead of swf .. my mistake! cheers
Flashaddict
 
Thanks, Bill!
amazing stuff... i'll see if i can play around with the code. However, it would be nice if there's a way of zooming in smaller increments, pref. with a slider... also, one control (slider) does both zooms, in & out... any thoughts?
Cheers,
Flashaddict
 
if you look at the button code

in_btn.onPress = function(){
zoomed +=10;
myPane.setContentScale(zoomed);
}

changing the value for zoomed will control the amount of zoom

easy to change so that this value is altered by a slider instead of on a button press.

let me know if you need more help
 
Hi Bill,
thanks for the help -- yes, if you could post the code for a slider that does the zooming, i'd be grateful! I'm on an upward learning curve at moment, trying to get my head around Actionscript... hopefully, i'll get there someday!
Regards
Flashaddict
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top