※現在、「wonderfl build flash online」求人コンテンツ制作に関してのアンケートを実施中です!みなさまのお力添えを頂いて、続々とアンケート結果が集まっていますが、まだまだ募集しております。ご協力のほど、どうぞよろしくお願いいたします!

wonderfl運営事務局
→アンケートページ(※ログインしてからお答えいただけるようになっています。)

 notice: Flash editor updated! Join the development! Thanks to MiniBuilder


FAVORITE BY
:
:
:
プログレッション のテンプレート
:
テンプレート
:
:
Progression4まだ3もちゃんと使えてないけど、、
:
:
Progression4Progression4のテンプレートファイル
:
P4テンプレ
:
Progression4を試してみるには最適なテンプレートコード
FORKED

Progression 4 BasicAppConfig 画像の読み込み試し中 [diff(18)]

  1. // forked from nium's Progression 4 BasicAppConfig
  2. // どこが間違っているのかわからない、、、
  3. package {
  4.     import flash.display.*;
  5.     import jp.progression.config.*;
  6.     import jp.progression.debug.*;
  7.     import jp.progression.*;
  8.     
  9.     public class FlashTest extends Sprite {
  10.         
  11.         public var manager:Progression;
  12.         
  13.         public function FlashTest() {
  14.             Progression.initialize( new BasicAppConfig() );
  15.             manager = new Progression( "index", stage, IndexScene );
  16.             
  17.             Debugger.addTarget( manager );
  18.                         
  19.             manager.goto( manager.root.sceneId );
  20.         }
  21.     }
  22. }
  23. import jp.progression.casts.*;
  24. import jp.progression.commands.display.*;
  25. import jp.progression.commands.lists.*;
  26. import jp.progression.commands.net.*;
  27. import jp.progression.commands.tweens.*;
  28. import jp.progression.commands.*;
  29. import jp.progression.data.*;
  30. import jp.progression.events.*;
  31. import jp.progression.scenes.*;
  32. import flash.net.URLRequest;
  33. class IndexScene extends SceneObject {
  34.     private var _loader:CastImageLoader;
  35.     private var _url:String = "http://assets.wonderfl.net/images/related_images/c/cd/cdf0/cdf084da0fe7c1a04fe340a74a917ee9ee400302"
  36.     public function IndexScene() {
  37.     }
  38.     
  39.     protected override function atSceneLoad():void {
  40.         addCommand(
  41.         );
  42.     }
  43.     
  44.     protected override function atSceneInit():void {
  45.         addCommand(
  46.             function():void {
  47.                 _loader = new CastImageLoader();
  48.                 //_loader.x = 100;
  49.                 //_loader.y = 100;
  50.                 //_loader.align = CastImageLoaderAlign.TOP_LEFT;
  51.                 //_loader.ratio = CastImageLoaderRatio.OVERFLOW;
  52.                 //_loader.adjustWidth = 150;
  53.                 //_loader.adjustHeight = 100;
  54.                 _loader.load(new URLRequest(_url));
  55.             }
  56.             ,new AddChild(container, _loader)
  57.         );
  58.     }
  59.     
  60.     protected override function atSceneGoto():void {
  61.         addCommand(
  62.         );
  63.     }
  64. }
noswf

Progression 4 BasicAppConfig TweenButton [diff(340)]

  1. /*
  2.  * Progression4での話。
  3.  * 
  4.  * 最近、微妙に振る舞いの違うボタンをいくつか作る必要があった。
  5.  * トグルボタン、ラジオボタン、それらをハイブリッドみたいなボタン。
  6.  * なるべく共通化してたんだけど、やっぱり作り進むうちに、
  7.  * 違いが出て来てしまって、差し替え時にミスをしがちになった。
  8.  * 
  9.  * 汎用的なボタンを作るか、インターフェイスを用いるべきだったんだと思った。
  10.  * 
  11.  * とりあえず、普通、トグル、ラジオに対応するボタンを作ってみた。
  12. */
  13. // forked from nium's Progression 4 BasicAppConfig
  14. package {
  15.     import flash.display.*;
  16.     import jp.progression.config.*;
  17.     import jp.progression.debug.*;
  18.     import jp.progression.*;
  19.     
  20.     public class Main extends Sprite {
  21.         
  22.         public var manager:Progression;
  23.         
  24.         public function Main() {
  25.             Progression.initialize( new BasicAppConfig() );
  26.             manager = new Progression( "index", stage, IndexScene );
  27.             
  28.             //Debugger.addTarget( manager );
  29.             
  30.             manager.goto( manager.root.sceneId );
  31.         }
  32.     }
  33. }
  34. import flash.display.*;
  35. import flash.net.URLRequest;
  36. import jp.progression.casts.*;
  37. import jp.progression.commands.*;
  38. import jp.progression.commands.display.*;
  39. import jp.progression.commands.lists.*;
  40. import jp.progression.commands.net.*;
  41. import jp.progression.commands.tweens.*;
  42. import jp.progression.data.*;
  43. import jp.progression.events.*;
  44. import jp.progression.scenes.*;
  45. class IndexScene extends SceneObject {
  46.     
  47.     public function IndexScene() {
  48.         //デフォルト
  49.         new TweenButton( { id:"tweenButton0", x:50, y:50 } );
  50.         
  51.         //デフォルト+文字+ダウンイメージを使わない
  52.         new TweenButton( { id:"tweenButton1", x:50, y:100 },{text:"Button",isUseDownImage:false} );
  53.         
  54.         //トグル+tweenの時間設定+文字のせ
  55.         new TweenButton( { id:"tweenButton2", x:50, y:200 }, { isToggle:true, time:0.3, text:"トグル" } );
  56.         
  57.         //on/offで違う文字のせ+初期状態でon
  58.         new TweenButton( { id:"tweenButton3", x:50, y:250 }, { isToggle:true, onText:"ON", offText:"OFF", isOn:true } );
  59.         
  60.         //ラジオボタンの設定+tween無+selected
  61.         var group:Array = ["radio0""radio1""radio2"];
  62.         new TweenButton( { id:"radio0", x:50, y:350 }, { text:"Radio0", radioGroup:group, time:0 , selected:true } );
  63.         new TweenButton( { id:"radio1", x:150, y:350 }, { text:"Radio1", radioGroup:group, time:0 } );
  64.         new TweenButton( { id:"radio2", x:250, y:350 }, { text:"Radio2", radioGroup:group, time:0 } );
  65.         
  66.         
  67.         //画像のボタン
  68.         var offUpImg:CastImageLoader = new CastImageLoader();
  69.         offUpImg.load(new URLRequest("http://farm3.static.flickr.com/2499/3828917483_8948414d57_o.jpg"));
  70.         var offOverImg:CastImageLoader = new CastImageLoader();
  71.         offOverImg.load(new URLRequest("http://farm3.static.flickr.com/2664/3828917495_8e21ea52c1_o.jpg"));
  72.         var offDownImg:CastImageLoader = new CastImageLoader();
  73.         offDownImg.load(new URLRequest("http://farm4.static.flickr.com/3542/3829716284_3f77a81e73_o.jpg"));
  74.         
  75.         new TweenButton( { id:"tweenButton4", x:200, y:50 }, { offUp:offUpImg, offOver:offOverImg,offDown:offDownImg } );
  76.         
  77.     }
  78.     
  79.     protected override function atSceneLoad():void {
  80.         addCommand(
  81.             new AddChild(container, "tweenButton0"),
  82.             new AddChild(container, "tweenButton1"),
  83.             new AddChild(container, "tweenButton2"),
  84.             new AddChild(container, "tweenButton3"),
  85.             new AddChild(container, "radio0"),
  86.             new AddChild(container, "radio1"),
  87.             new AddChild(container, "radio2"),
  88.             new AddChild(container, "tweenButton4"),
  89.             "Progression 4"
  90.         );
  91.     }
  92.     
  93.     protected override function atSceneInit():void {
  94.         addCommand(
  95.             "BasicAppConfig Test"
  96.         );
  97.     }
  98.     
  99.     protected override function atSceneGoto():void {
  100.         addCommand(
  101.         );
  102.     }
  103. }
  104. import flash.display.Shape;
  105. import flash.geom.Matrix;
  106. import flash.text.TextField;
  107. import flash.display.Bitmap;
  108. class TweenButton extends CastButton {
  109.     private var _offUp:DisplayObject;
  110.     private var _offOver:DisplayObject;
  111.     private var _offDown:DisplayObject;
  112.     private var _onUp:DisplayObject;
  113.     private var _onOver:DisplayObject;
  114.     private var _onDown:DisplayObject;
  115.     
  116.     private var _up:CastSprite;
  117.     private var _over:CastSprite;
  118.     private var _down:CastSprite;
  119.     
  120.     private var _isOn:Boolean;
  121.     private var _selected:Boolean;
  122.     private var _isImageSwap:Boolean;
  123.     //Downボタンを用意しない場合も多いので、
  124.     //無くてもダミーが表示しないようにするには
  125.     //isUseDownImage = false;にする。
  126.     private var _isUseDownImage:Boolean = true;
  127.     //tweenの時間。0にするとtweenerの呼び出しもない
  128.     private var _time:Number = 0.6;
  129.     private var _isToggle:Boolean;
  130.     private var _text:String;
  131.     private var _onText:String;
  132.     private var _offText:String;
  133.     private var _radioGroup:Array;
  134.     
  135.     private var _initialized:Boolean;
  136.     
  137.     public function TweenButton( initObject:Object = null , extendsObject:Object = null) {
  138.         
  139.         super(initObject);
  140.         
  141.         if (extendsObject) {
  142.             for (var str:String in extendsObject) {
  143.                 this["_" + str] = extendsObject[str];
  144.             }
  145.         }
  146.         
  147.         if (!_onText) {
  148.             _onText = _text?_text:null;
  149.         }
  150.         if (!_offText) {
  151.             _offText = _text?_text:null;
  152.         }
  153.         
  154.         if (_isToggle) {
  155.             if (!_onUp) {
  156.                 _onUp = getImage(0xFFFF00, _onText);
  157.             }
  158.             if (!_onOver){
  159.                 _onOver = getImage(0x00FFFF, _onText);
  160.             }
  161.             if (!_onDown && _isUseDownImage){
  162.                 _onDown = getImage(0xFF00FF, _onText, 1);
  163.             }
  164.         }
  165.         
  166.         if (!_offUp) {
  167.             _offUp = getImage(0xFF0000, _offText);
  168.         }
  169.         if (!_offOver) {
  170.             _offOver = getImage(0x00FF00, _offText);
  171.         }
  172.         if (!_offDown && _isUseDownImage) {
  173.             _offDown = getImage(0x0000FF, _offText, 1);
  174.         }
  175.         
  176.         _isImageSwap = true;
  177.         this.buttonMode = true;
  178.         
  179.         _up = new CastSprite();
  180.         _over = new CastSprite();
  181.         
  182.         if(_offDown && _onDown){
  183.             _down = new CastSprite();
  184.         }else if (_offDown) {
  185.             if (!_isToggle) {
  186.                 _down = new CastSprite();
  187.             }
  188.         }
  189.         
  190.         _up.addChild(_offUp);
  191.         _over.addChild(_offOver);
  192.         
  193.         if (_up) {
  194.             this.addChild(_up);
  195.             _up.visible = true;
  196.         }
  197.         if (_over) {
  198.             this.addChild(_over);
  199.             _over.visible = false;
  200.         }
  201.         if (_down) {
  202.             _down.addChild(_offDown);
  203.             this.addChild(_down);
  204.             _down.visible = false;
  205.         }
  206.         
  207.         //初騎状態を設定
  208.         this.isOn = _isOn;
  209.         this.selected = _selected;
  210.         _initialized = true;
  211.     }
  212.     private function getImage(rgb:int = 0xFF0000, text:String = null, ty:Number = 0):Bitmap {
  213.         var shape:Shape = new Shape();
  214.         shape.graphics.beginFill(rgb,0.5);
  215.         shape.graphics.drawRoundRect(0,0,60,20,8,8);
  216.         shape.graphics.endFill();
  217.         shape.graphics.beginFill(rgb,0.5);
  218.         shape.graphics.drawRoundRect(2,2,56,16,6,6);
  219.         shape.graphics.endFill();
  220.         var bitmapData:BitmapData = new BitmapData(shape.width, shape.height);
  221.         bitmapData.draw(shape);
  222.         if(text){
  223.             var textField:TextField = new TextField();
  224.             textField.text = text;
  225.             textField.width = shape.width;
  226.             textField.autoSize = "center";
  227.             bitmapData.draw(textField, new Matrix(10010, ty));
  228.         }
  229.         return new Bitmap(bitmapData);
  230.     }
  231.     
  232.     
  233.     //選択状態を維持する用
  234.     public function get selected():Boolean { return _selected };
  235.     public function set selected(value:Boolean):void {
  236.         if (_initialized && _selected == value) { return };
  237.         _selected = value;
  238.         if (_over || _down) {
  239.             if(_over){
  240.                 _over.visible = value;
  241.             }
  242.             if(_down){
  243.                 _down.visible = value;
  244.             }
  245.             _isImageSwap = !value;
  246.         }
  247.         this.mouseEventEnabled = !value;
  248.         this.mouseEnabled = !value;
  249.     }
  250.     
  251.     //ボタンとして機能するんだけど、イメージの差し替えはしない時用
  252.     public function get isImageSwap():Boolean { return _isImageSwap };
  253.     public function set isImageSwap(value:Boolean):void {
  254.         if (_isImageSwap == value) { return };
  255.         _isImageSwap = value;
  256.     }
  257.     
  258.     //トグルが効いているときに画像の差し替えをする
  259.     //onを表示しているときには、trueを返す。
  260.     public function get isOn():Boolean { return _isOn };
  261.     public function set isOn(value:Boolean):void {
  262.         if (_initialized && _isOn == value) { return };
  263.         _isOn = value;
  264.         if (!_isToggle) { return };
  265.         _up.removeAllChildren();
  266.         _over.removeAllChildren();
  267.         if(_down){
  268.             _down.removeAllChildren();
  269.         }
  270.         if (value) {
  271.             _up.addChild(_onUp);
  272.             _over.addChild(_onOver);
  273.             if(_down){
  274.                 _down.addChild(_onDown);
  275.             }
  276.         }else {
  277.             _up.addChild(_offUp);
  278.             _over.addChild(_offOver);
  279.             if(_down){
  280.                 _down.addChild(_offDown);
  281.             }
  282.         }
  283.     }
  284.     
  285.     //トグルを使う場合はtrueにする。
  286.     public function get isToggle():Boolean { return _isToggle };
  287.     public function set isToggle(value:Boolean):void {
  288.         if (_isToggle == value) { return };
  289.         _isToggle = value;
  290.     }
  291.     
  292.     override protected function atCastMouseUp():void {
  293.         if (_isImageSwap) {
  294.             isOn = !isOn;
  295.             if (_down) {
  296.                 _down.visible = false;
  297.                 
  298.                 //downが無いときに連続のクリックの時にわかりやすくするには、
  299.                 //_overを消すといいかも。
  300.             //}else {
  301.                 //if (_over) {
  302.                     //_over.visible = false;
  303.                 //}
  304.             }
  305.         }
  306.         //ラジオボタン用のグループがある場合に、自分以外を非selected表示に
  307.         if (_radioGroup) {
  308.             var n:int = _radioGroup.length;
  309.             for (var i:int = 0; i < n; i++) {
  310.                 if ((getInstanceById(_radioGroup[i]) as TweenButton) != this) {
  311.                     (getInstanceById(_radioGroup[i]) as TweenButton).selected = false;
  312.                 }
  313.             }
  314.             this.selected = true;
  315.         }
  316.     }
  317.     
  318.     override protected function atCastMouseDown():void {
  319.         if (_isImageSwap) {
  320.             if (_down) {
  321.                 _down.visible = true;
  322.             }else {
  323.                 //連続のクリックの時にはわかりにくいので、表示
  324.                 if (_over) {
  325.                     _over.visible = true;
  326.                 }
  327.             }
  328.         }
  329.     }
  330.     
  331.     override protected function atCastRollOver():void {
  332.         if (_isImageSwap) {
  333.             if (_over) {
  334.                 if (_time > 0) {
  335.                     var sList:SerialList = new SerialList();
  336.                     sList.addCommand(
  337.                         function():void {
  338.                             _over.visible = true;
  339.                             _over.alpha = 0;
  340.                         },
  341.                         new DoTweener(_over,{alpha:1, time:_time, transition:"easeOutQuart"})
  342.                     );
  343.                     sList.execute();
  344.                 }else {
  345.                     _over.alpha = 1;
  346.                     _over.visible = true;
  347.                 }
  348.             }
  349.         }
  350.     }
  351.     
  352.     override protected function atCastRollOut():void {
  353.         if (_isImageSwap) {
  354.             if (_over) {
  355.                 if (_time > 0) {
  356.                     var sList:SerialList = new SerialList();
  357.                     sList.addCommand(
  358.                         new DoTweener(_over,{alpha:0, time:_time, transition:"easeOutQuart"}),
  359.                         function():void {
  360.                             _over.visible = false;
  361.                         }
  362.                     );
  363.                     sList.execute();
  364.                 }else {
  365.                     _over.visible = false;
  366.                 }
  367.             }
  368.         }
  369.     }
  370. }
noswf
  1. // forked from nium's Progression 4 BasicAppConfig
  2. // 基本的なコマンドをいろいろ試してみる(途中)
  3. package {
  4.     import flash.display.*;
  5.     import jp.progression.config.*;
  6.     import jp.progression.debug.*;
  7.     import jp.progression.*;
  8.     
  9.     public class FlashTest extends Sprite {
  10.         
  11.         public var manager:Progression;
  12.         
  13.         public function FlashTest() {
  14.             Progression.initialize( new BasicAppConfig() );
  15.             manager = new Progression( "index", stage, IndexScene );
  16.             
  17.             //Debugger.addTarget( manager );
  18.                         
  19.             manager.goto( manager.root.sceneId );
  20.         }
  21.     }
  22. }
  23. import flash.text.TextField;
  24. import flash.text.TextFieldAutoSize;
  25. import jp.progression.casts.*;
  26. import jp.progression.commands.display.*;
  27. import jp.progression.commands.lists.*;
  28. import jp.progression.commands.net.*;
  29. import jp.progression.commands.tweens.*;
  30. import jp.progression.commands.*;
  31. import jp.progression.data.*;
  32. import jp.progression.events.*;
  33. import jp.progression.scenes.*;
  34. //DoTweenの効果用にインポート
  35. import fl.transitions.easing.*;
  36. //DoTweenerで色の変化効果をつけるときにこのクラスをインポートする(初期化が必要)
  37. import caurina.transitions.properties.ColorShortcuts;
  38. //DoTransitionを使うときにインポートする
  39. import fl.transitions.*;
  40. class IndexScene extends SceneObject {
  41.     private var _tf:TextField;
  42.     private var _sp1:TestSprite = new TestSprite("0x00DDDDDD");
  43.     private var _sp2:TestSprite = new TestSprite("0x00BBBBBB");
  44.     private var _sp3:TestSprite = new TestSprite("0x00999999");
  45.     private var _mc1:TestMovieClip = new TestMovieClip();
  46.     public function IndexScene() {
  47.         _tf = new TextField();
  48.         _tf.text = "出力";
  49.         
  50.         //TweenerでColorShortcuts使う時は初期化必須
  51.         ColorShortcuts.init();
  52.     }
  53.     private function debug(message:*):void {
  54.         //_tf.text = message;
  55.         _tf.appendText("\n" + String(message));
  56.     }
  57.     
  58.     protected override function atSceneLoad():void {
  59.         var com:Prop = new Prop(_sp1, {x:stage.stageWidth/2-_sp1.width/2, y:stage.stageHeight/2-_sp1.height/2});
  60.         com.execute();
  61.         //カンマでつなぐとシリアル、[]で囲うとパラレル
  62.         addCommand(
  63.             //Progressionの出力
  64.             //new Trace("hogehoge"),
  65.             
  66.             //表示リストに追加
  67.             //addChild(コンテナ、オブジェクト)
  68.             new AddChild(container,_tf),
  69.             
  70.             //関数の実行
  71.             //Func(関数、引数:Array、処理の終了イベント:IEventDispatcher、発行される終了イベントの種類:String)
  72.             new Func(debug,["途中で関数実行"]),
  73.             
  74.             //遅延処理
  75.             //Wait(秒)←ミリ秒じゃないので注意
  76.             new Wait(.5),
  77.             
  78.             //同時に処理(パラレル)
  79.             //[]で囲う。閉じタグの後のカンマのつけ忘れに注意
  80.             [
  81.                 new Func(debug,["同時に処理1"]),
  82.                 new Wait(.5),
  83.                 new Func(debug,["同時に処理2"])
  84.             ],
  85.             
  86.             //プロパティーの設定
  87.             //Prop(オブジェクト、パラメータ)
  88.             //new Prop(_sp1,{x:stage.stageWidth/2-_sp1.width/2, y:stage.stageHeight/2-_sp1.height/2}),
  89.             new Prop(_sp2,{x:stage.stageWidth/2-_sp2.width/2+20, y:stage.stageHeight/2-_sp2.height/2+20}),
  90.             new Prop(_sp3,{x:stage.stageWidth/2-_sp3.width/2+40, y:stage.stageHeight/2-_sp3.height/2+40}),
  91.             
  92.             //テスト
  93.             new Func(debug,["_sp1.x : "+_sp1.x]),//execute()で実行しないと対象のオブジェクトのプロパティーには影響してない?
  94.             new Func(debug,["_sp2.x : "+_sp2.x]),
  95.             
  96.             
  97.             //表示インデックス指定で追加
  98.             //addChildAt(コンテナ、オブジェクト、インデックス)
  99.             new AddChildAt(container, _sp1, 0),
  100.             new Wait(.5),
  101.             new AddChildAt(container, _sp2, 1),
  102.             new Wait(.5),
  103.             new AddChildAt(container, _sp3, 2),
  104.             new Wait(.5),
  105.             
  106.             //各種パラメータのトゥイーン
  107.             //DoTween(オブジェクト、パラメータ,効果、処理時間)
  108.             new DoTween(_sp3, { x:60, y:60, alpha:.5, scaleX:1.5, scaleY:1.5, scaleZ:1.5, rotationX:45, rotationY:45, rotationZ:45 }, Regular.easeOut, 2),
  109.             
  110.             //Tweenerと同じ
  111.             new DoTweener(_sp2, {x:120, y:120, alpha:1, _color_redOffset:36, time:2, transition:"easeOutElastic"}),
  112.             
  113.             //表示リストからはずす
  114.             //RemoveChild(コンテナ、オブジェクト)
  115.             new RemoveChild(container, _sp1),
  116.             new Wait(.5),
  117.             
  118.             //表示リストからすべての子をはずす
  119.             //RemoveAllChildern(コンテナ)
  120.             new RemoveAllChildren(container),
  121.             new Wait(1),
  122.             
  123.             new Prop(_mc1, {x:stage.stageWidth/2-_mc1.width/2, y:stage.stageWidth/2-_mc1.width/2}),
  124.             new AddChild(container, _mc1),
  125.             
  126.             //transitionの効果がつけられる
  127.             //DoTransition(オブジェクト、トランジションの種類、トランジションのかかりかた、処理時間、効果)
  128.             new DoTransition(_mc1, PixelDissolve, Transition.IN, 1, Regular.easeInOut),
  129.             new Wait(.5),
  130.             new DoTransition(_mc1, PixelDissolve, Transition.OUT, 1, Regular.easeInOut),
  131.             new Prop(_mc1, {alpha:0})
  132.         );
  133.         
  134.     }
  135.     
  136.     protected override function atSceneInit():void {
  137.         addCommand(
  138.             //
  139.         );
  140.     }
  141.     
  142.     protected override function atSceneGoto():void {
  143.         addCommand(
  144.             //
  145.         );
  146.     }
  147. }
  148. class TestSprite extends CastSprite {
  149.     public var color:uint = 0x00DDDDDD;
  150.     public function TestSprite(initObject:Object = null) {
  151.         super(initObject);
  152.         if(initObject) color = uint(initObject);
  153.         graphics.beginFill(color);
  154.         graphics.drawRect(00200200);
  155.         graphics.endFill();
  156.     }
  157.     override protected function atCastAdded():void 
  158.     {
  159.         addCommand(
  160.             //
  161.         );
  162.     }
  163.     override protected function atCastRemoved():void 
  164.     {
  165.         addCommand(
  166.             //
  167.         );
  168.     }
  169. }
  170. class TestMovieClip extends CastMovieClip {
  171.     public var color:uint = 0x00DDDDFF;
  172.     public function TestMovieClip(initObject:Object = null) {
  173.         super(initObject);
  174.         if(initObject) color = uint(initObject);
  175.         graphics.beginFill(color);
  176.         graphics.drawRect(00200200);
  177.         graphics.endFill();
  178.     }
  179.     override protected function atCastAdded():void 
  180.     {
  181.         addCommand(
  182.             //
  183.         );
  184.     }
  185.     override protected function atCastRemoved():void 
  186.     {
  187.         addCommand(
  188.             //
  189.         );
  190.     }
  191. }
  192. class TestButton extends CastButton {
  193.     public function TestButton( initObject:Object = null ) 
  194.     {
  195.         // 親クラスを初期化します。
  196.         super( initObject );
  197.         
  198.         // 移動先となるシーン識別子を設定します。
  199.         //sceneId = new SceneId( "/index/command" );
  200.         
  201.         graphics.beginFill(0x00000000);
  202.         graphics.drawRect(-100, -3520070);
  203.         graphics.endFill();
  204.     }
  205.     override protected function atCastAdded():void 
  206.     {
  207.         addCommand(
  208.             //new Prop(this, {x:stage.stageWidth/2,y:stage.stageHeight/2})
  209.         )
  210.         this.x = stage.stageWidth / 2;
  211.         this.y = stage.stageHeight / 2;
  212.     }
  213. }
noswf
  1. // forked from nium's Progression 4 BasicAppConfig
  2. package {
  3.     import flash.display.*;
  4.     import jp.progression.config.*;
  5.     import jp.progression.debug.*;
  6.     import jp.progression.*;
  7.     
  8.     public class FlashTest extends Sprite {
  9.         
  10.         public var manager:Progression;
  11.         
  12.         public function FlashTest() {
  13.             Progression.initialize( new BasicAppConfig() );
  14.             manager = new Progression( "index", stage, IndexScene );
  15.             
  16.             //Debugger.addTarget( manager );
  17.                         
  18.             manager.goto( manager.root.sceneId );
  19.         }
  20.     }
  21. }
  22. import jp.progression.casts.*;
  23. import jp.progression.commands.display.*;
  24. import jp.progression.commands.lists.*;
  25. import jp.progression.commands.net.*;
  26. import jp.progression.commands.tweens.*;
  27. import jp.progression.commands.*;
  28. import jp.progression.data.*;
  29. import jp.progression.events.*;
  30. import jp.progression.scenes.*;
  31. class IndexScene extends SceneObject {
  32.     
  33.     public function IndexScene() {
  34.     }
  35.     
  36.     protected override function atSceneLoad():void {
  37.         addCommand(
  38.             "Progression 4"
  39.         );
  40.     }
  41.     
  42.     protected override function atSceneInit():void {
  43.         addCommand(
  44.             "BasicAppConfig Test"
  45.         );
  46.     }
  47.     
  48.     protected override function atSceneGoto():void {
  49.         addCommand(
  50.         );
  51.     }
  52. }
noswf
  1. // forked from nium's Progression 4 BasicAppConfig
  2. package {
  3.     import flash.display.*;
  4.     import jp.progression.config.*;
  5.     import jp.progression.debug.*;
  6.     import jp.progression.*;
  7.     
  8.     public class FlashTest extends Sprite {
  9.         
  10.         public var manager:Progression;
  11.         
  12.         public function FlashTest() {
  13.             Progression.initialize( new BasicAppConfig() );
  14.             manager = new Progression( "index", stage, IndexScene );
  15.             
  16.             Debugger.addTarget( manager );
  17.                         
  18.             manager.goto( manager.root.sceneId );
  19.         }
  20.     }
  21. }
  22. import jp.progression.casts.*;
  23. import jp.progression.commands.display.*;
  24. import jp.progression.commands.lists.*;
  25. import jp.progression.commands.net.*;
  26. import jp.progression.commands.tweens.*;
  27. import jp.progression.commands.*;
  28. import jp.progression.data.*;
  29. import jp.progression.events.*;
  30. import jp.progression.scenes.*;
  31. class IndexScene extends SceneObject {
  32.     
  33.     public function IndexScene() {
  34.     }
  35.     
  36.     protected override function atSceneLoad():void {
  37.         addCommand(
  38.             "Progression 4"
  39.         );
  40.     }
  41.     
  42.     protected override function atSceneInit():void {
  43.         addCommand(
  44.             "BasicAppConfig Test"
  45.         );
  46.     }
  47.     
  48.     protected override function atSceneGoto():void {
  49.         addCommand(
  50.         );
  51.     }
  52. }
noswf
Get Adobe Flash Player