Flash Class Giving Me and Import Error -
Flash Class Giving Me and Import Error -
here code wrote. flash class based upon generic object.
package{ import flash.events import flash.ui import flash.sprite; import flash.sound; public class songplayer extends object { private var _song : sound; private var _soundtrans : soundtransform; addeventlistener(event.enter_frame , onenter); public function songplayer (_sound:sound) : void { _song = _sound; var chan : soundchannel = new soundchannel(); chan = _song.play(); }; }
}
in fact, code total of errors:
all (!) of import statements invalid. check api documentation each class find out right bundle or qualified class name import (suchflash.display.sprite
, flash.events.event
). you add together event listener outside of function block you did not declare onenter
function handle event there no need write extends object
, since custom classes in flash extend object definition. for future: read error messages. mean something. then, on , over, prepare first error, recompile - until compilation completes.
i quite there lot of examples playing sounds, in actionscript api documentation, can utilize started - there no need scratch...
flash
Comments
Post a Comment