Dwayne Carter: Faculty:Richland College: Multimedia Learning Center
//Button script: used to make the timeline play.
on (release) {
play();
}
//Button script: used to make timeline go to frame 10 and play.
on (release) {
gotoAndPlay(10);
}
//Button script: go to frame label "main".
on (release) {
gotoAndStop("main");
}
//Button script: go to a URL in a new (blank) browser window.
on (release) {
getURL("http://www.adobe.com", "_blank");
}
// Button script: To create a draggable Movieclip, put the following script on a button nested insde a movie clip The movie clip must have the instance name "monkey_mc".
on (press) {
_parent.monkey_mc.startDrag("");
}
on (release) {
_parent.monkey_mc.stopDrag();
}
// Button script: this script will confile the draggable area. It also centers the _parent movieclip under the cursor.
on (press) {
_parent.monkey1_mc.startDrag( true, 1, 1, 333, 333);
}
on (release) {
_parent.monkey1_mc.stopDrag();
}
// Button script: use this to stop all sounds that are playing
on (release) {
stopAllSounds();
}
//Button script: used to make "monkey_mc" movie clip
semi transparent.
on (release) {
monkey_mc._alpha=22;
}
//Button Script: this buton script uses the set_properties method for doing the same thing.
on (release) {
setProperty("monkey_mc", _alpha, "22");
}
//Button scripts: used to set rotation and width of a movie clip
instance
on (release) {
monkey_mc._rotation=22;
monkey_mc._height=444;
}
//Place this script on a movie clip. This will
make the movie_clip draggable when you click anywhere on the screen.
onClipEvent (mouseDown) {
startDrag("");
}
/*
Frame Script:
place this script on Frame 1. When movie_clip with instance name "trash__mc" is dropped over the movie_clip with the instance name "trashcan_mc", then the "trash_mc" instance is set to 12% alpha.
*/
trash_mc.onPress = function() {
this.startDrag();
};
trash_mc.onRelease = function() {
this.stopDrag();
if (this.hitTest(trashcan_mc)) {
trash_mc._alpha=12;
trace("you hit the trashcan");
}
}
//Put this script in frame one of an exe file. This
script will cause the exe to play full screen.
fscommand("fullscreen", "true");
fscommand("allowscale", "true");
//Button script: used to close an exe file. Make sure you also create
a "quit" button so that people can exit.
on (release) {
fscommand("quit");
}