Changeset 36050

Show
Ignore:
Timestamp:
11/30/09 21:54:10 (3 years ago)
Author:
hoge1e3
Message:
 
Location:
lang/haxe/Tonyu2
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • lang/haxe/Tonyu2/Projects/test/Tama.tonyu

    r36049 r36050  
    22 
    33while (x<500) { 
    4   x=x+5; 
     4  x=x+3; 
    55  y=y+vy; 
    66  update(); 
  • lang/haxe/Tonyu2/Projects/test/Test.tonyu

    r35996 r36050  
    88        vx=vx+0.1; 
    99        y=y+0.2; 
    10         if (vx>3) vx=0; 
     10        if (vx>3) vx=0-1; 
    1111        update(); 
    1212} 
  • lang/haxe/Tonyu2/Projects/test/haxe/Tama.hx

    r36049 r36050  
    1212        } 
    1313      case 2: 
    14         x=(x+5); 
     14        x=(x+3); 
    1515        y=(y+vy); 
    1616        state=4; 
  • lang/haxe/Tonyu2/Projects/test/haxe/Test.hx

    r35996 r36050  
    2525        } 
    2626      case 4: 
    27         vx=0; 
     27        vx=(0-1); 
    2828        state=6; 
    2929      case 5: 
  • lang/haxe/Tonyu2/htdocs/Project.class.js

    r36049 r36050  
    55     } catch(e) {alert(e);} 
    66   }; 
     7} 
     8function pos(x,y) { 
     9        return {position:"absolute", left:x, top:y}; 
     10} 
     11function posDiv(x,y,cont) { 
     12        return ["div",{style:pos(x,y)},cont]; 
    713} 
    814Project =Class.create({ 
     
    1521                var t=this; 
    1622                t.editor=tag("textarea",{rows:15 , cols:80}); 
    17                 t.fileList=tag("div"); 
    18                 t.swfArea=tag("div"); 
     23                t.fileList=tag("div",{style:pos(420,10)}); 
     24                t.swfArea=tag("div",{style:pos(10,10)}); 
    1925                $tag("body").set([["div", "プロジェクト", t.name], 
    2026                   t.swfArea, 
    21            t.fileList, t.editor, 
    22                    ["button",{onclick:function(){t.saveTonyuSource()}},"SAVE"], 
    23                    ["button",{onclick:function(){t.run()}},"Run"] 
    24 //                 ["button",{onclick:t.saveTonyuSource.bind(this)},"SAVE"] 
     27                   t.fileList,  
     28                   posDiv(500,10,[ 
     29                        t.editor, 
     30                    ["button",{onclick:function(){t.saveTonyuSource()}},"SAVE"], 
     31                    ["button",{onclick:function(){t.run()}},"Run"] 
     32                   ]) 
    2533                ]); 
    2634                attachIndentAdaptor(t.editor.target); 
     
    7987                t.saveTonyuSourceAs( t.currentSourceName, t.editor.getAttr("value") ); 
    8088        }, 
    81         make: function () { 
     89        make: function (afterMake) { 
    8290                var t=this;      
    8391                new Ajax.Request( 
     
    8997                        }); 
    9098                function showResponse(res) { 
    91                         alert(res); 
     99                        //alert(res); 
     100                        afterMake(); 
    92101                } 
    93102        }, 
    94103        run: function () { 
    95104                var t=this; 
    96                 t.make(); 
    97                 t.swfArea.set(swf(t.homeURL+"/swf")); 
     105                t.make(function() { 
     106                        setTimeout(function () { 
     107                                t.swfArea.set(swf(t.homeURL+"/swf")); 
     108                        },500); 
     109                }); 
    98110        } 
    99111});