Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Dynamic Mask / Layers?


It it possible to mask movie clips you have added via duplicateMovieClip, at the moment the added movie clips appear above the mask on the stage because of the stack order.

I have head that you could attach the mask thus setting the layer order above the duplicateMovieClip.

But how dose this work, where do I state that the movie clip should be a mask and also mask the layers below it...

Any help much appreciated

shef




Ultrashock Forums > Flash > ActionScript
Posted on: 2002-12-05


View Complete Forum Thread with Replies

Sponsored Links:

Dynamic Text Fields With Mask Layers
I have found that when dynamic or input text fields are used in layers that are within mask layers, they don’t display.

Does anyone know a way around this as I have come across this problem couple of times now.

Loz

View Replies !    View Related
Mask Layers....
i have flash mx and i am looking for a good tute that will explain the basics of mask layers.... i think i understand the concept of them but i need a bit of help on some of the details and a tute will help tons
thx

View Replies !    View Related
Mask Layers
Please someone can tell me about mask layers, what can i do with them , and how?



thanks

View Replies !    View Related
Mask Layers
My doubt is very simple, i´m doing an effect using a mask layer. When i test the movie just pressing enter it runs ok but, when i test it with ctrl_enter it doesn´t appear as a swf. Only appears the withe stage.

Thanks if anyone can help me.

View Replies !    View Related
DuplicateMovieClip And Mask Layers
I want to duplicate a movie clip and keep the duplicate under the mask layer. The original movie is already under the mask...

Is there a way ?

CharlesFK

View Replies !    View Related
Problems With Mask Layers
Say I'm trying to do something trite and overused like the ever popular "spotlight effect". You know, everything is dark, except for a spot of "light" generated with a mask layer. Is it possible to have the light follow the cursor, or be controled by the program in any (non-deterministic) way? It seems like this should be very possible, but every way I've tried for moving the "light" mask (a simple circle) has failed, except for tweening. And tweening isn't very useful if I want to be able to move the light on the fly.

As far as I can tell, any movie clip inside a mask layer seems to a) immedietly stop, and refuse to play or animate itself. b) not respond to having it's properties set, including the _x and _y position properties. c) ignore any methods I call on it. (Such as startDrag, etc)

Am I doing this right? I can't seem to find a good way to do this, but I can't believe that the macromedia people wouldn't let us do something as basic as this. (And I thought that for SURE I'd seen a "spotlight cursor" somewhere before...)

So... is there a workaround? Am I just ommiting something stupid? Or is this really going to be a roadblock?

Any input will be greatly appreciated.

thx


-Mathonwy

View Replies !    View Related
Mclips Into Layers Mask
I didn't control from ActionScript Movie Clips created in Layers Mask. It doesn't work nothing !!!
Image to modify _height property from ActionScript for a Mclip that masks another object in a layer under.

Best Regards

View Replies !    View Related
Mutiple Mask Layers
Hi -
If anyone would have time to answer a question I would be most thankful. I am trying to create an effect with mask layers - I have lots of little movie clips with random movement scripted to them - I want them to act as a mask for an image - however I have found that only one movie clip on the layer acts as the mask - even if i put all of the shapes in one movie clip and then try and use it for the mask it doesn't work, can anyone tell me what I am doing wrong?
Thanks,

View Replies !    View Related
Color Of Mask Layers
I was wondering if it was possible to change the color of the masking layer, instead of just plain white. If anyone knows, could they let me know. Thanks

View Replies !    View Related
Scripts With Mask Layers
Hi, I use Flash 5 at the moment and am thinking of going to Flash MX 2004. In flash 5, i've set up a mast layer with a movie clip as my 'spotlight', I added a simple script to drag it with the mouse but the script won't run! Is there a bug in my Flash or do I have to use Flash MX 2004 for draggable mask layers? thanks for reading ^_^

-MegaJohnny

View Replies !    View Related
Growing Mask Layers...
i'm making a little movie that i would like to start out with a black screen with a pin hole in it that grows to reveal the whole page. i have flash 8 so drawing objects don't bite out of eachother the way they did in MX. i also don't want to make a mask layer that the black part has to grow to be thousands of pixels wide and tall to make the pin hole big enough to see the whole screen...

any suggestions?

View Replies !    View Related
Mask On Multiple Layers?
I want my animation to be seen thru a mask and there are many layers. How is it possible?

View Replies !    View Related
Mask On Multiple Layers?
I want my animation to be seen thru a mask and there are many layers. How is it possible?

View Replies !    View Related
How Mask All Layers And Folders
Hi people,
please which is the script to mask all layers and folders in document?

Thx
mk

View Replies !    View Related
Creating Multiple Mask Layers
How can you link more than one mask to a layer.......need to know since motion tween only supports one symbol per layer

View Replies !    View Related
Mask Layers In Movie Clips
Hello.

I have a simple mask layer animation in a movie clip--the mask moves to reveal some text, typewriter style. When I drag the clip onto the stage, it does nothing. It doesn't show up at all when I test the movie.

I have a play action on the first frame of the clip and a stop action on the last frame.

Why won't it work?

thanks.

scrambledfigs.

View Replies !    View Related
Can I Make Two Layers Of Mask For One Object?
can i make two layers of mask for one object?


thanks.

View Replies !    View Related
[F8] Preserving Mask Layers With MovieClipLoader
I have one Flash file, masked.fla. Quite simply, it's a red square, partially covered by a blue square. The blue square is set as a mask to the red square below, so only a portion of the red square is visible.


Code:
this.createEmptyMovieClip("square_mc", 1);
square_mc._x = 10;
square_mc._y = 10;
square_mc.beginFill(0xFF0000);
square_mc.moveTo(0, 0);
square_mc.lineTo(100, 0);
square_mc.lineTo(100, 100);
square_mc.lineTo(0, 100);
square_mc.lineTo(0, 0);
square_mc.endFill();

this.createEmptyMovieClip("mask_mc", 2);
mask_mc._x = 60;
mask_mc._y = 60;
mask_mc.beginFill(0x0000FF);
mask_mc.moveTo(0, 0);
mask_mc.lineTo(100, 0);
mask_mc.lineTo(100, 100);
mask_mc.lineTo(0, 100);
mask_mc.lineTo(0, 0);
mask_mc.endFill();

mask_mc.cacheAsBitmap = true;
square_mc.cacheAsBitmap = true;
square_mc.setMask("mask_mc");


This code above, and subsequent SWF, behave exactly as expected, until I try to load it into a separate Flash file with the MovieClipLoader method. When I do this, I lose all masking layers, and I'm looking at both squares. Here's my code for the second file:


Code:
var loadListener:Object = new Object();

var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);

var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mcLoader.loadClip("masked.swf", mc);


Any ideas on what would cause, or rather how to remedy, this issue? Thanks in advance.

TheLegioneer

View Replies !    View Related
Magnifying Glass Mask Lining Up Of Layers
I'm having trouble getting my top magnified layer to line up with the smaller lower layer. THe top one keeps moving to far over to the right no matter where I place it in the movie. Is there any code I am missing to make this line up properly?

View Replies !    View Related
Multi-mask Layers For ONE Image Layer?
Hi everybody,
I want to create an animation as follows:
- Six mask layers on top ONE image layer
- The image will open partially as the masks open up
Please remember that I don't want to create each image layer for each mask layer to avoid big file size
So can I use SIX mask layers for ONE image layer? I don't know how as the image layer can be affected by the top-nearest mask layer only. Please help me. Thanks a lot
hcongthanh@yahoo.com

View Replies !    View Related
Importing SWF, Layers And Actionscript Mask Question
Hi All,



I am trying to attach an animation I created in another swf. The movie attaches itself fine (see code sample 1). However an actionscrip mask I have used (please look at sample code 2) does not display at all. The animation works, but the mask (pre-built into the animation) is not working. Now I am pretty sure it has something to do with layers.



Any help would be appreciated.





// CODE SAMPLE 1

function createLoad()

{

trace("attempting to load movie");

this.attachMovie("loads", "loads_1", 1);

loads_1._x = 60;

loads_1._y = 340;



trace("playing movie loading");

}



// CODE SAMPLE 2

onClipEvent (load) {

_level_0.snowy.setmask(_root.hole);

}



Thanks,



Obelisk

View Replies !    View Related
Mask Layers Works Backwards In Publ'd View
I've got a simple button that will launch an URL. In the 'up' and 'down' states, I have placed the same graphic symbol. In the 'over' state, I placed a movie clip. To create the 'still' states for this button (the graphic symbol used in 'up' and 'down') I copied the movie clip and turned it into a graphic symbol with 1 frame, so the mask and layers in both symbols are all from the same construction.

The masking works fine after I lock the mask layers and return to the main scene. But when I publish, only the 'over' state with the movie clip displays correctly. The 'up' and 'down' states reveal the mask and the layers beneath are not masked at all.

I tried changing the graphic symbol into a movie clip via the properties dialogue to no avail. Even with all three states containing movie clips, it doesn't work.

i'll attach the file - very simple header for a band website. The item in question is the icon beside 'click to launch player'.

View Replies !    View Related
Applying A Mask To Layers Which Follow A Motion Guide, Not Working
ooh arrrr, for some reason when i try to apply a mask to a guide layer and the layers below it (gfx which follow the guide), the layers dont get linked, the mask therefore doesnt work.

I tried placeing the mask layer inbetween the guide layer and the guided gfx layers blelow but it would not let me.

Can you do this in flash? were am i going wrong, my animation is quite simple: small molecule like circles follow a guide layer which is a line.
At a certain point in the line i want the molecules to be visable then further along the line it want them to dissapear. I thought a mask would best achieve this but it doesnt work.

Im using flash8 but publishing in mx2004, i would upload the .fla buts its to big and im not really suspose to make the content public not thats its secret or anything but beacuase its for a museum, i have included a pic tho.

thanks

View Replies !    View Related
Dynamic Mask Doesn't Mask...
I have a local radar image that I am loading into a holder movie clip and trying to mask but it doesn't work. Both the image and the mask are being displayed.

The holder movie clip is 'dopplerRad_mc' and I am attaching from the library.
The clip the image is loaded into is 'dopplerHolder_mc' and is dynamically created.
I then attach a mask movie clip from the library, 'imageMask1'.

My code is below. Any idea what I am missing?

var dopplerRad_mc:MovieClip = attachMovie("doppler_mc","dopplerRad_mc", getNextHighestDepth());
var doppler_mc:MovieClip = dopplerRad_mc.createEmptyMovieClip("dopplerHolder_ mc", dopplerRad_mc.getNextHighestDepth());
var mclListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(mclListener);
mcLoader.loadClip(doppler, dopplerRad_mc.dopplerHolder_mc,1);
dopplerRad_mc.attachMovie("imageMask","imageMask1" ,2);
dopplerRad_mc.dopplerHolder_mc.setMask(dopplerRad_ mc.imageMask1);

View Replies !    View Related
"duplicateMovieClip" Depth Issue Concerning Mask Layers
I'm using Flash MX and XML...

Here is what I have working right now:

-XML loads into flash
-I use the "duplicateMovieClip" function to generate a list of links.
-Each time this function is called, my hotlink MC is duplicated onto a new layer with the appropriate XML content loaded into it.

What I need to figure out:

-How to make these duplicated MC's affected by a mask. If I were to make for instance, 10 copies of "hotLink_MC" and put them in a masked layer, everything would be fine. However, these copies are generated using the "duplicateMovieClip" function, which puts each one on a new layer.

My Question:

How do I move my duplicated MC's to a masked layer?

View Replies !    View Related
Dynamic Layers
I have a flash document that contains a map of the uk divided into region's, each region is a symbol:movie on its own layer e.g. South West, Midlands etc. I am trying to figure out how to get the region that the mouse is over to display on top of everything else. Currently the regions display in the layer order so end up appearing behind each other. I'm not new to flash but haven't ever done anything as complicated as this before. Any pointers would be greatly appriciated. Thanks

View Replies !    View Related
Dynamic New Layers..
Hello all...

I seem to have exhausted my smarts trying to figure this one out.

What i want to do:

i want to be able to load an external swf into the current movie based on keyboard input. Meaning that when the user presses a given alpha numeric key, i want some corresponding content to load. And what is more, is i would like to have the new content come in overtop of the current content.

So if the user presses "A", that loads some kind of conent to the stage. Then when they press "B" that loads something else over top of the current content. And so forth.

None of my methodology seems to work. Any suggestions would be awesomely appreciated!

View Replies !    View Related
Dynamic Mask For Dynamic Text Won't Working Any Body Pls Help
Im' supposed to make a scrollable gridlike simulation with using MC. Inside that MC there are dynamic text area as cell in which its text will be updated dynamically.

Now i have a strange prob that when i use setMask to mask that grid MC it won't working


I have the MC name 'grid'
above that another MC name 'msk'

code is like tha
grid.setMask("msk");

it only shows the full grid instead of masking area.

View Replies !    View Related
[FCS3] Dynamic Layers
How do I dynamically control which object is shown above or below another? I want to create a rotating menu, where icons are revolving around a vertical axis. So the icons in the foreground will eventually become icons in the background and thus their view will get obstructed by the icons coming into the fore.

I'm figuring that the actionscript is needed to dynamically assign assets to layers. How do I achieve this?

(I haven't touched flash in ages and this may not be the correct place to post this)

View Replies !    View Related
Dynamic Images And Layers
How can I load in a dynamic image at the start of my swf and then have a text movie clip tween across the stage and be visible?
Thanks
Ryan

View Replies !    View Related
Dynamic Text In Layers
Perhaps this is more simple than I'm making it...but I have dynamic text in an MC I am loading with loadMovie and I want to change the text based on the button state. The instance where the text lives is actually being tweened for alpha:

Example

on (release) {
instanceMC.instanceLOADED_MC.instance_DYNAMIC_TEXT.text = "words";
}

I'm missing something easy.

My goal is to re-use the animation and have the text change when the user clicks certain buttons.

Help...and thanks in advance.

View Replies !    View Related
Dynamic Images And Layers
Hi All-

I've got a flash movie header for my website that allows me to send the image file names in the actual HTML code as PARAMs. The thing is, directly below the image, there are buttons and the whole thing doesn't fit together right, so I wanted to have the buttons on top of the changing image. Right now they are just .gif images, and since I transparency and z-indicies aren't yet widely implemented, I figured I would just make the buttons in the actual flash movie. The question is, is there a way to still send the image names to the file and leave the buttons on top of the dynamically changing image? I just don't know how to keep anything that I place in the movie on top....

The code for the current slideshow is as follows:

var pic_arr = images.split(',');
var currentSlide = 0;
// specify pic locations, alpha increment each frame, and
// number of frames to keep current picture displayed before
// transitioning to the next one
this.attachMovie("slideshow", "show", 1, {_x:0, _y:0, _visible:false, fps:12, nFrames:24, alphaIncr:10, slides_arric_arr, slideDepth:1, repeat:true, slideTracker:"currentSlide"});
// tell _root (this) to listen for events broadcast by show
show.addListener(this);

this.onAllSlidesLoaded = function() {
show._visible = true;
show.beginTransitions();
};
this.onShowOver = function() {
// set repeat:false in show for this to be called
// trace('slideshow is over');
};

};

View Replies !    View Related
[F8] Dynamic Drawing And Dynamic Mask Problems
Hi everyone. I've decided to start learning dynamic drawing (I'm using flash 8) and so I'm attempting to create a basic menu using purely actionscript. What I'm working toward is creating a main button that when pressed, it's sub buttons will drop down from behind it, using a mask to make them show up as they drop down.

I'm still at the initial phase of this. Currently I'm just placing the buttons in their final location so I can work the mask issue, which is where I'm having problems. I've got my script to create the buttons in their proper locations, and then to create the mask in it's proper location. The problem is when I try to apply the mask to the sub-buttons, it also masks the main button. I've tried this several different ways but still have not gotten any success.

Could someone take a look and see what you think? Also, if there is a much easier way to do this, please feel free. Thanks.

Here's my code:

Code:
//Set up some starting variables:
//menu position:
menuxoriginal = 100;
menuyoriginal = 100;
menux = menuxoriginal;
menuy = menuyoriginal;
//menu width and height:
w = 100;
h = 25;
//menu separation:
s = 5;
//corner clip off:
clipoff = h*.25;
//number of menu items:
n = 3;
//
//
//Now create the buttons - no labels on them yet.
//
for (i=1; i<n; i++) {
_root.createEmptyMovieClip("btn"+i, i);
with (_root."btn"+i) {
trace(this);
moveTo(menux, menuy);
//shade first box different color than all others:
if (i==0) {
beginFill(0x222222);
} else {
beginFill(0x3377ff);
}
//draw lines (button)
lineTo(menux+w, menuy);
lineTo(menux+w, menuy+h-clipoff);
lineTo(menux+w-clipoff, menuy+h);
lineTo(menux, menuy+h);
endFill();
}
//prep y location for next button (current y value+button height+separation value)
menuy = menuy+h+s;
}
//
//
//For Testing Purposes: place start of mask halfway over so we can see what's going on. Normally will be the original value of 100.
//
menux = 150;
//reset menuy to be the original value plus the height of the first button.
menuy = menuyoriginal+h;
//create the mask to start at bottom of fist button and cover all remaining buttons:
_root.createEmptyMovieClip("mask", 10);
with (_root.mask) {
moveTo(menux, menuy);
beginFill(0x000000);
lineTo(menux+w-clipoff, menuy);
lineTo(menux+w, menuy-clipoff);
lineTo(menux+w, menuy+5+((i-1)*(h+s)));
lineTo(menux, menuy+5+((i-1)*(h+s)));
endFill();
}
//here make the mask clip mask all the bottons except the first:
for (i=1; i<n; i++) {
_root.btn+i.setMask (_root.mask);
}

View Replies !    View Related
Dynamic Text Under Dynamic Mask W/ MS+ Scroller.......
Hola, everybody. I am stuck. I have some dynamic text under a dynamic mask.....I am using one of the MS+ scrollers (www.mirage-studios.com). This scroller requires the content to be under a mask. Since dynamic text wont show under a regular mask, I decieded to use a dynamic mask. The problem is that this scroller will only scroll up to the end of how big I made the dynamic text. Meaning if I made the dynamic text 500px in height, but the text being dynamically put in it, the scroller will only scroll down to that 500th pixel, rather than to the end of the text. Anyone know what I can do?

Thanks,
Gerard

View Replies !    View Related
Tutorial 57, Dynamic Text, And Multiple Layers Of MCs
I am working with tutorial 57, its an Easing Menu system. It works great but there is one thing that is happening and I don't understand why. I can not create a dynamic text field on the blocks that is deep within several layers of MCs. Static text shows up fine, but switch that static text to dynamic and when you text the movie the text disappears. I have been playing with this and asked for help before, but this is really confounding me. I got around using one block for loading an external text file by making one of the blocks have an Alpha = 0% then placing the dynamic text field under it where its only within one layer of MC. but the limit to that is I can only have one invisible block, I need to have the other blocks solid so to cover the other text field. to see my example go to http://www.kmlbearing-se.com hopefully someone here can explain why the dynamic text field is invisible.

thank you

View Replies !    View Related
Problem With Dynamic Text And Masked Layers
When putting a mask over a layer containing Dynamic Text or Input text, the Dynamic Text box dissapear. Why? can anybody help with this?
If you change the text box to Static Text, it reapears normally.

View Replies !    View Related
User Conrolled Layers (Dynamic On/off MovieClips)
First time poster here, hope someone can help me out.

I am trying to create an application that displays icons representing Problem Types over a floor plan. What is the best way to go about turning on and off various sets of icons? I have a total of 6 problem types.
(Example: Somone wants to just view where all the leaks and carpet tears are but not, paint problems, wall damage, etc)

I am attemtping to handle this with a seperate array for each problem type but when I go to remove the movieclips, nothing happens.

I don't so much need code but, if someone out there knows the best approach it would greatly help my closing deadline.

Thanks

View Replies !    View Related
Maintain Flash Transparency When Using Dynamic Layers
I’m creating a dynamic layer:

PHP Code:





function dylayer()
{  
var x = 150  
var y = 180 
var w = 176 
var h = 117  
var newDiv = document.createElement("div");
newDiv.setAttribute("id","oDiv");
newDiv.style.textAlign="center";  
newDiv.style.position="absolute";  
newDiv.style.top="140px";  
newDiv.style.left="150px";  
newDiv.setAttribute("style", "width:50%; text-align:center; position:absolute; top:150; left:180;");
document.body.appendChild(newDiv); 
newObj = document.createElement("embed"); 
newObj.setAttribute("src","transflash.swf"); 
newObj.setAttribute("width",w); 
newObj.setAttribute("height",h); 
newDiv.appendChild(newObj);







and loading a Flash swf file that has transparency:

PHP Code:





<PARAM NAME=movie VALUE="transflash.swf"> 
<PARAM NAME=quality VALUE=high> 
<PARAM NAME=wmode VALUE=transparent> 
<PARAM NAME=bgcolor VALUE=#CC6633> 
<EMBED src="transflash.swf" quality=high wmode=transparent bgcolor=#CC6633  
      WIDTH="176" HEIGHT="117" NAME="transflash" ALIGN="" .........> 






The javascript as is doesn’t include the Flash <param>’s for transparency. I’ve being trying to insert it using:


PHP Code:





 transpParam = document.createElement("param");
transpParam.setAttribute("wmode", "transparent");
newObj.appendChild(transpParam); 






Could someone help with the insertion or offer an alternative suggestion as to how to include the transparency param for flash

Many Thanks…

View Replies !    View Related
My Dynamic Text Boxes Covering Other Stuff That Is Above Them In Layers
I have some dynamic (external) text, but it is covering the bottom my titles that are on the main timeline, even though the titles layer is above the text layer. Is there some way to stop this from happening? The text boxes are physically below the bottom of the titles, so I don't know why this is happening.

View Replies !    View Related
Dynamic Grid / Dynamic Mask
Hi all,

I'm looking for some source code that would allow me to do something like the 4up flash piece at this link:

http://www.instyle.com/instyle/flash...128042,00.html

Can anyone help? What would you call something like this?

Cheers,
john

View Replies !    View Related
Dynamic Mask
Hi flash world!!!

I'd like to create a mask...for example a square or a triangle and change the shape, or size or rotation of it from actionscript... for example after press a button or after click a key...

Is it possible to change the shape, size or rotation angle of a mask from Actionscript? if so... how?

Thank you for your time!!!!

View Replies !    View Related
Dynamic Mask
I'm creating a list of images dinamically that I want to mask.

This is the script I'm using:

for (i=0; i<10, i++) {

img_MC = createEmptyMovieClip("image" + i, 3*1);
img_MC.loadMovie("image" + i + ".jpg);

}

The images are loading fine but I can't get it to mask

Any ideas how can I a mask Dynamically every image on the list?

Thanks

Alex

View Replies !    View Related
Dynamic Mask ?
Hello FlashKitters !!!
Maybe could help me with this simple question.
I have 2 layers, the first one is a dynamic text and the second one is a movieClip wich represents a square.
this Mc has an instance name, as "square"...
I move the _xscale property of this mc, dynamically... and it works...
So good : )
But now... when I transform my layer to the mask property, it doesn't work !!! : (
It seems that my squareMc does not respond...
My goal is to reveal the dynamic txt with a dynamic mask changing his _xscale property...

Does anybody know how to do that???

View Replies !    View Related
Dynamic Mask
Hi guys.

Where can I find a sample movie to realized dynamic mask like this:
http://www.renaultf1.com/it/public/flash/team/people/

or this:
http://www.renaultf1.com/it/public/flash/index.php

thanks

View Replies !    View Related
Dynamic / Mask
Is there anyway to put a dynamic text field that an external .txt file is loaded into in a simple mask? Right now it doesnt load it when its in the mask, but is there anyway to get around it?

View Replies !    View Related
Dynamic Mask?
Is there any way to set (via AS on the first frame) an MC as a mask?

What's happening is I'm dynamically creating a MC using createEmptyMovieClip and I'm using lineto and beginfill to create a box inside of it. I want that created box to be a mask. Is this possible?

Thanks,
DaVuLF

View Replies !    View Related
Dynamic Mask
Hi this is my code where i load six images called 1.jpg - 6.jpg


Code:
var slideH = 150;
var imgX;
var Count = 6;
var fullWidth:Number = 0;
var xValue = 0;
var yValue = 50;
_global.moveFlag = 1;
for (i=1; i<Count; i++) {
_root.createEmptyMovieClip("container"+i+"_mc", getNextHighestDepth());
}
var Listner:Object = new Object();
Listner.onLoadInit = function(movie_mc:MovieClip) {
//movie_mc._width = 100;
imgX = slideH/movie_mc._height;
movie_mc._height = slideH;
movie_mc._width = movie_mc._width*imgX;
movie_mc._x = xValue;
movie_mc._y = yValue;
xValue += movie_mc._width;
setMask();
};
loader = new MovieClipLoader();
loader.addListener(Listner);
for (i=1; i<Count; i++) {
loader.loadClip(i+".jpg", "_root.container"+i+"_mc");
}
function ImgMouseOver() {
trace("MouseUp");
}
function imgMover() {
if (_global.moveFlag == 1) {
for (i=1; i<Count; i++) {
var temp = eval("_root.container"+i+"_mc");
temp._x -= 3;
if (temp._x+temp._width<=0) {
temp._x = xValue-temp._width;
}
}
updateAfterEvent();
}
}
moveInterval = setInterval(imgMover, 30);
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
for (i=1; i<Count; i++) {
if (_root["container"+i+"_mc"].hitTest(_xmouse, _ymouse, true)) {
_root["container"+i+"_mc"]._alpha = 50;
clearInterval(moveInterval);
_global.mover = 1;
} else {
_root["container"+i+"_mc"]._alpha = 100;
}
}
};
Mouse.addListener(mouseListener);
function setMask() {
this.createEmptyMovieClip("box_mc", getNextHighestDepth());
with (box_mc) {
beginFill(0xFF0000, 100);
moveTo(100, 100);
lineTo(200, 100);
lineTo(200, 200);
lineTo(100, 200);
lineTo(100, 100);
endFill();
}
for (i=1; i<Count; i++) {
box_mc.setMask("_root.container"+i+"_mc");

}
}
last part i make a dynamic box from which i need to mask the jpg's but it doesnt seems to be working..

can anybody tell why?

Thanks

View Replies !    View Related
Can Dynamic Txt Be A Mask?
I have a dyn. txt field designated as a mask (manaully). when tested thit does not function as a mask. can dyn. text be a mask?

View Replies !    View Related
Dynamic Mask
I want to use a dynmaic mask but don't know where to start. I have been looking for a tutorial and haven't come up with anything. What I want to do is after the page has loaded open with a black screen. And I want the user to have to roll over the page to reveal the site. I also want to use an odd shape, no squares, triangles, etc..
If anyone can point me in the direction of a tutorial, or help me out that would be great.
Thank you

View Replies !    View Related
Dynamic Mask
hello I have a dynamic mask action code written below, can anyone help me edit this code so that it only reveals images on mouse press. Right now it automatically reveals images on mouse over.

onClipEvent(load)
{
_root.createEmptyMovieClip('square',0);
function drawSquare()
{
x = _root._xmouse;
y = _root._ymouse;
with(_root.square)
{

moveTo(x-10,y-10);
beginFill(0x000088)
lineTo(x+10,y-10);
lineTo(x+10,y+10);
lineTo(x-10,y+10);
endFill();
}
}
this.setMask (_root.square)
}
onClipEvent(mouseMove)
{
drawSquare();
updateAfterEvent();
}

View Replies !    View Related
Dynamic Mask
hi i am trying to a XML Photo Gallery using Kirupa's code as bellwo
This code Contain fadein fadeout effects(alpha Down,UP) for images . But i want to attach a MC as a Mask . That MC has a Tweened box zoom in animation. How to attach that MC as a Mask. and also i nedd this effects applies (MC effct) to preloder also. Please help me


http://www.kirupa.com/developer/mx20...otogallery.htm

Kirupa's Code.
------------------------------------------------------------------------------

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("1_gallery.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
prevBtn.onRelease = function() {
prevImage();
};
nextBtn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = pics.getBytesTotal();
loaded = pics.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (pics._alpha<100) {
pics._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
pics._alpha = 0;
pics.loadMovie(image[p], 1);
desc_txt.text = description[p];
pics_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
pics._alpha = 0;
pics.loadMovie(image[p], 1);
desc_txt.text = description[p];
pics_num();
}
}
function firstImage() {
if (loaded == filesize) {
pics._alpha = 0;
pics.loadMovie(image[0], 1);
desc_txt.text = description[0];
pics_num();
}
}
function pics_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved