Developers Archive for the 'flash action scripting' Category

Passing values to Flash From HTML

Passing values to Flash From HTML Thursday, January 18th, 2007

If we need to change some varibles used in flash,
we have to change in .fla file and then embed it to html.
To avoid this, We can pass the variable that frequently change.
Using PARAM tag(In HTML, which contain embed swf ), We can pass variables.

Example:

<PARAM NAME=FlashVars VALUE=”var1=value1″>

Create movieclip dynamically

Create movieclip dynamically Tuesday, December 19th, 2006

Creating an empty movie clip:

To create a new, empty movie clip instance on the Stage, use the createEmptyMovieClip() method of the MovieClip class.
This method creates a movie clip as a child of the clip that calls the method.
The registration point for a newly created empty movie clip is the upper left corner.

For example,
the following code creates a new child movie clip named clip2 at a depth of 100 in the movie clip named clip1:

clip1.createEmptyMovieClip(”clip2″, 100);

We can create text field in clip2 Using createTextField method.

Example:

clip2.createTextField(”label”, 20, 0, 0, 100, 300);

Mask Layers

Mask Layers Monday, December 18th, 2006

For spotlight effects and transitions, we can use a mask layer to create a mask which underlying layers are visible. A mask item can be a filled shape, a type object, an instance of a graphic symbol, or a movie clip. You can group multiple layers together under a single mask layer to create sophisticated effects.
A mask layer always masks the layer immediately below it.

To create a mask layer:

1. Select or create a layer containing the objects to appear inside the mask.
2. With the layer selected, select Insert > Timeline > Layer to create a new layer above it.
3. Place a filled shape, text, or an instance of a symbol on the mask layer.
4. Right-click the mask layer’s name in the Timeline, and select Mask from the context menu.
5. The layer immediately below it is linked to the mask layer, and its contents show through the filled area on the mask.
6. To display the mask effect in Flash, lock the mask layer and the masked layer.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.