Old 08-03-2007, 15:14   #1 (permalink)
PixelLuv
Registered User
 
Join Date: Jul 2006
Location: Dallasish
Posts: 8
Scale a symbol with AS

I need to use action script to scale and object in the viewport. all the examples of this i find use the mouse position to start the even onclick. i do want to click on the button, but i want it to zoom from where it is not where the mouse it.

an example would be a map of the US. click on Texas and it would zoom to fill the viewport.

I know I can animate that with tweens, but I really don't want to do that.

Any hints in the right direction will be appreciated.
  Reply With Quote
Old 08-03-2007, 17:13   #2 (permalink)
estazor
Registered User
 
estazor's Avatar
 
Join Date: Jan 2007
Posts: 74
Why don't you just code the width and height of it?

What exactly are you doing? Like a map type of thing or you just want to scale any movie clip?
  Reply With Quote
Old 08-03-2007, 21:36   #3 (permalink)
PixelLuv
Registered User
 
Join Date: Jul 2006
Location: Dallasish
Posts: 8
its a map of the us. i need to make each state clickable. thats not a problem. i do want them each to call some javascript as well as scale to the size of the viewport. there will also be some points plotted to each state, but thats not the scale thing.
  Reply With Quote
Old 09-03-2007, 04:16   #4 (permalink)
d*d
Moderator
 
d*d's Avatar
 
Join Date: Oct 2004
Location: Bristol
Posts: 3,299
use _xscale and _yscale to scale the symbol and use _x and _y to position it correctly, so for each state you would define variables for _x,_y and the scale. Then place them in a function which would move/enlarge the symbol to the defined variables in increments (if you half the distance each time this will have an easing in effect). Use setInterval to make it animate.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8