Tuesday, August 11, 2009

Flash Button Definition

Sourcefile From: http://www.webdevelopersnotes.com/tutorials/adflash/button_tutorial_flash_simple_buttons.php3

Symbol: Button

The button symbol consists of only four frames called Up, Down, Over and Hit.

Over: Determines the button state when the mouse cursor is taken over it.

Down: Determines the button state when the mouse cursor is taken over it and the mouse button
is pressed (but not released).

Up: Determines the state of the button when a mouse button button is pressed and then released
over it.

Hit: Determines the area of the button.


setMask in Flash

Set Mask

bg1.setMask(mask1);

1. bg1: The Instant name for MovieClip to be masked
2. mask1: the name of the mask

*All must be in movieClip



Set Mouse to Mask

startDrag(mask1, true);
Mouse.hide();

mask1: the name of the mask

*must combine with the Set Mask code.

Wednesday, August 5, 2009

Actionscript to load external swf

What we need is simple : a button to launch the load, an empty clip to load the movie in, and a .swf file (called loaded.swf), in the same folder as the present movie.
  • Create a button to load swf file
  • Create an empty movie clip by pressing Ctrl+F8, give movieclip a Name as well as an Instance Name. Now open the library with Ctrl+L and drag and drop the movie clip on a new layer of your scene. (no reference to which part of timeline, just drag it in.)

After the above are done, Select the button and type below code into it's Actions Panel:

on(release){

loadMovieNum ("load.swf", "Stage");

}

load.swf: is the name of the file that you want to load

Stage: is the name of the movieclip with the instant name Stage

Tuesday, August 4, 2009

get into HTML after swf presentation

go to the last frame and insert Actionscript:

stop();
getURL("exhibitionHall.html", "_self");


Put HTML file in the same folder as swf file