» Home » Movies » Tutorials » Submissions » Sound FX » Board » Links » Reviews » Feedback » About FK » Gallery » Fonts » The Lounge » Sound Loops » Sitemap
Login | Register | 651326 Members and growing!
Search tutorials
Author: Boban Klasnikov | Website: http://www.PowerOfArt.com

Now we have a perfect Mask effect that we can drag. Problem is that everytime we drag the mask, it drags the masked layer underneath it because they are both in the same movie clip, outline. The results is it consistently presents the same part of the image under the magnifying glass. To get around this, we have to make the movie clip bigpic move in the opposite direction for the same amount of movement magnifier does. This was done with the following action script placed in the second frame of the main timeline. (see below)

```Set Variable: "x_mask" = GetProperty (outline ,_x)
Set Property ("/outline/bigpic", X Position) = (200- x_mask)
Set Property ("/outline/bigpic", Y Position) = (200 - y_mask)
```

x_mask is the horizontal distance between the center of movie clip outline and the left upper corner of the stage (read Macromedia's Flash users guide, Flash bible or any Flash instructional book), y_mask is vertical distance between same elements.

Given the whole movie is 400 x 400 pixels, if outline movie clip moves for an amount of x_mask, then we want bigpic to move the same amount in the opposite direction. When x_mask or y_mask variable are read, the difference between real position of movie clip bigpic and position we want it to be would be as follows:

Moving the magnifier to the left for 50px from center, its position is initially 200px (what is X distance from left upper corner of the main movie) minus 50 equals 150. If we subtract 150 (or x_mask value of this example ) from the total distance from the center to the left edge which is 200, we end up with 50 px, the distance that bigpic will move to the right to portray the visual effect of staying still.

Have a play with the example again to get a better picture...

 » Level Intermediate Added: 2000-09-06 Rating: 7.99 Votes: 525 1 2 3 4 5 6 7 8 9 10 (10 being the highest) » Author Boban Klasnikov is a graphic artist and master illustrator. He came to computer design after more than 20 yrs of art experience. Currently working on web design at PowerOfArt.com » Download Download the files used in this tutorial. Download (189 kb) » Forums More help? Search our boards for quick answers!

• There are no comments yet. Be the first to comment!

• You must have javascript enabled in order to post comments.

Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.