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

forked from: Progression4.xに追加してほしいことー!forked from: Progression4 Professional

がんばってみた!iPhoneを表示させるところ、本当はgetResourceByIdを使いたかったんだけど、
なぜかできなかった(?)のでloaderで力技でやってみました。
あと単純にaddChild()してるだけなので、もどれなくなっちゃいました。
oshigeさんのコードを参考にして書き換えました。戻れるようになったよ!
/**
 * Copyright roll.sagawa ( http://wonderfl.net/user/roll.sagawa )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/7Opy
 */

// forked from alternadotin's Progression4.xに追加してほしいことー!forked from: Progression4 Professional
// forked from oshige's forked from: Progression4.xに追加してほしいことー!forked from: Progression4 Professional
// forked from izm_design's Progression4.xに追加してほしいことー!forked from: Progression4 Professional
//がんばってみた!iPhoneを表示させるところ、本当はgetResourceByIdを使いたかったんだけど、
//なぜかできなかった(?)のでloaderで力技でやってみました。

//あと単純にaddChild()してるだけなので、もどれなくなっちゃいました。

//oshigeさんのコードを参考にして書き換えました。戻れるようになったよ!

// forked from checkmate's Progression4 Professional
// forked from test_doke's flash on 2009-9-29
package {
    
        import caurina.transitions.Equations;
        
        import flash.display.*;
        import flash.net.URLRequest;
        
        import jp.progression.*;
        import jp.progression.casts.*;
        import jp.progression.commands.*;
        import jp.progression.commands.display.*;
        import jp.progression.commands.lists.*;
        import jp.progression.commands.net.*;
        import jp.progression.commands.tweens.*;
        
        [SWF( width=465, height=465, backgroundColor=0xFFFFFF, frameRate=30 )]
        public class Professional extends Sprite {
                public var manager:Progression, self:Professional;
                
                // Graphics
                public var scene1_Balloon1:MovieClip, scene1_Balloon2:MovieClip, scene1_Brother:MovieClip;
                public var scene2_Brother:MovieClip, scene2_Shout:MovieClip;
                public var scene3_Brother:MovieClip, scene3_CutIn1:MovieClip, scene3_CutIn2:MovieClip, scene3_SE:MovieClip, scene3_Sister:MovieClip;
                public var scene4_Balloon:MovieClip, scene4_Brother:MovieClip, scene4_Sister:MovieClip;
                
                public var container:CastSprite;
                public var container2:CastSprite;
                public var sp:Sprite;
                private var loader:Loader;
                
                // First Scene
                public function introduction():void {
                        manager.current.addCommand(
                                new RemoveAllChildren( container ),
                                [
                                        [
                                                new Prop( scene1_Brother, { y:435 } ),
                                                new AddChild( container, scene1_Brother ),
                                                new DoTweener( scene1_Brother, { y:335, time:7 } )
                                        ],
                                        [
                                                1,
                                                new Prop( scene1_Balloon1, { alpha:0 } ),
                                                new AddChild( container, scene1_Balloon1 ),
                                                new DoTweener( scene1_Balloon1, { alpha:1, time:1 } )
                                        ],
                                        [
                                                2,
                                                new Prop( scene1_Balloon2, { alpha:0 } ),
                                                new AddChild( container, scene1_Balloon2 ),
                                                new DoTweener( scene1_Balloon2, { alpha:1, time:1 } )
                                        ]
                                ]
                        );
                }

                // Second Scene
                public function development():void {
                        manager.current.addCommand(
                                new RemoveAllChildren( container ),
                                [
                                        [
                                                new Prop( scene2_Brother, { scaleX:0.3, scaleY:0.3 } ),
                                                new AddChild( container, scene2_Brother ),
                                                new DoTweener( scene2_Brother, { scaleX:1, scaleY:1, time:1, transition:Equations.easeOutElastic } )
                                        ],
                                        [
                                                0.1,
                                                new Prop( scene2_Shout, { scaleX:0.3, scaleY:0.3 } ),
                                                new AddChild( container, scene2_Shout ),
                                                new DoTweener( scene2_Shout, { scaleX:1, scaleY:1, time:1, transition:Equations.easeOutElastic } )
                                        ]
                                ]
                        );
                }

                // Third Scene
                public function turn():void {
                        manager.current.addCommand(
                                [
                                        [
                                                new RemoveAllChildren( container ),
                                                new RemoveAllChildren( container2 ),
                                                new Prop(container, { x:0, y:0, scaleX:1, scaleY:1}),
                                                new Prop(sp,        { x:0, y:0, scaleX:1, scaleY:1})
                                        ],
                                        [
                                                new Prop( scene3_Brother, { x:130, scaleX:0.7, scaleY:0.7 } ),
                                                new AddChild( container, scene3_Brother ),
                                                new DoTweener( scene3_Brother, { x:230, scaleX:1, scaleY:1, time:1, transition:Equations.easeOutElastic } )
                                        ],
                                        [
                                                new Prop( scene3_Sister, { x:-300, scaleX:0.7, scaleY:0.7 } ),
                                                new AddChild( container, scene3_Sister ),
                                                new DoTweener( scene3_Sister, { x:0, scaleX:1, scaleY:1, time:1, transition:Equations.easeOutElastic } )
                                        ],
                                        new AddChild( container, scene3_CutIn1 ),
                                        new AddChild( container, scene3_CutIn2 ),
                                        [
                                                new Prop( scene3_SE, { scaleX:0.3, scaleY:0.3 } ),
                                                new AddChild( container, scene3_SE ),
                                                new DoTweener( scene3_SE, { scaleX:1, scaleY:1, time:1, transition:Equations.easeOutElastic } )
                                        ]
                                ]
                        );
                }
                // Fourth Scene
                public function conclusion():void {
                    manager.current.addCommand(
                                new RemoveAllChildren( container ),
                                [
                                        [
                                                new Prop( scene4_Brother, { x:162, y:266, scaleX:1.5, scaleY:1.5 } ),
                                                new AddChild( container, scene4_Brother ),
                                                new DoTweener( scene4_Brother, { x:112, y:216, scaleX:1, scaleY:1, time:4, transition:Equations.easeOutCubic } )
                                        ],
                                        [
                                                1,
                                                new Prop( scene4_Sister, { x:416, y:505, scaleX:1.3, scaleY:1.3 } ),
                                                new AddChild( container, scene4_Sister ),
                                                new DoTweener( scene4_Sister, { x:316, y:485, scaleX:1, scaleY:1, time:3, transition:Equations.easeOutCubic } )
                                        ],
                                        [
                                                2,
                                                new Prop( scene4_Balloon, { rotation:-5, scaleX:0.7, scaleY:0.7 } ),
                                                new AddChild( container, scene4_Balloon ),
                                                new DoTweener( scene4_Balloon, { rotation:0, scaleX:1, scaleY:1, time:0.5, transition:Equations.easeOutElastic } )
                                        ],
                                        [
                                                new AddChild(container2,loader),
                                                new Prop(loader,{alpha:0}),
                                                new DoTweener(container, { x:(stage.width / 2) - (container.width * 0.4 ), y:(stage.height / 2) - (container.height * 0.4 ), rotation:0, scaleX:0.4, scaleY:0.4, time:0.5, transition:Equations.easeOutCubic }),
                                                new DoTweener(sp,        { x:(stage.width / 2) - (container.width * 0.4 ), y:(stage.height / 2) - (container.height * 0.4 ), rotation:0, scaleX:0.4, scaleY:0.4, time:0.5, transition:Equations.easeOutCubic }),
                                                new DoTweener(loader,   { alpha:1, time:0.5, transition:Equations.easeOutCubic })
                                        ]
                                ]
                        );
                }
                
                public function loadImg():void {
                    loader = new Loader();
                    loader.load(new URLRequest("http://izm-design.com/temp/checkmate_4_pro.png"));
                }
                
                public function Professional() {
                    CheckmateBuilder.initialize( this );
                            
                    container = new CastSprite();
                    container.graphics.lineStyle(3, 0x000000, 1);
                    container.graphics.drawRect(0, 0, 320 * 1.45, 480 * 1.45);
                    container.graphics.endFill();        
                    stage.addChild(container);
                    
                    sp=new Sprite();
                    sp.graphics.beginFill(0x000000,1)
                    sp.graphics.drawRect(0, 0, 320 * 1.45, 480 * 1.45);
                    sp.graphics.endFill()
                    
                    stage.addChild(sp);
                    
                    container.mask = sp;
                    container2 = new CastSprite();
                    stage.addChild(container2);
                    loadImg();
                    
                }
        }
}



import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;
import flash.text.*;
import flash.utils.Timer;
import jp.progression.casts.*;
import jp.progression.commands.*;
import jp.progression.commands.lists.*;
import jp.progression.commands.net.*;
import jp.progression.config.*;
import jp.progression.data.*;
import jp.progression.events.*;
import jp.progression.scenes.*;
import jp.progression.*;
import jp.progression.events.*;

class CheckmateBuilder extends EventDispatcher {

        public static var GRAPHICS_URL:String = "http://swf.wonderfl.net/static/assets/checkmate04/ProfessionalAssets.swf";

        private static var _target:Professional;
        private static var _manager:Progression;

        private static var _button:CastButton;

        public static function initialize( target:Professional ):void {
                if ( _target ) { return; }

                _target = target;
                _target.self = target;
                
                Progression.initialize( new BasicAppConfig() );
                _manager = new Progression( "index", _target.stage );

                var introduction:SceneObject = _manager.root.addScene( new SceneObject( "introduction" ) );
                var development:SceneObject = _manager.root.addScene( new SceneObject( "development" ) );
                var turn:SceneObject = _manager.root.addScene( new SceneObject( "turn" ) );
                var conclusion:SceneObject = _manager.root.addScene( new SceneObject( "conclusion" ) );

                _manager.root.addEventListener( SceneEvent.SCENE_LOAD, _rootSceneLoad );
                introduction.addEventListener( SceneEvent.SCENE_INIT, _introduction );
                development.addEventListener( SceneEvent.SCENE_INIT, _development );
                turn.addEventListener( SceneEvent.SCENE_INIT, _turn );
                conclusion.addEventListener( SceneEvent.SCENE_INIT, _conclusion );

                _target.manager = _manager;

                _manager.goto( introduction.sceneId );
                
        }

        private static function _rootSceneLoad( e:SceneEvent ):void {
                _manager.current.addCommand(
                        new LoadSWF( new URLRequest( GRAPHICS_URL ) ),
                        function():void {
                                var loader:Loader = Loader( this.latestData );
                                var domain:ApplicationDomain = loader.contentLoaderInfo.applicationDomain;

                                _target.scene1_Balloon1 = new ( domain.getDefinition( "scene1.Balloon1" ) as Class );
                                _target.scene1_Balloon1.x = 106;
                                _target.scene1_Balloon1.y = 233;

                                _target.scene1_Balloon2 = new ( domain.getDefinition( "scene1.Balloon2" ) as Class );
                                _target.scene1_Balloon2.x = 345;
                                _target.scene1_Balloon2.y = 270;

                                _target.scene1_Brother = new ( domain.getDefinition( "scene1.Brother" ) as Class );
                                _target.scene1_Brother.x = 228;
                                _target.scene1_Brother.y = 335;

                                _target.scene2_Brother = new ( domain.getDefinition( "scene2.Brother" ) as Class );
                                _target.scene2_Brother.x = 200;
                                _target.scene2_Brother.y = 475;

                                _target.scene2_Shout = new ( domain.getDefinition( "scene2.Shout" ) as Class );
                                _target.scene2_Shout.x = 240;
                                _target.scene2_Shout.y = 215;

                                _target.scene3_Brother = new ( domain.getDefinition( "scene3.Brother" ) as Class );
                                _target.scene3_Brother.x = 230;
                                _target.scene3_Brother.y = 348;

                                _target.scene3_CutIn1 = new ( domain.getDefinition( "scene3.CutIn1" ) as Class );
                                _target.scene3_CutIn1.x = -226;
                                _target.scene3_CutIn1.y = -70;

                                _target.scene3_CutIn2 = new ( domain.getDefinition( "scene3.CutIn2" ) as Class );
                                _target.scene3_CutIn2.x = -226;
                                _target.scene3_CutIn2.y = 312;
                                _target.scene3_SE = new ( domain.getDefinition( "scene3.SE" ) as Class );
                                _target.scene3_SE.x = 259;
                                _target.scene3_SE.y = 237;

                                _target.scene3_Sister = new ( domain.getDefinition( "scene3.Sister" ) as Class );
                                _target.scene3_Sister.x = 0;
                                _target.scene3_Sister.y = 387;

                                _target.scene4_Balloon = new ( domain.getDefinition( "scene4.Balloon" ) as Class );
                                _target.scene4_Balloon.x = 185;
                                _target.scene4_Balloon.y = 370;

                                _target.scene4_Brother = new ( domain.getDefinition( "scene4.Brother" ) as Class );
                                _target.scene4_Brother.x = 112;
                                _target.scene4_Brother.y = 216;

                                _target.scene4_Sister = new ( domain.getDefinition( "scene4.Sister" ) as Class );
                                _target.scene4_Sister.x = 316;
                                _target.scene4_Sister.y = 485;

                                var frameBorder:MovieClip = new ( domain.getDefinition( "ui.FrameBorder" ) as Class );

                                var nextButton:MovieClip = new ( domain.getDefinition( "ui.NextButton" ) as Class );
                                nextButton.managerId = "index";
                                nextButton.x = 435;
                                nextButton.y = 30;
                                nextButton.addEventListener( CastMouseEvent.CAST_NAVIGATE_BEFORE, _castNavigateBefore );

                                var previousButton:MovieClip = new ( domain.getDefinition( "ui.PreviousButton" ) as Class );
                                previousButton.managerId = "index";
                                previousButton.x = 30;
                                previousButton.y = 30;
                                previousButton.addEventListener( CastMouseEvent.CAST_NAVIGATE_BEFORE, _castNavigateBefore );

                                _target.stage.addChild( frameBorder );
                                _target.stage.addChild( nextButton );
                                _target.stage.addChild( previousButton );
                        }
                );
        }

        private static function _introduction( e:SceneEvent ):void {
                _target.introduction();
        }

        private static function _introductionInit( e:SceneEvent ):void {
                _target.introduction();
        }

        private static function _development( e:SceneEvent ):void {
                _target.development();
        }

        private static function _turn( e:SceneEvent ):void {
                _target.turn();
        }

        private static function _conclusion( e:SceneEvent ):void {
                _target.conclusion();
        }

        private static function _castNavigateBefore( e:CastMouseEvent ):void {
                _target.manager.stop();
        }
}