Swami Charan's Blog My personal blog…

8Apr/100

Simple Menu in Flash AS3

Hi all, upon request from people, here i am with a small tutorial on 'Creating a Simple Menu' in Flash AS3.

Final Output:

This movie requires Flash Player 9

10Sep/0941

Using Tween Class in Flash AS3

Using Tween Class, we can animate, fade or move any specific movieclip to animate over a specified period of time.

 import fl.transitions.Tween;
import fl.transitions.easing.*;

var myTweenX:Tween=new Tween(_mc,"x",Elastic.easeOut,36,260,3,true);

We can use different Easing mechanisms to perform this animation. We have following differnet Easing methods:

  • Back : the animation will go beyond the end position before bouncing back into it
  • Bounce: the animation will bounce back a few steps when it reaches the end position before settling at it
  • Elastic: a mixture of Bounce and Back effects combined
  • None: no special tweening, the object movement will not speed up along the path
  • Regular: the animation will gradually increase or decrease in speed as specified by the easing method
  • Strong: a more emphasised Regular effect
6Sep/092

Working with Sound in AS 3.0

In this post, we are going to look at handling, playing and dealing with Sound in Adobe Flash AS3.

The simplest way to play any local mp3 sound is that you need to make a URLRequest to the mp3 file and pass it to Sound object.

var req:URLRequest = new URLRequest("sample.mp3");
var mySound:Sound = new Sound(req);
mySound.play();

Checking the loading of the Sound

Sound class can dispatch events like ProgressEvent.PROGRESS and Event.COMPLETE to check the loading process of a Sound File. Using ProgressEvent.PROGRESS event, we can keep track of how much of the Sound Data is being loaded and how much sound has been played.

2Sep/095

Alpha-Channel Masking in Flash

In this post, we are going to see how we can implement masking in both Flash using  AS2 and AS3. In extension to this, we will talk about Alpha Masking as well.

Mask in Flash is something like a window through which we can see any other Display Object. In Flash, the Display object that we see through the mask is termed as a Maskee.