ActionScript 3.0 :: Mask Doesn't Move On Stage Resize?

Aug 11, 2010

I have tried everything I can think of but I just can't get my mask to move with my content when my stage is resized.

I am using flex and I embed symbols/assets in an assets class then instantiate them in my main class and call addChild on them.

I have a Sprite (maskSprite) that is the same size as the content, and I use this as a mask, calling

Code:
this.mask = maskSprite in my main.

This works fine but when I resize the swf it stays at the top left of the window when my content moves (I am using stage.scaleMode = StageScaleMode.NO_SCALE). I have used maskSprite as a non-mask and it moves with the content fine, but when it is a mask it doesn't.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Dynamic Masks - Trail Doesn't Resize And The Mask Still Doesn't Work

Oct 16, 2009

I decided to try to use setInterval for myanimation, which is just a mouse trail.However, I'm trying to get teh mouse trail to be a dynamic mask.In my previous swf this was achieved by using a holder mc with the animation inside and then using this as the mask. But this time I just canpt seem to hit on the right way to get it to work. The code I am using for the mouse trail is:

Code:
var i:Number = 0;
var myInt:Number;
var t:MovieClip;[code].....

in the function, but now the trail doesn't resize and the mask still doesn't work.

View 1 Replies

ActionScript 3.0 :: Browser Resize Doesn't Trigger Resize Event?

Jul 7, 2011

I'm having a bit of a problem here. As per the title, my flash swf file works fine when tested from the IDE, but when I publish it and open it through the browser, the stage doesn't seem to resize along with the window.I post below a bare-bones example. The "back" movie clip should resize, only it remains at the starting dimensions

Code:
import flash.events.Event;
import flash.display.MovieClip;

[code].....

View 9 Replies

Flash 9 :: Make A Mask Resize Dynamically?

Nov 5, 2008

What I want to achieve is this. I want a picture of a car that is dry as the background. On top of that a picture of the same car, but wet. I then want an image of a chamois that the user can click on and use to "remove" the water off the car, by "erasing" the picture off the top layer. Is this something that is achieveable.[code]...

View 2 Replies

ActionScript 3.0 :: Move Mask On X-axis Only?

Aug 27, 2009

I've got a script that let's me drag the mask with by clicking and dragging it with with my mouse. Currently the mask will move along x and y axis. I would like it to move only on the x axis.[code]...

View 3 Replies

ActionScript 3.0 :: Any Way To Move Map In Mask With Event?

Sep 5, 2009

I try to move a map in a mask with an Event; I have a drag move that works perfectly but I want move automaticly the map on an Event: I make this without success
ActionScript Code:
var my_tween:Tween = new Tween(myMask,"x",Strong.easeOut,0,400,3, true);
The mask move but I don't want : just the map inside ...
map.mask = myMask // the mask is apply with this !

View 2 Replies

ActionScript 2.0 :: Mask Move With Mouse

Apr 29, 2010

i have a problem in moving the mask with mouse

what is the right code

here is the code i use

// myImage is bakground image
// myMask is masking
stop();
myImage.setMask(myMask);

[Code]....

View 2 Replies

ActionScript 2.0 :: Move And Loop - Move An Object Across The Stage And Once Out Of Site

Dec 11, 2006

I know this is very noob, but I need a simple AS move and loop. Move an object across the stage and once out of site, loop and start over again? It needs to be a slow and endless loop.

View 3 Replies

ActionScript 2.0 :: Mask Causing Text Under It To Appear To Move?

Mar 21, 2011

Mask causing text under it to appear to move...I have a mask that scrolls to the right over text.Before the mask comes on stage the same text is on a different frame before it in the exact same coordinates. But when the mask appears it makes the text under it seem to slightly move to the left. I've realized it is the mask that makes this seem to happen.I'm probably not doing something right with the mask, but I'm not sure.

View 1 Replies

Alpha Mask Doesn't Work

Aug 19, 2009

I've used this code to apply a gradient alpha mask: bg_mc.cacheAsBitmap=true;mask_mc.cacheAsBitmap=true;bg_mc.setMask(mask_mc); Then I applied a motion tween to the mask_mc clip. But the motion tween doesn't happen? It only shows the first frame of the motion tween. It does apply the alpha mask though. Why doesn't it show the rest of the motion tween.

View 9 Replies

IDE :: Mask Doesn't Preview Properly

Mar 10, 2009

I�m in the process of creating a flash intro to my website. The problem is, whenever I preview one of my Mask layers by pressing Ctrl+Enter, the mask effect doesn�t work � it merely shows the masking object.

The puzzling thing for me, which leads me to suggest that the mask should work is that in the normal timeline view, when I lock both the mask and masked layers and press Enter or slide through the frames � the effect works perfectly. On Ctrl+Enter all of my other Masks work fine as well - the one in question has text as the mask content.

It only stops working when I view it as an .swf file or play the movie with Ctrl+Enter. Does anyone know why this is happening, how I can get around it, or whether it will be a problem when published?

View 1 Replies

Professional :: Move An Image And It's Keyframed Animated Mask?

Dec 5, 2011

I want to move an image and it's keyframed animated mask to a new position.

What steps do I need to undertake to accomplish the seemingly impossible task?

View 2 Replies

ActionScript 2.0 :: Possible To Create Empty Movieclip, Mask, And Move It?

Oct 9, 2005

I was wondering how you could move an empty movieclip that is set as a mask?

PHP Code:
this.createEmptyMovieClip("mask", 1);
mask.setMask(square);

[code]......

View 8 Replies

Actionscript 3 :: Centering Objects On Stage And Auto-Scaling With Stage Resize

Oct 19, 2011

I'm writing a web based flash app that's written entirely in AS3. I have objects on the screen as part of a GUI. I would like the user to be able to resize the window, or make it full screen. I would like everything to auto-scale with the resize, but also remain in the same relative position on the stage.

View 1 Replies

ActionScript 2.0 :: Position A Movieclip In The Middle Of The Stage Even If The Stage Or Window Resize?

Feb 27, 2006

i saw a thread while ago .. that always position a movieclip in the middle of the stage even if the stage or window resize any1 can point me to it

View 3 Replies

ActionScript 2.0 :: Adjusting Columns And Rows On Stage Resize, According To Stage.width?

May 10, 2008

When you resize the browser window the thumbnails rows and columns adjust accordingly to fit.I've managed to attach the thumbnails correct when my enableButtons() function is called but i'm unsure how to approach resizing.

Stage.align = "TL";
var numberOfGalleries:Number = 20;
var thumbMarginX:Number = 163;
var thumbMarginY:Number = 109;

[Code].....

View 1 Replies

ActionScript 3.0 :: Can't Get Stage Resize Listener To Resize Movieclips In "main" Swf

Sep 9, 2009

I've got a large bitmap (1920 x1306) that my client wants as a bg image, scaled to the swf size on load (930 x 575); but that can "grow" up to its original size if/when a user expands the browser window. All the rest of clips in the display list are to remain in place (except for a copyright clip, which they want to always be 14 pix above the bottom of the browser frame. I've tried loading the bitmap dynamically at full size and then using scaleX,scaleY to set it's initial smaller (930x575) size, and I've tried just setting the height/width of the dynamically loaded image using the math of scaleX,ScaleY just in case the scaleX "transformed" the bitmap so that it couldn't return to its original size.  Both make the bitmap the right size. But the resize function below did  nothing to it, (or the copyright.y.) THEN I tried just putting the bitmap into the display list (both sizing methods work here, too). But even as an original member of the compiled display list, the resize event is still not reaching the target. Everything I've seen on the web says this should work - but...no luck.
 
Here's the AS3 code in the 1st frame of my swf:
 
import flash.display.Stage;
import flash.display.StageAlign;
import flash.display.StageScaleMode;

[Code]......

View 1 Replies

My Text Mask Doesn't Preview Properly

Mar 14, 2009

I'm relatively new to Flash, and I�m in the process of creating a flash intro to my website. The problem is, whenever I preview one of my Mask layers by pressing Ctrl+Enter, the mask effect doesn�t work � it merely shows the masking object. The puzzling thing for me, which leads me to suggest that the mask should work is that in the normal timeline view, when I lock both the mask and masked layers and press Enter or slide through the frames � the effect works perfectly. On Ctrl+Enter all of my other Masks work fine as well - the one in question has text as the mask content.

It only stops working when I view it as an .swf file or play the movie with Ctrl+Enter. Does anyone know why this is happening, how I can get around it, or whether it will be a problem when published?

View 1 Replies

ActionScript 3.0 :: All The Mask After Frame 1 Doesn't Work?

Feb 11, 2009

I have an animation that has mask in it. I'm using actionscript to set the mask.The problem I am having is all the mask after frame 1 doesn't work. When I trace the movie clip name it says null. I know it's because flash can't access movie clip's name because hasn't loaded yet.I have the AS in a .as. I have tried putting the as on the first frame, same thing.

View 1 Replies

IDE :: Gradient Color Doesn't Work As Mask?

Mar 16, 2009

why do my gradient color doesn't work as mask?

I thought I can use the gradient color to assign a different opacity level to my mask. isn't correct ?

It just works as a normal mask...

View 1 Replies

ActionScript 2.0 :: Resize And Move A Box

Sep 28, 2007

I'd like to make a semi-transparent box with Actionscript move around the stage and resize when you click a button with actionscript.Id like it to fade in and move upon opening, then move and resize depending on the button you push. Ive attached a sample of what Id like it to look like. [code] This is going to be the background box for my pages. I assume it will have to have something in there that remembers the old position, and size and gradually resizes it and moves it to a new position.

View 4 Replies

ActionScript 2.0 :: Sweeping Mask - Using Image To Move Over Layer And Reveal Another

May 25, 2011

I have a question, and I find it hard to find resources on it. I have two layers, and another layer with an image of a broom on it. I want to use the broom to move over layer2, and reveal the layer beneath it. Kind of making a sweeping game. Frankly my search efforts on google have only come up with alot of masking, but I am sure you need actionscript to make the broom move with the mouse.

View 1 Replies

ActionScript 3.0 :: Setting X Coordinates To Move Mask (Fast And Slow)

Jan 28, 2010

I have a small mask that I need to animate across the stage in response to clicking various buttons. It has to go a different distance each time depending on which button is clicked along the x axis. I can get at the starting and ending x co-ordinates. I need to develop a set of x coordinates so that the mask starts moving fast and slows down as it gets nearer - kind of like the easing effect. I figured using some sort of simple 1/x^2 expression and have spent an hour or so fiddling in excel. Trouble is its a LONG TIME since I did maths, and I can't remember what formula to use. Have tried google with "parabola", "simple curves" etc.

View 2 Replies

ActionScript 3.0 :: Mouse Cursor Mask Doesn't Like Buttons

Aug 20, 2011

Having a problem with part of a project that I know is something small that I omitted someplace relating to mouseEnabled or mouseChildren, but I think I have tried everything and nothing seems to work.I set up a demo FLA that replicates the issue somewhat here (remove spaces)- t i n y u r l . com/4429vbx

Basically, I have a little game that involves finding things in an image with a custom mouse cursor that is a magnifying glass. One large image over a smaller version of the same image, the cursor masks the large image. There's a bunch of Math figuring out the movement/positioning of the large image on MOUSE_MOVE to match up with what you are mousing over in the smaller one, and I have a Rollover/Rollout on the smaller image to swap the cursor in/out. The problem started when I put 5 invisible buttons down inside the large image. You get cursor flicker when rolling over the invisible buttons, because smallImage.rollOut is being triggered, then smallImage.rollOver, then out, then over, etc... and I have no idea why.

I can't use startDrag() because of the large image movement needed on MouseMove, and I tried it with EnterFrame and it's worse.Like I said, the demo isn't exactly what I have in my project, but it's close. There's no parallax math, and the project I have is class-based, but the demo is on the timeline. There are 3 levels - A is the root child, B inside of A, and 3 buttons AA, BB, CC inside of B. I have a simple circle Sprite as the mouse cursor.

View 2 Replies

ActionScript 3.0 :: Masking Doesn't Change When The Mask Movieclip Changes?

Sep 13, 2009

I have a movieclip Planet which consists out of a backround (BG) and a mask (PMask). The mask will be changed during gameplay (I add shapes, then draw this to a bitmap and replace the shapes with the bitmap).But for some reason the mask doesnt change along with the mask movieclip(as if it makes a copie of PMask and uses that as the mask instead, so that every change to PMask isnt applied to the mask of BG)This is basically my Planet.as file (I removed the stuff that isn't related):

Code:
package
{
import flash.display.MovieClip;[code]....

I don't know why I would need the "cacheAsBitmap", but it doesn't seem to mask at all when I don't use it.

View 0 Replies

ActionScript 2.0 :: Mask In Attached Linkage Doesn't Work?

Mar 2, 2009

I'm dynamically attaching a movieclip linkage to my root timeline. The linkage has two layers inside -- a graphic shape mask and an empty movieclip for loading images. The empty movieclip is masked by the graphic shape mask.I'm using a MovieClipLoader object to load and manage the preloader for the empty movieclip when it loads images.Why does the mask sometimes work and sometimes not? Would the image type have anything to do with it? Or is it something to do with the act of attaching the linkage and then loading images into the empty movieclip contained therein?

View 5 Replies

ActionScript 2.0 :: Scrolled Text Form With Mask Doesn't Seems To Work

Apr 12, 2005

I have a MC with a text form with several input and combo boxes (flash <=> php) it as a scroll and it works fine, except when I put the MC under a mask. It still scroll's but nothing shows inside the input boxes when I type on it. Is this "normal" procedure for flash or It's a bug of some kind?

View 3 Replies

ActionScript 2.0 :: Scrolled Text Form With Mask Doesn't Seems To Work?

Apr 12, 2005

I wonder if you could help me with this:I have a MC with a text form with several input and combo boxes (flash <=> php) it as a scroll and it works fine, except when I put the MC under a mask. It still scroll's but nothing shows inside the input boxes when I type on it. Is this "normal" procedure for flash or It's a bug of some kind?

View 3 Replies

Resize / Move Keyframed Movie Clips?

Jul 24, 2009

I just finished animating something, but I don't like how large it is, and I want to resize it. However when I select the objects to move them, it only selects the current key frame that I'm on for those objects, so moving it only affects that keyframe. How can I select all of my keyframes so I can make them all uniform?

View 7 Replies

ActionScript 2.0 :: Resize And Move Objects On Fullscreen?

May 6, 2009

How do I start to program with 3 objects on my page:

"logo_mc", "menu_mc" and "container_mc".

I'd like to put them on correct order when the stages grow (it depends of wich user's screen).

But how does it work? With 3 objects, I mean resize logo, the container and the menu..

View 1 Replies







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