

Play_btn.addEventListener(MouseEvent.CLICK, playSound) Var mySoundChannel:SoundChannel = new SoundChannel() Var myURL:URLRequest = new URLRequest("song.mp3") //Change file name here So the code below is really helpful when it comes to mingle with sound in flash. Embedding MP3 files into flash makes the executed file bigger in size and of course increases the loading time. The following AS3 code can be used to play an external Mp3 file in flash. Stage.displayState = StageDisplayState.FULL_SCREEN In AS2 it was a single line code but in actionscript 3 we need to import flash display class.
#FLASH ACTIONSCRIPT 3.0 CODE FOR BUTTONS FULL#
This AS3 code snippet can be used to make the executed flash windows full screen. Disable tab (yellow rectangle) using AS3Įlaborated AS3 Code Snippets To make a fullscreen window.Below are some flash code snippets which are ready for use, just copy and paste any ActionScript 3 code snippets in your as3 coding. Here we have elaborated some useful ActionScript 3 Code Snippets (AS3 Code Snippets) to use in their regular flash developments.ĪctionScript 3 code snippets are helpful for flash developers which saves valuable time and energy. A developer, familiar with OOP can easily mingle with ActionScript 3. ActionScript 3 also uses an improved application programming interface (API) and E4X language extension to add XML as a native data type of the language. It gets executed by the ActionScript Virtual Machine (AVM) and ActionScript 3 (AS3) is executed with the new Virtual Machine called AVM2. ActionScript 3.0 is a robust yet easy to use object-oriented programming language that works behind the web apps we use.
