The Burned Out Hippy - Hugging Flash into Submission

Archive for the Actionscript 2 category

Google Chrome, Flash Debugger and Tracing in the browser

Yesterday I was trying to test a fullscreen button on a video player and realised that I couldn’t unless it was inside a browser window. Unfortunately this meant that I would have no way to view traced results, so I installed Vizzy, a browser app that allows you to view flash traces whilst viewing your flash in a browser.

I’ve known about Vizzy for a while, but I’ve previously had no real need for it and when I’ve tried to install it in the past it didn’t seem to work with Chrome (my current browser of choice) so it was uninstalled pretty quickly. But this time I had no choice but to get it working – and as it turns out, the solution was pretty simple… More

Post to Twitter Post to Facebook Post to StumbleUpon Post to Digg

Maintaining Aspect Ratio

When manipulating large images for backgrounds or full-screen image galleries, one of the most common problems that I’ve encountered is maintaining the image’s aspect ratio on resize. Especially so if I’m playing with a dynamically fed gallery that contains images of different size ratios.

So here’s the solution to your woes. It’s one that’s worth saving to one side as a “copy and paste solution”. Increase the height of the image (or movieclip) to the size that you want it to be and then apply the following line of script…

(AS3)

mc.scaleX > mc.scaleY ? mc.scaleY = mc.scaleX : mc.scaleX = mc.scaleY;

(AS2)

mc._xscale > mc._yscale ? mc._yscale = mc._xscale : mc._xscale = mc._yscale;

(“mc” of course should be replaced with the target of your image or movieclip)

Hope that helps!

Post to Twitter Post to Facebook Post to StumbleUpon Post to Digg

Recent Posts
Recent Comments
About Us
mimi: You are totally freaking awesome. This did the trick....
The Hippy: I'm pretty sure that Orange are aware of it, but I'm not entirely sure as to the reas...
Headboy_Roy: After speaking to Orange for an hour and then doing the same with HTC, I used Google ...
The Hippy: You're very welcome. Glad to be of help....

This site is the playground of the The Burned Out Hippy, head honcho of the web design and multimedia company Plagro. It serves no other purpose than to act as a place where I can store my most recent Flash ActionScript experiments. However, I will be posting code whenever an experiment is complete so that you can have a play with it yourselves.

Read more about The Burned Out Hippy...