Webデザインノート|ActionScript課題F005〜F019
ActionScript課題集
答え合わせ等にご活用ください。
※たまにhtmlファイルが「403 Forbidden」で見れなくなります。
そうした場合は、
WebデザインLab|かだいページにてご覧ください。
課題別Jumpリスト
課題F005
課題F006
課題F007
課題F008
課題F009
課題F011
課題F012
課題F013
課題F014
課題F015
課題F016
課題F017
課題F018
課題F019
見れないときは...
課題F006
osaru_mc.onRelease = function() { var movePoint; movePoint = 20; osaru_mc._x += movePoint; osaru_mc._xscale += movePoint; osaru_mc._yscale += movePoint; osaru_mc._rotation += movePoint; }
課題F009
osaru_mc.onEnterFrame = function() { var point; point = osaru_mc._y; if(point < -150){ stop(); } else { _root.osaru_mc._y -= 5; trace(point); console.text = (point); } }
課題F010
osaru_mc.onEnterFrame = function() { var point; point = osaru_mc._y; if(point > 550){ stop(); } else { _root.osaru_mc._y += 5; trace(point); console.text = (point); } }
課題F011
osaru_mc.onEnterFrame = function() { var num; num = 5; _root.osaru_mc._y += num; _root.osaru_mc._x += num; }
課題F012
osaru_mc.onEnterFrame = function() { var point; point = 5; osaru_mc._xscale += point; osaru_mc._yscale += point; }
課題F013
osaru_mc.onEnterFrame = function() { var point; point = osaru_mc._alpha; osaru_mc._alpha -= 5; console.text = (point); }
課題F014
osaru_mc.onRelease = function() { var movePoint; movePoint = 20; this._x += movePoint; this._rotation += movePoint; this._xscale += movePoint; this._yscale += movePoint; }
課題F015
up_btn.onRelease = function() { osaru_mc._y -= movePoint; } right_btn.onRelease = function() { osaru_mc._x += movePoint; } down_btn.onRelease = function() { osaru_mc._y += movePoint; } left_btn.onRelease = function() { osaru_mc._x -= movePoint; }
課題F016
var movePoint; movePoint = 10; up_btn.onPress = function() { osaru_mc.onEnterFrame = function() { osaru_mc._y -= movePoint; }; }; up_btn.onRelease = function() { osaru_mc.onEnterFrame = undefined; }; right_btn.onPress = function() { osaru_mc.onEnterFrame = function() { osaru_mc._x += movePoint; }; }; right_btn.onRelease = function() { osaru_mc.onEnterFrame = undefined; }; down_btn.onPress = function() { osaru_mc.onEnterFrame = function() { osaru_mc._y += movePoint; }; }; down_btn.onRelease = function() { osaru_mc.onEnterFrame = undefined; }; left_btn.onPress = function() { osaru_mc.onEnterFrame = function() { osaru_mc._x -= movePoint; }; }; left_btn.onRelease = function() { osaru_mc.onEnterFrame = undefined; };
課題F017
button.onPress = function() { akasan_mc.onEnterFrame = function() { akasan_mc._rotation += 5; }; }; button.onRelease = function() { akasan_mc.onEnterFrame = undefined; };
課題F018
akasan_mc.onEnterFrame = function() { akasan_mc._x += 5; if(akasan_mc._x > Stage.width){ akasan_mc._x -= 10; } }
課題F019
myKey = new Object(); myKey.onKeyDown = function() { var num; num = 5; /*akasan.onEnterFrame = function() {*/ switch(Key.getCode()){ case Key.UP: akasan_mc._y -= num; break; case Key.DOWN: akasan_mc._y += num; break; case Key.RIGHT: akasan_mc._x += num; break; case Key.LEFT: akasan_mc._x -= num; break; } } Key.addListener(myKey);