- Open Flash by clicking on the Flash Icon on the dock:

- Create a new document. Make sure it is Actionscript 2

- Save (+SHIFT+S) document in work folder Save as embedded_clips:

- Create at least three layers
- Actions
- Buttons
- Images
-
In Frame 1 of the Image layer create your background image
- Create an object either by inserting a new movie clip or creating a new layer and drawing on that layer. When Drawing is complete, select the image
and convert to a movie clip (F8)
- In Scene 1, name your movie clip

-
Open the library and doube click on your movie clip to open it
- Add more layers and elements
- On one layer create an element that will be invisible-convert it to a movie clip, name the instance in the properties window
- Return to scene 1

- Click on frame 1 of button layer and add a button (Windows>Other Panels>Common Libraries>Buttons)
- Name the instance of the button in the properties window
- Click on frame 1 of the Actions layer and open the actionscript window

- Create functions that control at least one property of your embedded clip when an event occurs.
From previous example:btnName.onPress = function() { movie_clip.moveclip_obj._visible = 0; }; btnName.onRelease = function() { movie_clip.moveclip_obj._visible = 1; }; btnName.onReleaseOutside = function() { movie_clip.moveclip_obj._visible = 1; }; - Save, play and publish your movie, then link to and from homepage.
stop();
snd = new Sound();
snd.attachSound("Bubbles.aif");
_root.tank.fish1._visible = 0;
_root.tank.bubbles._visible = 0;
_root.tank.fish1.dx = -2;
_root.tank.fish2.dx = -2;
for (x=1; x<=2; x++) {
_root.tank["fish"+x].onEnterFrame = function() {
this._x += this.dx;
if (this._x<(_root.tank._x-(_root.tank._width/2+this._width/3))) {
this._x = (_root.tank._x-_root.tank._width/2)+this._width/2;
this.dx *= -1;
this._xscale *= -1;
}
if (this._x>_root.tank._x+this._width) {
this._x = _root.tank._x+this._width/2;
this.dx *= -1;
this._xscale *= -1;
}
};
_root.tank["fish"+x].onRollOver = function() {
snd.start(0,1);
_root.tank.bubbles._visible = 1;
_root.tank.bubbles._y = this._y+_root.tank.bubbles._height/2;
_root.tank.bubbles._x = this._x;
_root.tank.bubbles.onEnterFrame = function() {
if (this._y>=_root.tank._y+_root.tank._height/3) {
this._y -= 3;
} else {
this._visible = 0;
}
};
};
}
_root.btn.onRelease = function() {
if (_root.tank.fish1._visible == 0) {
_root.tank.fish1._visible = 1;
} else {
_root.tank.fish1._visible = 0;
}
};