Need a script to zoom in on mouse click / over in flash mx.
Pls do reply soon.
thanks
Need a script to zoom in on mouse click / over in flash mx.
Pls do reply soon.
thanks
Short answer: both quick approaches shown in the thread will work for a prototype, but the cleaner, more robust result comes from putting the graphic inside its own MovieClip and animating its scale with easing rather than repeatedly nudging pixel width/height. offers the simplest immediate tweak and @GreenDay2001 rightly points out doing the work at the clip level — those approaches teach the idea, but for production you want a single timed tween so transforms do not accumulate, jitter, or badly upscale bitmaps.
Practical workflow you can apply right away:
Quick tips and cautions: preload a full-resolution source to avoid pixelation when enlarging raster artwork; avoid scaling live text if you need crisp type (convert to graphics or use higher font sizes); do not rely on bitmap-caching for clips you are actively rescaling (it can make quality worse); temporarily increasing Stage.quality during the animation can improve visual results at the cost of CPU. If you state which Flash MX/AS2 release and whether you want hover or click behavior, a compact AS2 example using the built-in tween class can be posted.
Jump to Post— hussulinux 0You can try something like:
on(rollover){ image.width = image.widht + 10; image.height = image.height + 10; } on (rollout){ image.width = image.widht - 10; image.height = image.height - 10; }
You can try something like:
on(rollover){
image.width = image.widht + 10;
image.height = image.height + 10;
}
on (rollout){
image.width = image.widht - 10;
image.height = image.height - 10;
}
You can try something like:
on(rollover){ image.width = image.widht + 10; image.height = image.height + 10; } on (rollout){ image.width = image.widht - 10; image.height = image.height - 10; }
This would work until you have set noScale property to no. Better would be using MovieClip._height or MovieClip._height where movie clip would be replaced by the clip instance name or _root for whole movie. You could also use _xscale or _yscale properties if you want relative zoom.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.