ActionScript 3.0 :: Scale9grid On Mask Object?

Oct 14, 2007

i can't make this work for some reason

[Code].....

..if I don't apply mask, scaling works great, but when I do scaling is wrong...

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Use The Scale9Grid On A Sprite?

Apr 15, 2009

I am trying to use the scale9Grid on a Sprite but it keeps throwing an error.

Code:

private function drawNameFile() : void
{
var nameField : Sprite = new Sprite();
var background : Shape = new Shape();

[Code].....

View 2 Replies

IDE :: Doesn't Scale9Grid Work With Bitmap

Aug 1, 2007

I have uploaded a test here

Code:
a2.width = 300;
a2.height = 300;
b2.width = 300;
b2.height = 300;

Both clips in library have scale9grid enabled, but it just wont apply to the imported bitmap, just vector.

If there is no way around it, I cant imagine it is too hard to write a custom class that applies scale9grid to the bitmap aswell, maybe someone know if it has been made already?

trace(a1.scale9Grid); and chop the bitmapdata manually?

View 6 Replies

ActionScript 3.0 :: Mask Cross Object/multi Object Masking?

May 25, 2009

I have a as3 class that loads a number of images from a given location, they are all loaded dynamically with imageloader. However I'm trying to make a Xray screen for all of them, so when I click and drag the Xray screen around, it will reveal the images loaded under each picture, creating a sort of Xray effect.I tried using masks, however since the images are all loaded dynamically they are its own class with its own layers, I'm trying to make a mask that will work for all of them (I load 2 picture for each image, example car.jpg and carb.jpg, b.jpg being the inside image).so I have my stage ---> [MyXray Box, and my Images

View 4 Replies

ActionScript 3.0 :: Scale9grid Error For Left Scale

Nov 30, 2009

I have an MC with the registration point set to the Top Right so it will scale down and left:

[Code]...

View 1 Replies

ActionScript 3.0 :: Scale9grid A Button To Preserve Its Rounded Corners When Resizing?

Aug 24, 2009

I am trying to scale9grid a button to preserve its rounded corners when resizing but I have run into trouble.The button is an ordinary Button symbol and it has 4 layered states (Up, Down, Over, Hit).In each layer there are some shapes (the outer button border, two background shapes inside the button for shading and then some extra outer border shapes to create the pressed down effect). The button contains no other elements,not even a textfield (the textfield is on the same level as the button).

The button is inside a movieclip (which also carries the textfield) that is of the same size as the button and is resized as by Adobe design when the button is resized (i.e. I am never manipulating its size).The Button is 35 high and the textfield is 25 high. They have their registration points both centered and placed at the the same coordinate.I use the follow code to resize and scale9grid the button:

popup.btnLoginButton.width = popup.btnLoginText.width + 20;
popup.btnLoginButton.scale9Grid = new Rectangle(10, 5, popup.btnLoginText.width, 15);

The above scale9Grid throws a Error #2004: One of the parameters is invalid.The same error occurs unless the Rectangle parameters are very small - for example Rectangle(5, 5, 5, 5) even though the textfield is much longer. But when the Rectangle is that small of course no scale9grid scaling is taking place.

View 2 Replies

Professional :: Mask Deforms Object?

Jun 29, 2010

I have a problem which I can't resolve. The problem is that if I apply a mask to object, it shows up deformed in swf.Here is what I see in Flash CS5 (sorry for large images): And this is what I get when I compile it and run swf (or run it embedded in html):

It looks a little bit rotated and skewed to the left. If I copy and paste the movieclip with mask to a new flash document, the problem dissaperas, so I guess it has something to do with Flash settings. I tried to compile for Flash 10 and Flash 9, but the deformation remains. The problem is that creating a new flash document and copying all images to new one is not an option, because the project is ~80MB.Here are my publish settings.

View 7 Replies

ActionScript 3.0 :: Mask A 3D Display Object?

Feb 5, 2011

I tried to mask a 3D Display object using some code from the AS3 reference but was unsuccessful:
 
var square:Sprite = new Sprite();
square.graphics.beginFill(0xFF0000);
square.graphics.drawRect(0, 0, 40, 40);
addChild(square);
myDisplayObject.mask = square;
 
Is it possible to mask a 3D Display Object?  (Can I draw a 3D Display Object through the Flash UI or must it be done via AS3?  My guess is no, otherwise more people would be doing 3D in Flash without great travail.)

View 2 Replies

Flash :: Adding A Mask As A See-through Object?

Aug 10, 2011

I'm trying to add an overlay over my main scene in Flex, with a see thru.

The idea is that users can only interact with the elements exposed thru the Ellipse.

Here is my code:

<!-- Our black overlay -->
<s:Graphic width="100%" height="100%" cacheAsBitmap="true" mask="{this.focus}"
maskType="{MaskType.CLIP}">

[Code]......

View 1 Replies

ActionScript 2.0 :: Assign A Mask To An Object In It?

Jun 24, 2009

In my current actionscript project I have two objects that I draw at runtime in the drawing API, and I want to assign one of them as the other's mask.

View 2 Replies

ActionScript 3.0 :: Using Mask On Object Added To Stage

Dec 29, 2009

I want to be able to mask an object that has been added to the stage using 'addChild'. This is what I have so far, but it does not seem to work.

Code:
var skyMask:mcSkyMask = new mcSkyMask();
skyMask.x = 0;
skyMask.y = 0;
addChild(skyMask);
var cloud1:mcCloud1 = new mcCloud1();
cloud1.mask = skyMask;
cloud1.x = 7.5;
cloud1.y = 57.7;
addChild(cloud1);

Basically, the cloud is going to move across the sky then get hidden by the mask so it does not appear on the background stage.

View 2 Replies

ActionScript 3.0 :: Mask Object With Applied 3d Rotation?

Dec 11, 2009

I experience some sort of a bug when trying to dynamically mask an object to which I have applied rotationY with an object which is also applied rotationY.

View 0 Replies

ActionScript 3.0 :: Mask Multiple Object Through A Loop?

Oct 4, 2010

can I mask multiple object through a loop

should be the question

ActionScript Code:
for (var m = 0; m < mylooper; m++ ) {
MovieClip(holdbox.getChildByName("mytxt" + [m] )).mask = mymask
}

it seems to only mask the last object not all of them

View 3 Replies

ActionScript 3.0 :: Get A Mask To Follow An Object Or The Mouse?

Nov 14, 2010

I continue in my adventure with customizing a horizontal slider's functions. This is the very last thing I need to figure out and it is done.I have posted an SWF at the following link so you can see it working: neterhetdotcom/test/slidermask/ (change "dot" to a period "." as i am not yet able to post links)If you click on the scrollbar. You will see that a mask follows the click and displays an "orange" color... this orange color is supposed to indicate the progress of the slider across the scroll bar. the mask is positioned just to the left of the slider on the click so it allows the "orange" color for "progress" of the slider to "show up".

If you click and hold on the slider the mask does not track this motion. I need to know how to make the mask track the mouse along with the slider. The mask would have to align it's right edge to the point of the mouse click for it to work as the mask is the same width and just slightly taller than the visual scrollbar. (a narrow rectangle as well)How the scrollbars is set up in Flash is I have 2 layers with the scrollbar art on each. the bottom one is the default greay "off" state.. the top one is the orange "progress" state that has a mask attached to it so when the mask slides the orange shows up or goes away. (Thus indicating the progress of the slider across and back)So either the mask has to follow the slider button (on the left edge of the slider button) or the mask has to follow along with the slider on the mousedown state...(as long as the mask had it's right edge aligned to the mouse click)

Quote:

package
{
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;

[code]....

View 4 Replies

ActionScript 3.0 :: Apply Function As A Mask For Other Object?

Oct 11, 2011

I would like to know if it is possible to apply function as a mask for other object.

View 9 Replies

ActionScript 3.0 :: Mask Shifts Independent Of Container Object?

Mar 13, 2012

I am making button pieces for use in my GUI factory. I am having an issue placing my Thumbnail graphic w/Mask and border. The mask is not moving away from 0,0 when the Thumbnail is moved to 280,10.I can force it to 280,10. I will be multiples of this and other button in a scrolling menu with it own mask in a container.I am trying to build in a work-a-round for this feature.Here's the primary part of Thumbnail class:

public function Thumbnail() {// constructor code makeThumbnail();cHolder.mask = picMask;[code].......

View 4 Replies

ActionScript 3 :: Mask That Overlaps MovieClip Object Disappear

Feb 15, 2010

I am trying to implement the following control on a movieclip object. When the mouse pointer is over the object and if the left mouse button is clicked and stays clicked then a mask that overlaps the movieclip object is starting to disappear. I tried the MouseEvent.DOWN, etc but I did not succeed to implement this functionality. Probably i miss something. Can I achieve this through standard mouse events types or do i have to implement it another way? Also is it possible instead to fade out the mask by reducing the alpha attribute, to actually make disappear the pixel(s) that under the mouse pointer ?

View 1 Replies

Flex :: Setting MX Image As Mask On Graphic Object?

Feb 22, 2011

I'm having trouble setting up a Graphic object (a solid filled rectangle) to be masked with an image that gets loaded at runtime. I've managed to get it to work with the following code:

<?xml version="1.0"?>
<s:Application xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="init()"
[Code] .....

Setting the PNG inside the <s:mask> makes the stage render nothing, while adding the mask programmatically in the init() method causes correct behaviour. It took me quite a while to figure this out and I'd like to understand what it is that I'm doing incorrectly in the MXML approach, as that seems to be what is being done in the Cookbook (other than me using an Image and the example using a Group wrapped BitmapImage).

View 1 Replies

ActionScript 3.0 :: Using A Textfield To Mask An Object That Has A Filter Applied?

Mar 28, 2011

I have several Sprites that are all combined in one parent Sprite. The parent Sprite then gets a Glowfilter applied and should then be masked by a Textfield.

Everythings working fine but as soon as I apply the Filter to the Sprite nothing shows... However, if I apply the Filter to every single Object that the Sprite contains, it works...

View 3 Replies

ActionScript 3.0 :: Preloader Using Mask To Slowly Reveal Target Object

Nov 25, 2008

I have a preloader using a mask, set to slowly reveal the target object from the bottom up as the movie loads. But there is something off with the code and I'm not a programmer.

View 8 Replies

ActionScript 2.0 :: Change And Remove Rectangle Object And Use Mask For Scrolling In Movie?

Aug 30, 2007

[code]...

i just copied this code from the source and experiments, just want to ask for help on how can i change this so that the scrolling of the contents is much faster.. also how can i change and remove the rectangle object and use the mask for scrolling in my movie

View 1 Replies

ActionScript 3.0 :: Feather Edges Of A Mask Which Is Dynamically Applied To Display Object?

Apr 14, 2010

I have searched high and low, but have not found a solution. How do you feather the edges of a mask which is dynamically applied to a display object?

View 4 Replies

ActionScript 3.0 :: Alpha Mask - Area Of The Loader Outside Of The Mask Will Visible When The Mouse Is Down

Sep 10, 2010

I have a startDrag function set up on a loader and mask that when the mouse is down on the loader it drags, when not it doesn't. There is also 2 buttons that control whether mask1 or mask2 is used. What i would like however is when the mouse is down - the area of the loader outside of the mask is visible but only by about 10/20% alpha, that way the user can see where all the image is while dragging. Is this possible? Full code can be seen below and i have attached the zip with the .fla file:

[Code]...

View 2 Replies

ActionScript 2.0 :: Scriptable Mask - Large Mask Behind The Whole Of Flash Site?

Aug 19, 2003

what i am doing is to make something along the lines of the "scriptable mask" tutorial Inigo was kind enough to put up.My idea is to have a large mask behind the whole of my flash site, this masks a colour image with a black & white one (nothing tricky). The image I am using is actually 5 separate images combined, and each is a pic of certain parts of the site.I also have a very basic set of buttons along the bottom... each corresponding to each section.

All I want is to set it up so that when I mouse over the buttons, the _x of the mask moves to correspond with the correct image... really very basic... or so I thought .If anything it should be easier to do than what is in Inigo's tut (where he uses the _x of the mouse to move the mask)... i just cant seem to get it to work with a nice easing effect (its easy to get the mask to simply snap to each coordinate, but I need it to smoothly move).

View 4 Replies

Create Own Mask Around A Jpg Image By Drawing Around It On The Mask Layer

Dec 4, 2009

maybe point me towards a better way to mask. png file is way too big. I have been using the mask layer option to create my own mask around a jpg image by drawing around it on the mask layer. There has to be a fetter and faster way to do this. Is it possible to maybe have a specific color range have an alpha value of 0. Similar to green screening whereas If I put the item I want to clip on a green background flash will auto take out the green for me. and by auto I mean action script maybe. I think this can be done but im not finding it.

how are these guys clipping these images [URL] they have the movie clips set up where the black background on the 3 layers of shoes is getting masked out. When I go into the shoe movie clips I see there is a black background but it just disappears when I go back to main timeline.

View 3 Replies

ActionScript 3.0 :: Shape.mask=mc.mask In As File Not Working

Apr 8, 2010

ive gotten one movie clip to mask another in the actions frame but i cant seem to be able to mask the flames which are a shape with a movieclip in this as file. im not getting any errors but the mask isnt covering anything look near the bottom at s.mask=mask_mc; there are about 20 "s" shapes spawning per second if that has anything to do with it

Code:
//this package turns an mc into a flaming button that calls a javascript function
package
{
import flash.display.MovieClip;

[Code].....

View 3 Replies

ActionScript 3.0 :: Possible To Mask Multiple MC Or Sprites Under One Mask?

Nov 26, 2009

I was wondering if its possible to mask multiple MC or Sprites under one mask, when using AS3.abc.mask = a;cba.mask = a;something like that

View 2 Replies

ActionScript 3.0 :: Blur Everything Under A Mask (Blur Mask)?

Jan 12, 2009

I've searched every possible actionscript forum for this and i cant seem to find it. How can i create an "area" of blur which blurs everything beneath it?Like some kind of masked blur effekt?

View 0 Replies

AS3 :: Set A Mask On Movie Clip A Using Movie Clip B With .mask Parameter?

Jan 22, 2010

AS3 Movie clip does not have .setMask() method, but it has .mask property. What is the syntax to set a mask on movie clip A (mcA) using movie clip B (mcB) mith .mask parameter in AS3?

mcA.setMask(mcB);  // does not work in AS3 (no setMask() method any more)
mcA.mask = mcB;  //does not do the job either

View 6 Replies

Actionscript 2.0 :: Group To Object When One Object Is Drag Across The Screen The Other Object Sticks With It

Mar 26, 2009

is there a way in action to group to object so when one object is drag across the screen the other object sticks with it, im using flash btw

View 6 Replies







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