ActionScript 2.0 :: Drawing Api And Masks?

Jan 23, 2005

I've been having this issue for a day or two now and it's really bothering me. Sometimes the drawing api draws to the mask perfectly fine other times it doesn't work at all.

[Code]...

View 5 Replies


Similar Posts:


ActionScript 3.0 :: Pencil Tool - Drawing Above A Image But The Drawing Is Below The Picture

Nov 9, 2010

i've tried to simulate a pencil tool, for drawing above a imagem, but the drawing is below the picture. How fix it?

[Code]....

View 3 Replies

ActionScript 3.0 :: Generate Drawing API Data From Drawing Object?

Jul 22, 2009

Basically I've got a reasonably complex drawing object in a fla and I want to reproduce it in a class definition using the drawing api. However obviously this is a tedious task, so is there some trick or automated method of doing this?

Last time I needed to do this it was a drawing of an arrow and I ended up writing down x,y,width,height values for everything but this one has curves in it which I don't have experience with drawing anyway.

View 2 Replies

ActionScript 2.0 :: Enabling Drawing Only When Drawing = True

Sep 28, 2009

I cannot get this to work. Without the "var drawing", "var drawing being true or false" and the "if statement", it works fine. But I need to add the "var drawing" so that you can only draw if you turn it on by pressing the "draw_btn" button. Note, I do not get an error, the script "apparently" contains no errors. Here is the code:

ActionScript Code:
var drawing = false
_root.createEmptyMovieClip("myLine", 0);

[Code].....

View 3 Replies

ActionScript 3.0 :: Drawing Over A Movieclip In A Custom Drawing App?

Jan 13, 2012

I've created a drawing tool which allows the user to draw on the canvas, the problem is that if I try to draw over a movieclip nothing happens. Is there a way I can allow for the user to draw over movieclips? For example if I had a background of paper?

Here's the code I'm using for it:

// This code is for drawing the lines on the page
//1.
var drawingLine:MovieClip = new MovieClip();
addChildAt(drawingLine,0);

[code]....

View 8 Replies

IDE :: Two Masks On One Layer?

Sep 24, 2009

I'm trying to display a shape using a mask in a way that it unhides the shape from left to center and in the same time from right to center.

--shape--
---><---

Is there a way to create a mask layer that animates two masks or to create two masks above one layer?

View 6 Replies

CS3 Multiple Masks To One Layer?

Mar 16, 2009

I was wondering whether it was possible to include multiple masks to just one layer?I have a huge deadline in for thurs and it would be a huuge help if it is possible.

View 1 Replies

Actionscript 3 :: Create Masks In It?

Mar 18, 2011

I can SEE the maskObject unless I set its alpha to 0 and then it doesn't let clicks through to objectToBeMasked

And every single tutorial that I've seen fails to mention this and how to solve it, as if it should be obvious.

How do I mask objects through AS3 so that the masks act like masks act like the ones added in the IDE?

View 3 Replies

ActionScript 2.0 :: Movieclips Under Masks

Jan 9, 2009

So I have a MovieClip, A, and inside of it is a layer that has shapes on it for a mask, this layer does have some keyframe animation (the masks move). Then I have MovieClips on other layers that are masked by the masking layer. When the movie loads, I load in an external jpeg and draw it onto a bitmap object, and then use that bitmap object and attach it to the moviecilps that are masked. This works fine, until the animation hits the part where the masks actually animated, then it reverts back to whatever i had in it before i attached the bitmaps. Is this a bug? or am i missing something? the only way i can get it to work is to run a function every single frame that the mask changes to reattach the bitmap. but that seems quite unefficient to have to do

View 0 Replies

ActionScript 2.0 :: Masks Over Two Objects?

Jul 2, 2008

I have two seperate MCs which I want to have the same mask effect on it Ie a gap in the middle, the mask is spinning round as stated they are separate, the blue thing gets moved whist the white one doesn't

View 4 Replies

ActionScript 2.0 :: Movieclips Under Masks?

Jan 9, 2009

So I have a MovieClip, A, and inside of it is a layer that has shapes on it for a mask, this layer does have some keyframe animation (the masks move). Then I have MovieClips on other layers that are masked by the masking layerWhen the movie loads, I load in an external jpeg and draw it onto a bitmap object, and then use that bitmap object and attach it to the moviecilps that are masked. This works fine, until the animation hits the part where the masks actually animated, then it reverts back to whatever i had in it before i attached the bitmaps. Is this a bug? or am i missing something? the only way i can get it to work is to run a function every single frame that the mask changes to reattach the bitmap. but that seems quite unefficient to have to do

View 2 Replies

ActionScript 2.0 :: Dynamic MCs And Masks?

Oct 4, 2011

I'm creating a starry sky for a header and there are mountains in the image which obviously I want the randomly generated stars to appear behind it.I've tried setMask() but I don't see it doing anything. The generated stars still appear on top of everything regardless of layer order and such.

View 2 Replies

ActionScript 2.0 :: FMX Scripted Masks?

Mar 19, 2004

I have a client who is IN LOVE with this site: http:[url]...I was just getting ready to start tweening and wondered if there's a way to script masks to do the same thing easily...NOT on mouse drag, but on the click of the button. I found a nice tutorial which will make a similar thing happen when you drag the mouse. But when I tried to target x and y the whole thing fell apart.

View 3 Replies

ActionScript 2.0 :: Multiple Masks For 1 Mc?

Apr 2, 2005

I have this problem that has been makin me crazy. I want to make an erasor for the drawing api basically. Since I wasn't able to accomplish it, i looked everywhere!!! no luck So far I have been able to "erase" with shapes. For instance, I can drag a circle out and see the masked item underneath. The very next shape I drag out cancels the mask from the previous shape as if you can only have 1 mask per maskee. Also, I cant get a line drawing to become a mask.

//creating the shape
_level3.drawingPlane.createEmptyMovieClip("layer"+ _level3.layer+"_"+i, _level3.layer);
// dynamically setting the mask_level3.water.setMask(_level3.drawingplane["layer"+_level3.layer+"_"+i]);

View 3 Replies

ActionScript 3.0 :: Drawing Api Drawing 40,000 Objects

Feb 18, 2009

I need to draw on stage about 40,000 4x4 squares each a different color. The color is determined by an xml file. I have this working in as2 and have converted it to as3 the problem is the amount of time it takes to draw is causing cs4 to time out. I have extended the script time out to 60 seconds. In cs3 as2 it would draw the squares in about 15 seconds. I was hoping as3 cs4 would improve performance but seems to be the opposite. I have tried several methods such as adding children and various drawing variations. the bellow seems to work the best, but is still causing flash to crash.

ActionScript Code:
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Shape;

[Code]...

View 9 Replies

ActionScript 3.0 :: Can One Movie Clip Have Two Masks

Mar 27, 2009

I'm trying to make flash add two maks in one movie clip,like this (pseudo-code)

PHP Code:

MovieClip.mask = mask1
MovieClip.mask = mask2
Print (MovieClip)

but it only shows me the last mask.

View 12 Replies

ActionScript 3.0 :: Creating Masks From BitmapData

Oct 17, 2009

I'm trying to modify the alpha layer of a bitmapData by taking a source iamge and masking out areas that don't have the correct channel. ATM I'm using copyChannel to achieve the effect, but I'd liek more than 3 channels (use alpha kills the other channels it seems). 255, 0, 255 should be able to act as another mask.

This is what I'm doing now...

Code:
bitmap.bitmapData.copyChannel(tempMask, new Rectangle(0, 0, tempMask.width, tempMask.height), new Point(0, 0), BitmapDataChannel.RED, BitmapDataChannel.ALPHA);

So the red parts of the image mask out the source image. All I want is to be able to mask out things basic on multiple channels (the lesser of the 2).

1) How does copyChannel work? Can I just test each pixel manually and achieve relatively similar speeds? and 2) if the Flash inline functions are infact faster, is there a function that can do what I want, or would it be better to use a shader?

Code:
var tempBitmapData:BitmapData = new BitmapData(tempMask.width, tempMask.height);
var matrix:Array = [];
matrix = matrix.concat([0, 0, 0, 0, 0]); // red
matrix = matrix.concat([0, 0, 0, 0, 0]); // green

[Code].....

View 1 Replies

Create Movie Clips With Masks?

Oct 5, 2010

I have an animation I've created of a rotating Earth. I want to turn it into a movie clip, so I can easily use it in other files. The problem is, I can't make it into a movie clip because there are some layers that are masks and they are locked.

View 3 Replies

ActionScript 3.0 :: Movie Clip Have Two Masks?

Feb 3, 2011

I'm trying to make flash add two maks in one movie clip,like this (pseudo-code)

PHP Code:
MovieClip.mask = mask1
MovieClip.mask = mask2
Print (MovieClip)

but it only shows me the last mask. I believe this is not possible?

View 1 Replies

ActionScript 3.0 :: Define In SVG While Avoiding The Use Of Masks?

Aug 17, 2009

i have a red rectangle. On top of this rectangle is a bitmapped (not vector unfortunately) pattern fill that needs to include some white/transparent pixels that should show the red color of the rectangle. How do you define this in SVG, if possible while avoiding the use of masks? The 'transparent' pixels keep coming up white instead of red.

View 1 Replies

Getting Error When Creating Tweens And Masks

Oct 22, 2009

When i create a new motion tween for example, i get the yellow "!" error in properties and it says "Motion tweening will not occur on layers with ungrouped shapes or on layers with more than one group or symbol". Thing is, i dont have more than one symbol or thing more than one shape and that is actually being tweened.the ! error only shows when i select the last frame in the tween. any ideas how i can get around this? i've never had this problem previously.

when i create a motion tween, i draw the object (in this case a circle), right click on the single keyframe, select create motion tween, then copy this keyframe and paste it further down the timeline, say at frame 10. At frame 10, i will move the circle to another location. the tween seems to work and it has created the symbol in the libary (tween 1) as a graphic, and when i export, it works ok, but the last frame has still the same error with the "!".  Same thing happens with shape tweens.

View 1 Replies

Actionscript 3 :: Working With Masks In Flash?

Jan 12, 2010

I'm having a hell of a time trying to get a custom mask to work on a project I'm creating.The mask I'm trying to use is applied as a pixel mask on a layer in the photoshop doc I'm working off, but I can't seem to figure out the proper way to get that layer mask imported into flash, to then compile into my .swc and be called from actionscript. (I'm coding in Flex)Whats the proper workflow for getting a pixel mask imported from photoshop so that when I call:

container.mask = myMask;

It'll show up as the shape I want, and not just a square box the size of my shape?

View 2 Replies

ActionScript 3.0 :: Does The MouseEvent Work With Masks

Feb 19, 2009

Does the MouseEvent work with masks ?

ActionScript Code:
myMask.addEventListener(MouseEvent.ROLL_OUT...)

View 2 Replies

ActionScript 3.0 :: Finding Masks In MovieClips?

Nov 7, 2009

I'm trying "get" the masked objects in my MovieClip object using something like:

ActionScript Code:
for(var i:uint=0; i<myMC.numChildren; i++){
if(myMC.getChildAt(i).mask!=null){
maskedObject = myMC.getChildAt(i);
break;
}
}

It goes through myMC's children and never finds a masked object even though myMC does have a mask in it. I made myMC in flash, so is that the problem? And how would i access the masked object otherwise?

View 1 Replies

ActionScript 3.0 :: Can't Stop Swf Children That Are Masks

Dec 19, 2009

I have made a pause button to stop a loaded swf and its children, and store the current frame. MOST of the children stop, except some of the objects in a few of my SWFs - the animated masks and 3D objects. I need to be able to stop everything. Is it even possible to stop these types of children? The problem can be seen [URL] Tracks 3, 8, and 9 have the issue. Here is the code I am using for my pause and resume button:

[CODE]....

View 4 Replies

ActionScript 3.0 :: Working With Class And Masks?

Mar 28, 2011

I have a bunch of images that im pulling in dynamically from my library. I am looking to create masks on those images everytime they are pulled onto the stage. the issue is how can i name my mask's using a predefined name in the function and or attach it correctly to the object that came from the library. for example:

/// on the stage i have a movieclip named "mContainer"
Code:
var sw = stage.stageWidth;

[code]....

View 2 Replies

ActionScript 2.0 :: Multiple Masks Movieclips?

Oct 10, 2011

I am creating movieclips and there holes(deselected areas using masks) dynamicly. Is there a way I can assign one movieclip moer than one mask? Maybe by somehow saving the moviclip with the first hole(mask), so I can assign him the mask again(Seee example hole1 and hole2 on mc1).Another thing is to assign the same mask to two difrent movieclips, but as read that should be sovled by duplicating the mask mc.

View 5 Replies

ActionScript 2.0 :: Painting Movieclips With Masks?

Nov 9, 2011

I am dynamically creating moviclips.. when I create a movieclip(mc1) this movieclip present a wall(for painting).. On this wall I create several windows(holes) which a present as mask for a wall, so that only the color of the wall is viewed, but the window is transparent..

when I am done with this I have for example 3 walls(mc1, mc2, mc3) with masks included..now on a button action I want to enable each movie clip for painting->painting is done so that you pick a color in a palllete and then click the wall you want to paint.. I do this with this code:

btn_color.onRelease = function(){
for(i=1; i<=stMC; i++) //stMC is nubmer of created mc's
{

[code]....

The code works great for the last movieclip created.. but when painting others it paints the entire wall in chosen color, so it colors the transparent windows(were set as masks as well)..

View 2 Replies

IDE :: Erasing Text Effect Masks?

Feb 25, 2009

I'm attempting to create a dry erase board style animation effect in my flash movie where I'm erasing the text, like a dry erase board type effect. I've tried doing a frame by frame mask animation and it's not turning out very well. Has anyone attempted this before? Are there any tutorials or maybe after effects > flash tricks?

View 2 Replies

ActionScript 3.0 :: Blur Filter And Masks

Mar 19, 2009

I have a problem here with masking and the blurFilter. I have 2 MC's maskMC (square shaped) and iconMc (circle shaped) both at 50px width and height. masking the iconMC with the maskMC is no problem, but when I try to apply a blur filter to iconMC, some of its edges bleed out from the mask.

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved