Posts

Showing posts with the label actionscript 3.0

Embedding Font in ActionScript 3.0

Image
Embedding fonts in Action Script 3.0 is fairly an easy job. The following is the steps you need to follow Goto the library of the Movie. Right click and click New Font. And enter the following information as shown in the image below. Now goto to the property panel and choose the newly created font. All fonts created and placed in the library will be post-fixed with a *. In our care here it is WProCap*. Now go to the property panel and click the embed font button. And do as shown in the image below. Click open and enjoy dynamic fonts in AS 3.0.

Error 1006 _ is not a function. Actionscript

This error happens due to a objects not having found a function with that name. The following could the reasons 1) Check that you dont have multiple files in different paths with the same name. One with the function and one without. 2) Check the linkage property in the library for the movieclip. Make sure it points to the correct package and class name. In my case, when I spent two hours trying to troubleshoot this F******** problem,I resolved it using method two. Flash by default creates a class for you if it cannot find the path and was breaking my head trying to figure out what is going on.

Actionscript 3.0 - Sounds

Okie! Handling sounds in AS 3.0 is so much of a bottleneck. Well its not a matter of something wrong with Adobe or the scripting language itself. But personally I just want to avoid so much trouble of declaring variables up and down just to MUTE the sounds. If only there was a simple way to do this. So here it is. To handle sounds this is what you do. I shall give an example for you to easily understand it instead. var vRequest:URLRequest=new URLRequest("sounds\monica_yells.mp3"); var vSound:Sound=new Sound(lRequest); var vChannel:SoundChannel; public function playMonica() { vChannel = vSound.play(); } public function stopSound() { vChannel.stop(); } public function muteSound() { var lTransform:SoundTransform=new SoundTransform(); lTransform.volume=1; vChannel.soundTransform=lTransform; }