web design template


Dear Friend,

Hello, & welcome back to FIREWIRE, your friendly guide to the exciting world of web-design & web-solutions! In the previous newsletter of Flash 5 Tutorial Series we had discussed While Statement, If & Else Statement, Start & Stop Drag, Focus Rectangle, Sound Buftime, & High Quality. Now let’s Continue with Mouse Properties, Mouse Methods, Duplicate Movie Clip, Remove Movie Clip.



Using the mouse properties, x and y position of the mouse pointer can be obtained. They can be obtained in two ways i.e. _x mouse and _y mouse.

x mouse
This is a read only property. It returns the x co-ordinate of the mouse pointer.

Syntax :
instance ._xmouse

Example :
on (press)
{
outx = plane._xmouse ;
}

Where plane is the instance name of movie clip. _xmouse is the properties of mouse.

y mouse

This is also an read-only property. Using _y mouse the y co-ordinate of mouse position can be determined.

Syntax :
instancename._ymouse

Example :
on (press)
{
outy = plane._ymouse;
}

While pressing the button, the y co-ordinate can be viewed in the outy text box.


Mouse methods
are used to hide and show the mouse cursor in the movie. By default, the mouse pointer is visible and it can be hided. There are two methods. They are

Hide
This method hides the cursor and the cursor is visible by default.

Syntax :
mouse .hide( );

Example :
on (press)
{
Mouse.hide ( ) ;
}

while pressing the button, the mouse cursor becomes invisible it has to made visible only by using some other method.

Show
Using this method the mouse can be made invisible, if it has been hided. In other case, by default mouse is visible.

Syntax :
mouse.show ( );

Example :
on (press)
{
mouse.show ( );
}

The button is pressed and the mouse pointer becomes visible. (By default, pointer will be visible).


Using duplicate movie, the instance of a movie clip can be created while playing the movie file.
If the parent movie clip is deleted, then the duplicated movie clip is also deleted.

Syntax:
duplicate movie clip (target, new name, depth) where target is the name of the movie clip.

new name is the unique identifier of the movie clip. depth is the stacking order of the duplicate movie clip. The first movie clip will be given a depth of zero and the next is given 1 and so on. To avoid this overlapping, specify the depth level properly.

Example:
on (press)
{
duplicate movie clip ("car", car +x, x);
}

where car is the instance name of movie clip

car + x is the new name (identifier) of the movie clip.

x is the variable which holds the value of depth.


Using this command, a movie clip which is created using duplicate movie clip methods of movie clip object can be deleted. The movie clip can be deleted with remove movie clip.

Syntax:
remove movie clip (target);

Target is the name of the movie clip.

Example:
remove movie clip ( );
On (press)
{
remove movie clip ("Car");
}

on pressing the button the movie clips created using duplicate movie clip can be deleted.

Where car is the name of the movie clip.

Regards,

Manoj Kotak.
The author is Director of Image Online Pvt. Ltd. developer of
Layout Galaxy web site design templates for photoshop and Flash.

All accompanying logos, brands and product names are trademarks of their respective companies.

Blood for humans comes only from humans : Donate Blood
http://www.donate-blood.org   E-mail - om@donate-blood.org




© Image Online  2001-2003