5. After setting each picture property as seen in previous page, we now insert a new symbol for each of the images.
To insert a new symbol, click on insert,at top left of your flash document. click to select new symbol or you hold ctrl + F8 on your keyboard(shortcut).

Type img1_mc as name, then make sure you check  "Export for ActionScript" checkbox as shown in image below.


6. Now drag the first image into your document workspace, make sure the X-position = 0.0, and Y-position=0.0 (located at properties bar at down-left side of your flash document) as shown in image below:

7. Click on Scene 1 symbol, to select the default symbol. Next, we create 4 different layers.
- Rename layer 1 to stage by double-clicking on the layer,then insert stage as new name.
- Create a new layer called functions, by click on insert (top left corner of your flash document), name it functions than click on Actions tab close to the properties bar and insert the following below into it.

import flash.display.*
import flash.geom.*	

//Effects availables
var effects:Array = new Array({label:"Disolve", data:"cuadritos"})
myCombo.dataProvider = effects
//combo listener
effectListener = {}
effectListener.ref = this
effectListener.change = function(evt:Object){
	var action:String = evt.target.selectedItem.data
	this.ref.transition = action //set transition
	clearInterval(run) //re-create set Interval
	var t = (action=="cuadritos") ? 5000 : 2000 //Disolve needs more time
	//call inmediatly
	//set Interval
	run = setInterval(nextImg, 5000, this.ref)	
myCombo.addEventListener("change", effectListener)
//Gallery array, bitmaps on library
var images:Array = new Array("img1", "img2", "img3")
var current:Number = 0 //image counter
//general holder
a = BitmapData.loadBitmap(images[current])
w = a.width
h = a.height
container = this.createEmptyMovieClip("container", 1)
container.createEmptyMovieClip("holder", 1)
container.holder.attachBitmap(a, new Matrix())
container.holder._x = 0
container.holder._y = 0
//Set mask
//default transition
transition = "cuadritos";
//Begin gallery showcase
run = setInterval(nextImg, 3000, this)	
function nextImg(where){
	where.current = ((where.current+1)>where.images.length-1)?0 : where.current+1

//Transitions	**************************************************************
function cuadritos(nr){
	//Bitmap data for next image 
	var trans:BitmapData = BitmapData.loadBitmap(images[nr])	
	var pieces:Array = new Array() //array to store references to each piece
	var area:Number = 10 //default, should be divisible by image heigth/width
	var col:Number = w/area
	var fil:Number = h/area
	var p:Point = new Point(0, 0)
	var counter:Number = 150
	// Copy image and show in MovieClips
	for(var c=0; c0) t.velx = -t.velx
			if(int(Math.random()*2)>0) t.vely = -t.vely
			//copy bitmap to MovieClip
			t.attachBitmap(this[c+"_"+f], 1)
			//calculate area to copy
			var px:Number = c*area
			var py:Number = f*area
			t._x = container.holder._x + px
			t._y = container.holder._y + py
			var zone:Rectangle = new Rectangle(px, py, area, area)
			//copy pixels on this area
			this[c+"_"+f].copyPixels(a, zone, p)
	//Load new image
	container.holder.attachBitmap(trans, 1)
	//Fires transition
	for(var i in pieces) pieces[i].linearMove(600)
	//copy next image
	//release memory
//turn out - turn radial
function tiras(nr):Void{
	//Bitmap data for next image 
	var trans:BitmapData = BitmapData.loadBitmap(images[nr])
	var pieces:Array = new Array() //array for each piece
	var alto:Number = 10 //heigth of rectangle
	var fil:Number = int(h/alto)-3 //should be fixed (don't know why ??????)
	//Init positions to copy and position movieclips
	var posx:Number = container.holder._x
	var offset:Number = container.holder._y
	var posy:Number = 0
	var p:Point = new Point(0, 0)
	var counter:Number = 150 //use the same depths to overwrite old movieclips from previous transition
	for(var i=0; i=(w*h)) {
			delete this.onEnterFrame 
			//copy next image
			//release memory

The Image below presents exercise 7. 7