Welcome To VertexTemplates.com Flash MX 2004 Tutorials Area - Movie Functions

Template Search By Category
Flash MX 2004 Movie Functions Tutorial.
Author: Akash Goel
Reprinted from www.spoono.com

Picture 1
1. First what you need to do is make or import your graphic which you want to mutilate. Select the image, then make a new movie clip by going to Insert>Convert To Symbol. Select "movie clip" and name it anything you would like, I called mine "logo". (You can click the image on the left to get a larger view.)

Picture 2
2. Select the movie clip which you made, and go to the Instance tab, similar to what it looks like on the left. Name it "box". Then, go to the top of the screen on top to the timeline, right click on the first frame, and choose "Actions". In there, write the following code, you can copy paste it if you would like:

tellTarget ("box") {
    ..:x = _x;
    ..:rotation = _rotation;
    ..:y = _y;
    ..:alpha = _alpha;
    ..:xscale = _xscale;
    ..:yscale = _yscale;
} 

Picture 3
3. The next thing you want to do is make the funky buttons for the up and down arrows. Mine are really basic ones, but you can get intricate and make them neat looking =p. After you're done making them, select the up arrow, and go to Insert>Convert to Symbol. Name it "up" and make behavior as a button. Go back and select the down arrow and again go to Insert>Convert to Symbol, name it "down" with behavior as a button.

Picture 4
4. Now, right click the "up" button and select "Actions". Write in or copy-paste the following code:
on (release) {
    tellTarget ("box") {
        _x+=10;
        ..:x = _x;
    }
}
Go back, and right click on the "down"button and select "Actions". Write in or copy-paste the following code:
on (release) {
    tellTarget ("box") 
        _x-=10;
        ..:x = _x;
    }
} 

Picture 5
5. The last step sets up moving the box to the left and to the right. If you want to do other effects like move it up and down, rotate, etc, repeat step 3 to make the button, and then plug in the following codes for each respective effect: Moving up and down: Up Arrow Code:
	on (release) {
    tellTarget ("box") {
        _y-=10;
        ..:y = _y;
    }
}
Down Arrow Code:
	on (release) {
    tellTarget ("box") {
        _y+=10;
        ..:y = _y;
    }
}
Rotating clockwise and counterclockwise: Up Arrow Code:
	on (release) {
    tellTarget ("box") {
        _rotation+=10;
        ..:rotation = _rotation;
    }
}
Down Arrow Code:
	on (release) {
    tellTarget ("box") {
        _rotation-=10;
        ..:rotation = _rotation;
    }
}
Increase and Decrease the Width: Up Arrow Code:
	on (release) {
    tellTarget ("box") {
        _xscale+=10;
        ..:xscale = _xscale;
    }
}
	
Down Arrow Code:
	on (release) {
    tellTarget ("box") {
        _xscale-=10;
        ..:xscale = _xscale;
    }
}
Increase and Decrease the Height: Up Arrow Code:
	on (release) {
    tellTarget ("box") {
        _yscale+=10;
        ..:yscale = _yscale;
    }
}
	
Down Arrow Code:
	on (release) {
    tellTarget ("box") {
        _yscale-=10;
        ..:yscale = _yscale;
    }
}
Increase and Decrease the Alpha/Opacity: Up Arrow Code:
	on (release) {
    tellTarget ("box") {
        if (_alpha+10<100) {
            _alpha+=10;
            ..:alpha = _alpha;
        }
    }
}
Down Arrow Code:
on (release) {
    tellTarget ("box") {
        if (_alpha-10>0) {
            _alpha-=10;
            ..:alpha = _alpha;
        }
    }
}

Whew, that was tiresome but your "box" should be fully functional and ready to go now. If you want to display the values like I did on the bottom right, just make a dynamic text box, and define the variables as: x, y, rotation, xscale, yscale, and alpha respectively. Hope this tutorial helps in explaining the vast functions of movies and if you need any help, just drop us an e-mail in the contact section.

Download Flash File

Table of Content
Affiliate Program Sign Up
Featured Templates
Website Template Small Picture
$55.00
Preview
and Details

 
Site Map
Our Resources
DMOZ Open Project
Top Template Sites
Our Partners
Flash Tutorials
Website Development News
Free Online Books
Web Templates
Free Wallpapers
Russian Science Fiction
Computer Software Downloads
Business Logo Design
Website Hosting
Cheap Web Hosting
OxyScripts
Web Hosting
Traffic Generation
CompTia
PageRank Checker
Tutorial Man
Tutorial Guide
layouts 4 free
Flash Templates & Tutorials
Professional web templates and graphics
Home    Web Templates      Affiliate Program      Template Tour      Custom Website Design       Tutorials      Articles      Contact Us      FAQ's

All Rights Reserved © 2005 VertexTemplates.com
Read our Terms Of Use and Privacy Policy
Flash Templates by Metamorphosis Design