zoom zoom….

Thursday, July 16th, 2009 by Kiz | | Keith Morgan's Blog, teh internets | No Comments | Print This Post Print This Post

No Gravatar

Cleaning out some of my flash video player junk and ran across a basic zoom in/out function for progressive download players. Assuming your video object is the child of a sprite (videoSprite):


public function zoomincontroller(pEvent:MouseEvent):void {
//move and scale sprite
videoSprite.x -= ;
videoSprite.y -= ;
videoSprite.width += (*2);
videoSprite.height += (*2);
}
public function zoomoutcontroller(pEvent:MouseEvent):void {
//reset sprite
videoSprite.x = 0;
videoSprite.y = 0;
videoSprite.width = stage.stageWidth;
videoSprite.height = stage.stageHeight;
}

….never really got around to retooling it. The basic concept is that you scale and reposition the Sprite the video is in. Obviously you will need a high-res video for this to look like anything…

Enjoy!

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Technorati
  • TwitThis
  • Mixx
  • Google Bookmarks
  • NewsVine
  • Yahoo! Buzz
  • Reddit
  • StumbleUpon
  • Slashdot
  • LinkedIn
  • MySpace
  • email
  • Fark
  • Live
  • Ping.fm
  • RSS
  • Yahoo! Bookmarks

Tags: , , , , , , ,

No comments yet.

Leave a comment

You must be logged in to post a comment.

Find

Currently

There are no events to show at this time.

Fix