0% found this document useful (0 votes)
51 views4 pages

Fungsi Objec Script

The document contains ActionScript code snippets for various Flash movie functions including: 1. Buttons to quit or close a movie, jump frames, toggle fullscreen, minimize, and load other movies. 2. Code to control sound playback, volume, and muting using the Sound class. 3. Code for playback controls like jumping frames forward and back, pausing, stopping, and playing a movie. 4. Additional code snippets for a volume slider, equalizer visuals, color changes, mouse-following animation, modifying the mouse cursor, and using a preloader.

Uploaded by

amungozi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views4 pages

Fungsi Objec Script

The document contains ActionScript code snippets for various Flash movie functions including: 1. Buttons to quit or close a movie, jump frames, toggle fullscreen, minimize, and load other movies. 2. Code to control sound playback, volume, and muting using the Sound class. 3. Code for playback controls like jumping frames forward and back, pausing, stopping, and playing a movie. 4. Additional code snippets for a volume slider, equalizer visuals, color changes, mouse-following animation, modifying the mouse cursor, and using a preloader.

Uploaded by

amungozi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

FUNGSI

Quit or Close

OBJEC

Tombol

SCRIPT

on (release) { fscommand("quit","true");

Atau
on (release){ getURL("FSCommand:quit", "true");}

Jump Frame

Tombol

on (press) { gotoAndPlay(5);}

Frame 1

fscommand("fullscreen","true");

Frame 1

setProperty("_root.minmax",_visible,"0");

Tombol

on (release) {fscommand("allowscale","true");}

N Play

Auto
Fullscreen

Minimal

min
on (press) {fscommand("allowscale","false");}

Maximal

Frame 1

setProperty("_root.full",_visible,"0");

Tombol

on (release) { fscommand("fullscreen","true");}

Max
on (press) {

Load Movie

Movie Clip

fscommand("fullscreen","false");}

Buat MC blank diletakkan di pojok kiri atas, dg


Instan Name clips
on (release) { loadMovie("tertuju.swf",0);}

Tombol

Scroll

Tombol up

on (press) {

teks.scroll -= 1;}

Tombol

on (press) {

teks.scroll += 1;}

down
InsNam: teks, Multiline, Dinamic text
Teks

Musik

Frame1

mySound = new Sound();

Tombol

on (release) {
mySound.attachSound("musik1");

mySound.stop();
mySound.start(0,999);}
Musik

klik kanan musik mp3, pilih linkage, centang

library

[v]export for actionscript dan export in first


frame,identifier:musik1

Stop

Tombol

on (release) { mySound.stop();}

Volume

Tombol

on (release) { mySound.setVolume(N);}
N= 10 s/d 100

Mute Volume

Tombol

on (release) { mySound.setVolume(0);}

Jump Frame

Tombol

on (press) { gotoAndStop(5);}

Forward

Tombol

On (press) {nextFrame();}

Rewind

Tombol

On (press) {prevFrame();}

Pause

Tombol

On (release) {stop();}

Stop Movie

Tombol

On (release) {gotoAndStop(1);}

Play Movie

Tombol

On (release) {play();}

Volume dg

Tombol

On (press){ kiri = _root.lintasan._x;

and Stop

Slide bar
kanan =_root.lintasan._x+200;
atas = _root.lintasan._y;
bawah= _root.lintasan._y;
startDrag(this,true,kiri,atas,kanan,bawah);}
on (release){stopDrag();}
Movie clip

onClipEvent (mouseMove){

slider
myPoint = new Object();

myPoint.x = this._x;
myPoint.y = this._y;
_root.lintasan.globalToLocal(myPoint);
_root.mySound.setVolume(myPoint.x);

Equalizer

Movie Clip

onClipEvent(enterFrame){
_yscale=Math.random()*345+50;}

Ganti warna

Tombol

on(release){
colorwarna= new Color(_root.warna);
colorwarna.setRGB(0xffff00);}

Animasi

Frame 1

Mengikuti

Buatlah objek Move_clip dg nama : circle_mc,


Pada Frame 1 ketik script :

Mouse
var speed:Number = 10;
circle_mc.onEnterFrame=function(){
var xDist = _xmouse-this._x;
var yDist = _ymouse-this._y;
this._x+=xDist/speed;
this._y+=yDist/speed;
}

Modife Mouse

Movie Clip

onClipEvent(enterFrame){
Mouse.hide();
startDrag(this,true);
}

Preloader

Movie Clip

//Buat mc dengan nama load, buat teks dinamik


dg variable :

// _root.teks , dan buat scrip di mc load :


onClipEvent (load) {
_root.teks = 0;
_root.load._xscale = 0;
}
onClipEvent (enterFrame) {
_root.teks += 2;
if (_root.teks>=100) {
_root.gotoAndStop(2);
}
_root.load._xscale += 2;
if (_root.load._xscale>=100) {
_root.gotoAndStop(2);
}
} // setelah itu di frame 2 buat tampilan baru

You might also like