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




Having Double Mask?



How can I do this:


I have a mask that works great, but I need to somehow add another mask ON TOP of that one so that only a certain part is visible. Since I m using this initial mask as part of several different "windows" in the same stage I need the 2nd mask to make certain parts visible...


please tell me there is a way to do this?@!
TIA



FlashKit > Flash Help > Flash MX
Posted on: 06-18-2002, 09:25 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

A Double Draggable Mask - Is It Possible?
So I'm creating a movie that must use two masks at the same time:

1. A mask that simulates a magnifying glass. When the mouse rolls over the movie clip, a 200% enlargement is displayed in a box next to the original image.

2. A rectangular mask that changes the original movie clip from grayscale to color on mouse rollover.

I am able to do each separately, but I haven't figured out a way to do both simultaneously. If anyone has any ideas, or has done this effect before, I'd love some help!

Thanks in advance!

Double Image Mask?
Does anyone know a tutorial that will tell me how I: have an image (JPEG) on top of another image (JPEG) underneath, then when you move over the image the cursor acts as an eraser (block) and erasers bits of the top image (JPEG) to releave the image on the Bottom?

Loading Swf + Double Clicking = Double Load -> Crash
Hello, help plz:

Have a button assigned to loading an swf, if the button is pressed twice the swf reloads and crashes, probably reloads data together and dosnt recognize, web crashes and needs to be reload reloaded... any suggestions?

thanks

Double My Array? Double The Fun
HEY!
Have a nice random array here courtesy of Pixelwit from this site but i need the numbers to duplicate in the array..as an example, instead of the array saying...
[7, 4, 23, 14, etc]
it would double them...
[7, 7, 4, 4, 23, 23, 14, 14, etc]
Below is the code...i'm too much of a newbie so far to make it work, any help would be great!
(alternativly, i just need code that makes a random 10 number array, no two numbers the same, but then duplicates each one twice in the array then assigns that array to a variable)
thanks

ActionScript Code:
// How to shuffle any Array
// (Robert Penner June 2001)
Array.prototype.shuffle = function () {
        var len = this.length;
        for (var i = 0; i<len; i++) {
                var rand = Math.floor(Math.random()*len);
                var temp = this[i];
                this[i] = this[rand];
                this[rand] = temp;
        }
}
//
// Make initial array and shuffle it
totalImgs = 25;
allImgsArry = [];
for(i=0; i<totalImgs; i++){
        allImgsArry[i] = i+1;
}
allImgsArry.shuffle();
trace("allImgsArry = "+allImgsArry);
//
// How to chop big array into little ones
function chopAllImgsArry(divisor){
        var i = 1;
        while(i*divisor<allImgsArry.length){
                this["imgsArry"+i] = allImgsArry.slice((i-1)*divisor, i*divisor);
                i++;
        }
        this["imgsArry"+i] = allImgsArry.slice((i-1)*divisor);
}
//
// Chop big array and show results
divisor = 10;
chopAllImgsArry(divisor)
for(i=1; i<Math.ceil(allImgsArry.length/divisor+1); i++){
        trace("imgsArry"+i+" = "+this["imgsArry"+i])
}

AS3: Mask Within A Mask (or How To Use A Shape With A Hole In It As A Mask)
Hi guys,

I've been stuck on this AS 3 masking problem for days now. I'm sure there's a simple solution to my problem but it's proving to be a pain.

I have a movieclip that contains some drawings, bitmap, etc. on top of that I am drawing a yellow rectangle with a hole in it using ActionScript:




What I want to achieve is to mask the movieclip container using the yellow rectangle, but I want the hole in the middle to not show the drawings and line:




However what I am actually getting is the yellow rectangle is masking the movieclip, but is ignoring the hole within it:




This is the AS3 code that I've written to get the above effect (with 'maskee' being the movieclip that contains the drawings):


Code:
function drawRectMask(p_sprite:Sprite) : void {
p_sprite.graphics.beginFill(0xf0ff00);
p_sprite.graphics.drawRect(100,100,300, 300);
p_sprite.graphics.moveTo(100,200);
p_sprite.graphics.drawRect(150,150,100, 100);
p_sprite.graphics.endFill();
}

var spr:Sprite = new Sprite();
drawRectMask(spr);
addChild(spr);

maskee.mask = spr ;

I'm at wits end. Any help on this would be greatly appreciated.

Client Request Feathered Mask Or Soften Fill Edges Mask
What application do you use to mock up flash designs?Photoshop7

How To Mask Duplicated Movie Clips With A Single Mask?
I have created 11 movie clips 17px in a vertical column.

I have used this code to duplicate them.


ActionScript Code:
for(i=0; i <10; i++){
    newName = "softwareBar" + i;
    duplicateMovieClip("softwareBar", newName, i);
    softwareBar._y += 17;
}

I have a mask that I need to use to cover all the clips, however when I use setmask it only covers the last looped item in the duplicateMovieClip code.

How would I go about masking all the duplicated clips with a single mask?


Not sure if this info is pertinent but once they are masked I will then be animating each duplicated bar separate using this function.


ActionScript Code:
loadBar = function(clipName, amount){
    clipName.onEnterFrame = function(){
        if(clipName._width<amount){
            clipName._width +=speed * speedDim;
        }
    }
}

Thanks
DDC

Mask Over Mask Leaving Pasrts Covered From Overlap.
Hello,

I have a complex image that I would like to mask with an animated mask.

I am using a movie clip with a couple of layers that "reveal" parts of the complex image at a time.
The problem is, when part of a mask overlaps another, it leaves that part of the complex image covered.

Is there a way around this?

Thanks in advance.

Drag A Mask, With Out Draging The MC Under That I Want To Mask Over?
Hello,

I have a mask and MC button which I am draging. I works fine other the fact the the whole MC movies even the MC inwhich I want to mask over: "BigYears" .

I have tryed to use:
onClipEvent (enterFrame) {
setProperty (this.BigYears, _x, -this._x);
setProperty (this.BigYears, _y, -this._y);
}

Then "BigYears" is not viewable under the mask.

INVERSED Mask? REVERSE Mask?
Okay, here's my dilemma.

I want a small circle to grow to reveal the contents within the circle, and THEN (and this is the hard part) I want another circle to grow from the same starting point that makes shows THROUGH to what's behind the circle.

So

I already have the first part done, where there's the contents on one layer, and a masked circle that tweens to reveal the contents.

BUT, the second part has to reveal the INVERSE of the contents... I don't really know HOW to explain this other than saying I want to punch a hole THROUGH the contents.

Any ideas?

HELP I Need A Mask Guru To Help Me With A Mask Problem
Hi,

I've got two mc's that are suppose to be playing simultaneously. Both duplicate mc's are called "Cloud Motion Tween" and there is one on the main timeline that has a brightness of -55 and the other duplicate of that mc is inside a mask in a mc called "Nav Bar (About)". Both mc's are suppose to be in sync.

Now every time I rollover the "Nav Hit Panel" button the mc inside the mask starts all over again and stuffs up the synchronization of the two mc's.

I have attached the fla file. You'll see what I mean.

Thank you so much for you valued time and effort. You are a true champ!!! (Whoever you are)

Blastbum

HELP I Need A Mask Guru To Help Me With A Mask Problem
Hi,

I've got two mc's that are suppose to be playing simultaneously. Both duplicate mc's are called "Cloud Motion Tween" and there is one on the main timeline that has a brightness of -55 and the other duplicate of that mc is inside a mask in a mc called "Nav Bar (About)". Both mc's are suppose to be in sync.

Now every time I rollover the "Nav Hit Panel" button the mc inside the mask starts all over again and stuffs up the synchronization of the two mc's.

I have attached the fla file. You'll see what I mean.

Thank you so much for you valued time and effort. You are a true champ!!! (Whoever you are)

Blastbum

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);

Attaching Mask Onto Mask Layer
Hi,

I've been trying to attach a movieclip from the library, to the Mask layer using actionscript so that the mask_mc can hide a line of text as it moves.

But the movieclip is not getting attached to the mask layer.

Please help....

Gradient Mask Using JPEG As Mask
Hi there. I am trying to find a way to use loaded greyscale JPEGs to form gradient masks in Flash. Basically I want to be able to create an opacity mask just like you do in Illustrator or Photoshop, where it's the darkness of each pixel that determines opacity, rather than the alpha value.

It seems that in Flash the only way to create a gradient mask is to use a mask that has varying alpha values. I suppose that means I could use PNG files to form my mask instead, but I really need to be able to do it with JPEGs.

Perhaps there is a BitmapData filter that can convert shades of grey to degrees of alpha?

Thanks :)

Lara.

Can The Mask, Mask Color To Create B/w
Is it possible for a mask to mask color? I would like my mask to mask the color and only show B/W in the output.

Help I'm Seeing Double
ctually i'm not! I want to scroll, but not text, pictures within a box. Basically i want to have a few photos scrollable on the left with a big picture in the middle - if any of you brainboxes out there can tell me how to click on the smaller ones to get to the central one, then i'd be overjoyed. just be happy at the moment to scroll the photos like i can my text.

pls pls help!

How To Do A Double Tap
I have a game and I'm wondering how to do a double tap. Quickly tapping the left key twice would then play a movie clip. I'm wondering if there's a code or something for it. Thanks.

Double Tap?
I have like a basic game, and it contains a bit of basic scripting, such as


Code:
if (key.isdown(key.right) {
gotoandplay ("walkright");
_root.player._x-=2;
}
and contains vcam,

but something is bothering me is, I'm trying to do a double tap, to do a dash, but when i search it on the boards. I get the script, but what's wrong is when I do the double tap it's like, run always even though i don't double tap. So i was wondering if anybody could spruce up the fla file.

Please don't insult my basic scripting, i'm young, still learning x.x
(P.S. I also added like, text on the bottom because of the vcam, so i can identify the frames)

I really appreciate this. Thanks.

Seeing Double
Would love to know how to fix this problem. Places 2 banners on top. What code do I remove and from where...between what and what do I place the proper code?

This is to do with taking the flash detection code from the swf's html and placing it properly (which I've not done apparently) in the index page.Would love step by step help.

http://www.enhancedwireless.net/index.html

Also, would you please tell me how I can give an alternate jpg file to appear in its place if someone doesn't have FLASH 8 player and doesn't want to download it?

I'm referring to the very top of the page with the IWICS logo and spelled out word...it's swf, but I have available a jpg of the same...

Thanks very much for your time.

KB

1+2 = 12? Double You Tee Eff
lol help me out guys, this is weird to the point of absurdity and it's driving me crazy... my code (basic):


var mynumber:Number = 1;
var total = mynumber + 1;
trace(total);
traces "11"


WTF? ugghhh

Double In AS3
How do I make a double in AS3.

I've tried var myVar:double and var myVar:float and they don't work.?????

Double Drag
bit of a problem here..

I have a customizable cursor, made with a mouseHide and drag action..I also have a scrollbar on the scene, also with a drag action..

The movie can't work with both drag actions ..

Is there something I can do ???????

Thanx..

Double-click (I Know It's Possible, But How?)
For an example of what I am attempting, Please check:
http://ecko.com/complex

Nice, right.
So far I have made a custom cursor.

Now, how do I script a double click event that goes to the interface movie clip???

I know you know...please help

Sasha Bad

Double Click
In my upcoming website:
http://www.nachorevolution.com/xex.html
On the yellow page the NR is dragable i figured that out. But now I want to make it so when one double clicks it will getURL. I can't figure out how to do this? any suggestions?

Double Arrays
hi...
i really need help with double arrays for use in matrices...
how do we declare them?
is "arrayname[2][3] = 5;" a correct expression?
it can't seem to work with me...
thank you for your help...

Double Skewing
I would like to make such the Star Wars Intro Test at
http://www.flashkit.com/movies/Effec...76/index.shtml .
I have tried to make one by myself but I'm unable to find
double skewing to give the perspective effect to the text.

I would be grateful if you can help me, I need to do such an intro
for the starting of an animation.

Thx for your help

Double Keypress
how can i capture double keypress?

Double Click
I am making a move where I have three main mc's(red, green, purple). In each mc is a button. each button opens another mc that relates to the main mc... they will be named: red2, green2, purple2. What I would like is to click on the button in the red mc and open tell the red2 to goto another frame, and when I click on the same button again the mc will go to the first frame again. Along with that I want the other mc's green2 and purple2 togo to their first frame if not already there. and likewise for all the main mc's

---- any one?

Double Link
I'm building a concentration game that needs to link a word with a certain definition. Any ideas on how to do this?
Thanks
ZOE

Double Click?
Hello!
Does anyone know a way to get a doubleclik with a Movie Clip?

Any help on this would be grat!
Thanks a lot.

Double Click Help
I have three buttons, each button has a corresponding mc. I would like each button to tell its corresponding mc if it is at the 1st frame go to 3rd and any other frame go to the 20th frame.

any ideas???

DOUBLE POP UP WINDOW
Hi! I add a pop up window function to a button, but when i click on it, two pop ups appear, one with the wright size and content, and another empty window. Can you help me?
this is the code
on (release) {
getURL("javascript:window.open('http://www.houseoflourdes.com/audio.swf','Audio','width=224.2,height=349.6')", "_blank");
}
Thanks!

Double Click?
id there a double click function in flash mx?

if not how would i do this using flash 5 techniques?

tnx

Double Hit Test? Possible
here's my deal:

I have 2 little items. I'm using hitTest to "snap" them into a certain area or bigger "box". You can grab them once they are in the "box" and pull them out, they will snap back to original coordinates.

Problemdon't want both items in the box at the same time.
there is a glitch when you take the item out of the box. the mouse holds it and you have to click on an open area to release it.

I've tried passing variables and even setting another hitTest.

Any suggestions?

http://www.sphosting.com/furrysnake/squirrel_bags.html
http://www.sphosting.com/furrysnake/squirrel_bags.fla

Double MC Trouble :s
Hi,

I wrote this script, which makes things bouncy and it works good on one MC but when I add it to any more than one they get all screwy. I've tried adding it on different level and with different instance names. Please check out this example:

One MC:
http://xotex.net/jenni/bouncy.swf

Two MCs:
http://xotex.net/jenni/bouncy_2mcs.swf

Here is my script... just call it with an onClipEvent hitTest().


Movieclip.prototype.elasticScale = function (target, accel, convert)
{
xScale = xScale * accel + (target - this._xscale) * convert;
yScale = yScale * accel + (target - this._yscale) * convert;
this._xscale = this._xscale + xScale;
this._yscale = this._yscale + yScale;
}

Any ideas?!?

Thanks!!!

-- jenni

Double Equals
what does == mean? how is it different than =?

DOUBLE PROBLEMS
sorry for bothering you vets with my stupid questions... here it is: ive created a "pop-up" window that is triggered by a button. the window is actually a movieclip that expands and then a text area appears. 1) the text area shows the text from about.txt when you edit the movieclip seperatly and go control > test scene. but when I put it onto the stage, the movie clip works fine except that the text area dowsn't appear! 2) I have a little "close window" button in the window. i used the onPress goto and play scene 1 frame 1 so the flash movie will start over, but instead only the movieclip containing the button starts over! it's late, i'me tired and CAN'T go to bed intill I solve this. PLZ help!! thanks guys

They Double Click Right By Me
I'm making a software simulation using screen shots and invisible buttons.

I'm using this button script graciously supplied by a board member:

"create an input textbox, give this the variable name answer1 add the frame actions

Selection.setFocus("answer1");
stop();

and on the same frame also place a button.

add the following acrions to the button

on (release) {
studentAnswer = answer1.toLowerCase();
correctAnswer = "what the answer should be";
if (studentAnswer == correctAnswer) {
gotoAndStop(someFrame);
}
}"

The student is expected to fill in an input text blank correctly before he is allowed to move on in the tutorial. Much to my horror, what they've discovered is, if they double click (instead of single clicking like they're instructed to do), they skip right past the text blank and are taken to the next page of instructions. Is there any way of preventing this in the swf file?

Thanks, Mike

Double Space
Ok, if i make a dynamic text field with multiline, etc and then use load var command and put a x.txt there with var=texttexttexttextettxte(manylines)
everything works well, but i get double spaces... why ? How to fix ? thanx

Double Click
Why do I have to double-click on links within my movie? My external links are all single click.

Thanks!
Jeff

Double Variable
Hi all,

How to get a double value (4.00) from a integer (4) directly in Flash.

Thanks

Amit

Double Return?
How do I insert returns in my the text files that I load into dynamic textfields? If I create a hard return in the txt file it creates a double spaced document how to I have it make a single spaced one?

I Double Dare You To Help Me
I need to launch 3 separate "setup.exe" from 3 separate buttons within a CD Flash. I want to know if anyone has done this...
currently this is the code I am using for each button:
(keep in mind each .exe has to be in a separate folder to launch it correctly)(I can make it work with one exe. when I put it into a FScomand folder but I have 3 different apps I need to launch!!!)

on (release) {
fscommand("exec","folder1/setup1.exe");
}

on (release) {
fscommand("exec","folder2/setup2.exe");
}

on (release) {
fscommand("exec","folder3/setup3.exe");
}

I cant get anything to happen!!!!!!!! I am using MX. HELP!!!!!!!!

Double Click Help
I'm trying to set up a double click. I have a nav system that is a box the width of the stage and rests at the very bottom of the stage. When you click anywhere on the stage it slides up to that point. When you make a slection it goes back to it's original y position. I want to make it so that the user has to double click to bring the menu up though cause the single click interferes with my other buttons. I know I need to come up with a timer variable of some kind but I'm not quite sure how to do this. Any suggestions? I've included my .fla file. Please help me. Thanks.

Help With Double Click
First let me explain the set up of my movie. Create a square the size of the stage and turn it into a MC. Place it at the bottom of the stage so that only about 20-30 pixels of it are showing. Add this code to the MC...

onClipEvent (load) {
var valid = true;
newY = _y;
origY = _y;
Yspeed = 3;
a = 1.6;
d = 1.9;
}

onClipEvent (enterFrame) {
Yspeed = ((_y-newY)/a+Yspeed)/d;
_y -= Yspeed;
}

onClipEvent (mouseDown) {
if ((valid == true) and (_root._ymouse < 300)) {
newY = Math.ceil(_root._ymouse);
valid=false;
}else{
if ((valid == true) and (_root._ymouse > 300)) {
//if the mouse is below the minimum for the nav to show, it puts it at this point so it can be seen
newY = 300;
valid=false;
}
}
}

Now, I want to make the onClipEvent(mouseDown) occur on a double click. I'm not sure how to go about setting this up. Any help would be greatly appreciated. I've included my .fla file, it was created on a Mac though so sorry PC people. Please help me. Thanks for your time everyone.

Url Double Loading Help
i have my flash video done but when it comes time to load the url it double loads and errors out please help. www.iowapaintballpark.com click the link so you can see what it does.
thanks to all that can help

Double StartDrag?
Heres the idea:
To have a mask shape that is dragable and an outline shape around that mask shape that drags with the mask shape, to show its borders (and give it a lil asthetic pazzaz).

Is it possible to have two startDrag(); actions? When i have tried this the last shape mentioned in the code gets dragged, but the other one just sits there laughing at me!
Greg Davis

Double Hittest?
I have objects (created by duplicateMovieClip) on screen that you can shot down, but now i want to create another object that is much harder to "kill".
I want the "harder" object "killed" in two shots instead of one.

The problem is that i have more than one of these objects created by:
code: for (i=1; i<=totalAst; i++){
ast.duplicateMovieClip( "ast"+i, i+20 );
}
I know that this is possible if you only got one object but now i have several.

Any ideas?

Thanks!

Copyright © 2005-08 www.BigResource.com, All rights reserved