Flash :: How Does ScaleX/scaleY Work On Bitmap

Jan 26, 2010

I'm using a Bitmap cache that stores down a few Bitmaps. I called scaleX/scaleY on some of them, but the next time I retrieve from the cache, the Bitmap is screwed up. How does scaleX/scaleY work with Bitmap?

View 1 Replies


Similar Posts:


IDE :: Mouse_OVER - ScaleX - ScaleY - Prefecture_mc:scaleY=1.2; Is Ignored

Mar 16, 2009

I am trying to create a Japanese map where on mouse over prefectures (states) would zoom in by some 1.2. If I make every prefecture_mc as a separate layer, then they scale on under another which, when I create all 47 prefectures within one layer, then prefecture_mc:scaleY=1.2; is ignored. It was simple in AS2. besides it was scaling from the center

View 1 Replies

Flash :: Positioning Objects Relative To MovieClip That Has ScaleX And ScaleY Changed

Sep 23, 2010

I have one Sprite which acts as a container for two other Sprites. One has a picture the other has a series of hotspots.

If i change the scaleX and scaleY of the picture, the hotspots don't line up anymore. Do you know the correct equation so that any scale i set will always make the hotspots appear at the right place?

I'm trying stuff like this:

hotspot.x *= scaleFactor;
hotspot.y *= scaleFactor;

but i can't quite sort it.

View 1 Replies

IDE :: Mouse_OVER ScaleX ScaleY?

Mar 16, 2009

I am trying to create a Japanese map where on mouse over prefectures (states) would zoom in by some 1.2.If I make every prefecture_mc as a separate layer, then they scale on under another which, my friends is not good looking behaviour . when I create all 47 prefectures within one layer, then prefecture_mc:scaleY=1.2; is ignored. It was simple in AS2 besides it was scaling from the center

View 3 Replies

ActionScript 3.0 :: What Do ScaleX / ScaleY / RotationX / And RotationY Do

Aug 2, 2009

What do scaleX, scaleY, rotationX, and rotationY do?I'd like to test it out myself but I'm completely new to Flash CS4 and I don't know how to control these values outside of ActionScript

View 3 Replies

ActionScript 3.0 :: ScaleX And ScaleY Tween A Movieclip?

Dec 7, 2009

I am trying to scaleX and scaleY tween a movieclip. the problem im having is instead of growing frrom the centre of my movieclip, it seems to be scaling from the top left hand corner.

[Code]...

View 2 Replies

ActionScript 3.0 :: ScaleY - Cannot Create Property ScaleX On Number

Aug 15, 2009

I'm getting the following error when I try to scale a movie clip .... PHP Code: Cannot create property scaleX on Number.

View 2 Replies

Actionscript 3.0 :: Difference Between Width And ScaleX Or Height And ScaleY?

Feb 27, 2009

i want to know what is difference between width and scaleX or height and ScaleY ..? i search that in internet but i cudnt found good explanation

View 2 Replies

ActionScript 3.0 :: ScaleX, ScaleY Tween On Imported File?

Mar 1, 2010

I'm using a tween on an imported file on MOUSE_OVER and MOUSE_OUT that will scale it X/Y up by 1.2. The problem is that the scaling starts in the upper left hand corner and moves out from that point. I want the scaling to start from the center.

Code:
new Tween(clipT,"scaleX",Elastic.easeIn,this.scaleX,1.2,.5,true);
new Tween(clipT,"scaleY",Elastic.easeIn,this.scaleY,1.2,.5,true);

View 13 Replies

Actionscript 3 :: Why Does Setting Different ScaleX And ScaleY For Textfield Distorts The Text

Jul 8, 2011

i have a textField wherein i uses embedded fonts, the problem is when i change its size and i do not set the SAME scaleX and scaleY value, it seems to compress the letters inside it when i make it smaller, and stretch the text when i make it bigger... i tried using width and height values (instead of scaleX and scaleY but its the same result)... it seems that the embedded fonts are maintaining some kind of aspect ratio or whatever, and again this only happens when embedFonts is set to true

View 2 Replies

Flex :: Does The ScaleX ScaleY Makes The Width And Height Change

Aug 31, 2011

Am working in flex 4 the sample mxml is

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"

[code]....

on the perpendicular clicks it shows as like the second click. does the scaleX scaleY affects the width height?

View 2 Replies

Flex :: Changing ScaleX/scaleY On Parent Scales The Children But Doesn't Update Height/width Property?

Nov 23, 2010

I have created a custom component - MyImage - that has two children including a Bitmap as well as a Sprite.My display object hierarchy is as follows -

mx:Canvas
view:MyImage
mx:Bitmap

[code].....

View 1 Replies

Actionscript :: Flash - Get Transparency To Work On A Bitmap?

Apr 23, 2011

For a class project I'm working on "Pissed Off Pigs" (I think you get the idea, the pigs get revenge, don't worry, I'm not going to release it!) and I want to create circles with a fill from a bitmap (circles because the collision math is easier). Here is how they look now.

Of course, the white is the problem. Below is my "pigs" class. I've tried gif's, pngs, 8-bit pngs, etc and it seems to make no difference. The image itself is 20px square and the radius of the circle is 10px (so a 20px diameter). Here is the image I'm using:

And I know I should probably load the image outside the class and just pass the BitmapData when I make a new pig so I don't have to load the image every time I create a new pig but for now it works! (Sorta).

Oh, and I have checked bmpImage.transparent and it returns true (even when I don't specify true in the constructor).

package {
import flash.display.;
import flash.net.;
import flash.events.;

[Code].....

View 2 Replies

ActionScript 3.0 :: Flash MovieClip ScaleX Not Scaling?

Apr 2, 2012

Flash MovieClip scaleX not Scaling?

View 1 Replies

ActionScript 3.0 :: Get Bitmap.draw() To Work?

Apr 16, 2009

I can't seem to get bitmap.draw() to work. I've used it before in exactly the same way but this time Flash decides to put out this error:

"ReferenceError: Error #1069: Property draw not found on flash.display.Bitmap and there is no default value."

With the following code, tile1-5 are movieclips in the library consisting of a few instanced movieclips inside them.

Code:
// Add the tiles from the library into arrays for each area.
private var a1Tile1Bmp = new Bitmap();
private var a1Tile2Bmp = new Bitmap();
private var a1Tile3Bmp = new Bitmap();

[Code]....

View 3 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 :: How Does Flash Pass A ScaleX Event Down To It's Children

Apr 12, 2011

how a ScaleX/ScaleY event propagates down to the children of display object? I want to step in at some point and "re-scale" one of the children of a display object that has just been scaled with it's parent. I can't find any event that is fired, and ScaleX and width setters don't seem to be getting called on the child objects. I'm working on an ActionScript Project (not Flex) in FlashBuilder.

View 2 Replies

ActionScript 3.0 :: Making Bitmap From Video Does Not Work Right

Aug 4, 2010

In my current project I need to create a bitmap from the last frame of a video. For this I use:
Code:
var _vidBitmapData = new BitmapData(video.width, video.height, false, 0x0000ff);
_vidBitmapData.draw(video);
var bmp:Bitmap=new Bitmap(_vidBitmapData)

This works like a fairy in wonderland if I create the video with dimensions matching the stream:
Like
Code:
video =new Video(1280,800)

However, when I change the Video's size on receiving the onMetaData Event according to the actual streams width and height properties, the capture i get from _vidBitmapData.draw is still in the dimensions of how I created the Video. So if I do
Code:
video =new Video(10,10)
and then
private function onMetaData(metadata:Object):void {
video.width=metadata.width;
video.height=metadata.height;
}
I get a nice display of the video.

However when doing the
Code:
var _vidBitmapData = new BitmapData(video.width, video.height, false, 0x0000ff);
_vidBitmapData.draw(video);
var bmp:Bitmap=new Bitmap(_vidBitmapData)
I get a 10 x10 px image....

View 4 Replies

Checking Cache As Bitmap Doesn't Work

Jun 29, 2009

Checking Cache as Bitmap doesn't work, you have to .cacheAsBitmap = true with actionscript? 

View 2 Replies

Flash :: Set ScaleX Property On A Sprite Without Altering The Child Inside

Mar 25, 2010

My site is set up with next and prev buttons on the right and left sides respectively, and as you roll over either of the hit areas around the buttons a Sprite fades in which contains a TextField that describes the next page. Said Sprite calls the StartDrag() method, so it follows the mouse within the bounds, which is all fine and dandy on the left side of the page. Adobe, however, seems to have forgotten to put a way to dynamically alter the registration point of a Sprite, MC, whatever else, so when you roll over the right side of the page, the sprite is displayed from the top left and is mostly off the stage.

Trying to hack this problem I have tried numerous things ( classes written by others, other hacks) and the best that I have found is to use the scaleX method on the Sprite, changing the scale to -1. This, of course, makes the Sprite seem like it's reflected from its normal point, which means all its children show up backwards.

Is there anyway I can use this hack without it altering the text?

OR

Does anyone know a different way to go about displaying a Sprite from another corner? Any way to make a Sprite fade in and follow the mouse on the LEFT HAND side of the mouse pointer?

Here is a snippet to give an idea of what's happening:

naxtPage.labelBG.scaleX = -1;
nextPage.labelBG.startDrag( true, nextHitRect );
nextPage.labelBG.x = nextPage.labelBG.parent.mouseX;
nextPage.labelBG.y = nextPage.labelBG.parent.mouseY;

View 1 Replies

ActionScript 3.0 :: OOP - When Transfer To Packages It Doesn't Work Where Concerning The Property Of The Bitmap

Sep 12, 2011

Im trying out some basic OOP.. and cannot understand where I am going wrong. It works within the timeline - but when I transfer to Packages It doesnt work where concerning the property of the bitmap. I have a 'MyClip' instance in the library. here is my bask Document Class package::

[Code]...

View 4 Replies

ActionScript 3.0 :: Get Security Settings Right To Permit Bitmap.draw() To Work With Objects From Another Domain?

Jan 8, 2008

This is a two fold query involving the same issue. As you know, if you attempt to use bitmap.draw() with an object (image or swf) that is not in the same domain as the calling swf the bitmap will not draw. As described by Adobe livedocs, if Security.allowDomain() is setup in the calling swf then draw() will work. However, I cannot get this method to work. I have supplied an example fla (make sure to get the .as for it too).

1. How do I get Security settings right to permit bitmap.draw() to work with objects from another domain? (not any domain - just the domain I define in the allowDomain parameter)

2. How do I setup an event handler (listener) for bitmap.draw() so I can detect when it doesn't draw?

[Code]...

View 2 Replies

Flash :: Use The CS4 Tool's On A Bitmap Image After Tracing The Bitmap Image And Applying My Settings?

Aug 7, 2009

Use the flash CS4 tool's on a bitmap image after tracing the bitmap image and applying my settings?

View 10 Replies

Flash :: Scaling Onstage MovieClip With "scaleX" Breaks Timeline Animation?

Nov 3, 2009

I'm scaling onstage MovieClips via AS properties "scaleX" or "scaleY", which kills any kind of animation the clips have within their container MovieClip, be it Classic or Motion Tweens. When I don't scale the MovieClips, they animate fine. I'm able to tell the clips to "gotoAndStop" on their own internal frames, and that doesn't affect their animation within their container clip. I'm referencing the clips via AS w/ their instance names defined in the IDE. I've also tried different clips and recreated them, getting the same behavior.

Is it possible to scale a clip via AS and still have it animate within its container timeline?

Does applying an AS property to an onstage instance somehow dissassociate it from other timeline properties?

View 1 Replies

ActionScript 3.0 :: ScaleX Won't Size 1 To 1.01

Jan 6, 2010

I'm probably missing something very basic but when I scaleX and scaleY 1 to 1.01, it sizes much larger than 1% and won't scale bigger by any smaller increments.

View 5 Replies

ActionScript 3.0 :: Make ScaleX 1 Or -1 At Random?

Mar 25, 2009

I've tried:

myratarray[count].scaleX=1|-1

is there an equation that only equals 1 or -1 that i need to know? I just need the array objects to move right or left at random...

View 5 Replies

ActionScript 3.0 :: 'scaleX' Is Moving The Object And 'x' Does Nothing?

Nov 3, 2010

Im trying to get a shape i have created to 'grow' and 'shrink as it enters different frames. Ive imported tweenClasses and i think i have everything done properly, only the scaleX and scaleY properties seem to change the position of the shape as well as its size, so instead of it just growing, it moves from the side of the stage toward the centre while growing. Out of curiosty, i decided to try altering just the 'x' and 'y' properties but they dont seem to do anything. heres the code i have:

Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var infoBox:Shape = new Shape();

[Code]....

View 4 Replies

ActionScript 3.0 :: TextFields Not Responding To ScaleX

Mar 4, 2010

I want to scale the Text in a TextField to 80% width. Problem seems to be that TextFields don't respond to ScaleX. and ScaleY uniformly scales the whole TextField. Does anyone know how I can accomplish scaling the text to 80% width? And I then need to use that TextField as a Mask for a gradient (I know how to do that), so the route of using a TextBlock doesn't work.

View 4 Replies

ActionScript 3.0 :: Flip Horizontal - ScaleX ?

Jul 26, 2009

I am developing a fishing game and I have inside my fla file a movieclip of a pirate ship, one of the bonuses of the game. In certain parts of the game I have to flip the ship horizontally because it depends on the player that he belongs. He can be on the left side or right side of the screen. I have read that to flip a movieclip horizontally the command is:

Code:
mc.scaleX *= -1;

In fact, this command worked for me with a static movieclip that I drew.But with the pirate ship, this line of command makes it disappear. When I remove the line, the ship is in the right place and behaves as it has to behave but is turning to the opposite side.Does it have to do with the fact that the movieclip contains animations?Another solution that I've tried is to flip everything but because there are a lot of keyframes and layers, it is impossible to simply click on modify->flip horizontal. The ship moves with tweens inside the movieclip, so I would have to rebuild all the animations.

View 2 Replies

ActionScript 3.0 :: ScaleX Vs Manual Scaling On Android

Nov 2, 2011

When I set the scaleX, it smooths. But this is not as efficient as redrawing the image (at least that's what I've been led to believe). But, scaling the image manually doesn't seem to smooth. Can someone tell me why. I'm using Flex and I add the image directly to a Group, so I have to wrap it in a UIComponent. Oh, and "this" refers to the Spark View component.[code]

View 1 Replies







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