Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / July 2008



Tip: Looking for answers? Try searching our database.

Viewing only part of a movie clip.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
K0raX - 16 Jul 2008 21:43 GMT
Well, basically, as the title says, can it be done?
For example, i have a 300x300 movie clip and i only want to see a 100x100 part of it.
Noelbaland - 17 Jul 2008 05:50 GMT
Only one way I can think of but first you should save a different version of
the file you have.  In this version, resize the stage to 100 x 100 px and
position your Movieclip on stage to the area you want to preview.
K0raX - 18 Jul 2008 22:20 GMT
Thx for ur answer. That isn't a solution i didn't know. I forgot to mention i
want to be able to integrate this movieclip into my flash site, so i need
interactivity with some other objects too. So basically there is no other way
right?....
My movie clip contains a moving series of photos. It's supposed to appear in
front of another movie clip (another series of photos) but only when the user
enters a particular menu (the mc below is there permanently). But it is also
supposed to show that movie clip in a 400 x 120 px box whereas the movie clip
has around 1000px in width.
Any ideas?.. Generally or in particular? :D
Noelbaland - 19 Jul 2008 02:22 GMT
How about using a mask?  But don't create the mask on the Stage - do it via
Actionscript.  Lets say the movieclip you want mask is called "gallery_1" and
has an X position of 0 and Y position 0f 100.  You would put the following
script on a frame in the timeline.

Hope it helps

// Create an empty MC on stage and set it's depth to about 10
this.createEmptyMovieClip("maskMC", 10);

// Fill it with a solid black color and set it's width to 400px
// and it's height to 120px
maskMC.beginFill("0x000000");
maskMC.moveTo(0,0);
maskMC.lineTo(0,400);
maskMC.lineTo(400,120);
maskMC.lineTo(120,0);
maskMC.lineTo(0,0);
maskMC.endFill();

// Position it over the gallery_ 1 movieclip and
// set the gallery_1 mc to the mask
maskMC._x = 0;
maskMC._y = 100;
gallery_1.setMask(maskMC);
K0raX - 19 Jul 2008 11:24 GMT
I haven't tried that yet but i had thought about mask....However, what i don't
get (and haven't been able to find out) is How a mask works. Help doesn't help
and googling it didnt help either. I mean... i understand you can make a movie
clip "mask" another but how exactly does that work?...
Shan-Dysigns - 19 Jul 2008 18:22 GMT
I don't think you looked hard enough about a mask. It's as simple as creating a
layer above the layer you want to mask, draw some sort of shape, right click
that layer and choose "mask". The mask effect only appears when the mask layer
and the layer(s) below it are locked. You can also draw a shape for the mask,
convert it to a movie clip, give it an instance name, and mask it with action
script

mcToMask.setMask(mcMaskClip)
K0raX - 20 Jul 2008 08:37 GMT
@Shan-Dysigns: Thanks for the reply, but i didnt mean what i can do with a mask
but what it does. In any case: nevermind i finally found an example and it
showed me what i needed to see.
@Noelbaland: That worked after all, although the lineTo() were a bit off ;)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.