Pauseknap
Med if else og en ‘boolean’
Læs om syntaksen her
this.soundButton.onPress = function () { if (this.spiller != true) { this.gotoAndStop ("play"); this._parent.lydloop.play (); this.spiller = true; } else { this.gotoAndStop ("pause"); this._parent.lydloop.stop (); this.spiller = false; } };
Den skrabede
En anden måde at lave betingelser på – læs om syntaksen her
o.onRelease = function () { clicked = (!clicked) ? true : false; this._alpha = (clicked) ? 50 : 100; };
Modified: 17 June 2009 • by admin
Created: 22 October 2007 • by admin
Categories: as2
Comments: none yet • add one!
Created: 22 October 2007 • by admin
Categories: as2
Comments: none yet • add one!
