In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

Panning + Tits

Monica Fonseca
By Ctrl
http://ctrlcodes.com
March 2010
Inspired By: http://www.soho.com.co/wf_InfoGaleriasMujeres.aspx?IdGal=550
Get Adobe Flash player
by Ctrl 08 Mar 2011
/**
 * Copyright Ctrl ( http://wonderfl.net/user/Ctrl )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/qIkE
 */

// forked from Ctrl's Monica Fonseca + Panning
// Monica Fonseca
// By Ctrl
// http://ctrlcodes.com
// March 2010
// Inspired By: http://www.soho.com.co/wf_InfoGaleriasMujeres.aspx?IdGal=550

package 
{
    import flash.display.AVM1Movie;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    import gs.*;
    
    [SWF(frameRate="4", backgroundColor="0")]
    
    public class MonicaFonseca extends Sprite
    {
        
        private var url2:String = "http://soho.com.co/upload/images/2008/10/6/17461_103831_7.jpg";
        private var url4:String = "http://soho.com.co/upload/images/2008/10/6/17457_103831_7.jpg";
        private var url5:String = "http://soho.com.co/upload/images/2008/10/6/17457_103831_7.jpg";
        private var loader:Loader;
        private var loader2:Loader = new Loader();
        
        public function MonicaFonseca()
        {            
            loader2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadPic2);
            loader2.load(new URLRequest(url2));
            addChild(loader2);
                        
            loader = new Loader();
            addChild(loader);
        }
        
        private function loadPic2(e:Event):void
        {    
            loader2.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadPic2);
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadPic3);
            loader.load(new URLRequest(url4));
        }
        
        private function loadPic3(e:Event):void
        {
            loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadPic3);
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, startLoop);
            loader.load(new URLRequest(url5));
        }
        
        private function startLoop(e:Event):void
        {
            loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, startLoop);
            loader.addEventListener(MouseEvent.CLICK, switchOnOff);
            addEventListener(Event.ENTER_FRAME, loop);
        }
                
        private function switchOnOff(e:MouseEvent):void
        {
            if(hasEventListener(Event.ENTER_FRAME)) 
            {
                removeEventListener(Event.ENTER_FRAME, loop);
                TweenLite.to(loader, 1, {x:0, y:0});
                TweenLite.to(loader2, 1, {x:0, y:0});
            }
            else
            {
                addEventListener(Event.ENTER_FRAME, loop);
            }
        }
        
        private function loop(e:Event):void
        {
            if(loader.visible)
            {
                loader.visible = false;
            }
            
            else
            {
                loader.visible = true;
            } 
            
            TweenLite.to(loader, 1, {x:-mouseX, y:-mouseY});
            TweenLite.to(loader2, 1, {x:-mouseX, y:-mouseY});
            
            if(loader.x < -40)
            {
                loader.x = -40;
                loader2.x = -40;
            }
            
            if(loader.y <= -200)
            {
                loader.y = -200;
                loader2.y = -200;
            }
        }
    }
}