ActionScript 2.0 :: Drawing Objects And Scaling

Nov 5, 2006

I have a vector drawing object inside a parent movieclip.The drawing object is acting as a semi-transparent frame for and image on another layer. the problem is when I scale the parent movieclip the thickness of the drawing object is changing.I know that you can turn off scaling for lines and rectangles, but is there a way to do the equivalent for a vector drawing object?

View 2 Replies


Similar Posts:


Flash :: Scaling Drawing Objects Inside Movieclip?

Apr 12, 2011

So I've got problem with some drawing objects inside movieclip in my flash file... Setting width and height of flash to match browser's w&h got my movie clip to get correct values, but unfortunately drawing objects inside of it are not scaled as movieclip. Those object are just random stripes that got some tween on it acting as somekind of preloader... All graphics are pulled from ai file, so no AS was used to manipulate them, just pure tweening in design mode...So if my stage w & h are lets say 720 x 50, graphics inside movieclip are 1600 x 900 which match my monitor's resolution.

View 1 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 :: Poor Scaling When Drawing Some Long Lines Segments

Nov 19, 2009

I ran into a problem when attempting to draw long line segments - some lines will be poorly scaled and appear very thick. I ran into this issue when building a Google Maps Flex application and thought the problem resided there, but I then tested with a basic Flex application and duplicated the problem.

Here it is:
Code:
var _lineSprite:Sprite = new Sprite();
Application.application.rawChildren.addChild(_lineSprite);
_lineSprite.graphics.lineStyle(
6, // thickness
0xFF0000, //color
1.0, //opacity
true, //pixel hinting
LineScaleMode.NONE);
_lineSprite.graphics.moveTo(-70000,-20000);
_lineSprite.graphics.lineTo(400, 400);

The code above will draw a line segment that is much thicker than the desired 6 pixels. The problem can be seen here: [URL]. Once the page loads, click the "Show Custom Polyline" button, then the "Zoom to Problem Coordinates" button and you should see two line segments - one very thick and one thin. They should both be the same width as the thin line. Strangely, in the code sample I posted above, if the starting coordinates for the line are changed from -70000, -20000 to -70000, 20000 or to -140000, -40000 the line draws correctly. I'm using Flash Player 10.

View 0 Replies

Scaling Objects With OnCuePoint Function?

Oct 23, 2009

I'm working on a project in which I'm using a background movie playing in a Movie Object and on top of that I'm showing texts and images sort of like they are in the movie itself. The way I did this is by making the movie in After Effects and giving every frame in the movie the required position, alpha and scale parameters for each object in the flash movie.

[Code]...

View 1 Replies

AS3 :: Flash - Control Scaling Of Objects During Fullscreen?

Aug 12, 2011

I have flash ui built over the chromeless youtube player right now and I'm wondering if there is anyway to set certain sprites within the stage to not scale on fullscreen without having to do inverted scaling.

Edit: I use FlashDevelop as my IDE and building this purely in as3

View 1 Replies

ActionScript 3.0 :: External SWF Scaling To Objects Outside Of Stage?

Dec 24, 2009

I have an swf in which objects go outside the boundaries of the stage (but are properly masked). Whenever I externally load this swf into a container it scales down to fit in the objects located off stage. EX:I have tried removing the objects outside the boundaries and the stage does not shrink the image. The container is the same dimensions as the external swf.

Code:
function open_puzzle(openSWF:String)
{
//Load SWF
container = new MovieClip();

[code]....

View 1 Replies

ActionScript 2.0 :: Drawing Objects In As

Jan 3, 2009

i want to be able to draw and object with just code so the user can draw objects on the stage.

View 1 Replies

ActionScript 2.0 :: Drawing Objects With The Api?

Apr 8, 2004

i'm drawing objects with the api and for some reason they're coming out upside down.

View 2 Replies

ActionScript 3.0 :: Outside Stage And Objects Proportional Scaling To 100% With Resizing Capabilities?

Feb 23, 2011

i am looking for class or something to proportional outside scaling of stage and all included objects (internal or external).I know SWFfit and LiquidStage. I have got many problems with integrating SFWfit to my code (resizing is not affected to included objects). LiquidStage seems to be ok but it`s not freeware . I am looking for free possibilities to do it.I am trying to connect that with GAIA framework.

View 3 Replies

Professional :: Compensate For Display Objects Jumping When Screen Scaling

Nov 28, 2011

I am building an application that is to run at 2 difference stage sizes. 960x640 and 1024x768 (for those paying attention, you may note that those are the high res settings for the iPhone and iPad2)The app was designed and build to run on a stage of 960x640 and when running at this size, there are no problems.When the app loads in the 1024x768 window, it "strechs" the stage to fill the window, but keeps the aspect ratio. Everything looks good and the application runs without any problems expect for one thing.Sometimes, display objects on the stage "jitter" when moving or animating. I have discovered that this is because the stage is "scaling" the x and y values, and is not pixel snapping the objects on the screen, even though the x and y values of the display object are indeed whole numbers.A prime example of this is I have 2 bitmapData images. bmData_s and bmData_h. bmData_s is 192x388 in size.bmData_h is created from a copy of bmData_s with a glow filter stroke on it, resulting in a image that is 198x394 (6 pixels bigger due to a 3 pixel stroke)I place it on the screen using the following code:[code]
 
Now, when the app runs on the iPhone which is a 960x640 screen size, or on the PC which is using a window of similiar size, the image doesn't appear to move at all the "stroke" appears and disappears exactly as it is suppose to However, when I run it in a window that is 1024x768, the _h image appears to "jump" one pixel up.I have encountered many other similiar things that only occure when the stage is scaled. There is a spot in the app where I am animating a bitmap by manipulating it's scrollrect x and width (have it's do a wipe in from right to left like a peice of paper unrolling on a table) and due to the scaling, the right edge of the image jumps left and right 1 pixel but on 960x640 screens, it looks perfect.Does anyone know how I can compensate for this effect so that this jumping doesn't occur when the stage is stretched to fit the window it's running in?

View 2 Replies

Professional :: Drawing Objects Not Visible?

Apr 19, 2010

the first thing I am doing is to draw a shape. Object Drawing is selected. I have clicked the rectangle shape tool, have selected a color and fill. I drag across the stage and a rectangular line appears, but when I let off the keys, it dissapears. No shape, no stroke, no fill.Invisible, gone, disappeared.What the heck am I doing wrong?

View 12 Replies

Professional :: Drawing The Objects/masking?

Nov 16, 2010

when drawing an object and using that objetc to mask another layer im having trouble making more than one object act as the mask. Eg I draw a circle and use the mask function to mask an image, works fine, then i draw some more geometry (in the same layer) and it will not mask as the first object did. Is there any way I can 'Join' them togeter to act as one big mask?

View 2 Replies

ActionScript 3.0 :: Scaling Bunch Of Point Objects Relative To Center Stage

Jan 8, 2012

All though I can scale down the size of my objects and can shift them to their correct positions when scaling. I cannot shift them to the correct relative positions, relative to the screen centre.

Code:
level=1; //starting scale level
public function scaleOut(level:int) // scale to a level 1-4{
for (var r = 0; r < Main.ballArray.length; ++r){
// scale radius
Main.ballArray[r].bRadius *= (oldLevel / level);
[Code] .....

View 8 Replies

ActionScript 3.0 :: Drawing Objects At Vertices Of Line?

May 8, 2009

I'm trying to make a short script in AS3 which will simply take some animated lines that are in a movieclip (pre-animated in library) and draw a 15px diameter circle around each vertex / point of the lines.

how to access the vertices of the lines in actionscript!

View 2 Replies

Flash :: Moving Symbol Around Drawing Objects?

Jul 3, 2010

I have imported a lot of paths from an Adobe Illustrator document right into a flash file. The paths exists as Drawing Objects inside the scene. Using pure actionscript, how can I move a symbol following each of the lines, without using predefined Motion Guides.

EDIT: I've attached the Flash file, full of drawing objects.

http:[url]....

The question is: Are these drawing objects accessible through AS3 or I should convert them to symbols / whatever format necessary.

View 3 Replies

Flash :: Counting All 'drawing Objects' On Stage?

Jan 29, 2012

I have a little problem with counting all elements on stage. Flash, unfortunately is counting all objects on the stage without drawn objects (all shapes, including drawing objects, rectangles etc) all missed. Is there any way to count them?

View 2 Replies

ActionScript 3.0 :: Drawing App - Targeting Objects In An Array

Sep 7, 2009

This seems like it should be fairly simple, but for some reason Im getting caught up when it comes to removing a layer from my drawing app, and when moving the layers up and down in the display list. My first problem is that when I do the (canvas.removeChild(layers[value]); it removes the child of the targeted layer, but it also removes the child of the objects before it? I think anyways.

The second problem is that my layerUp function works, but my layerDown does not, even though they are the same code? Confused I am indeed. I'm sure its fairly messy since Im just learning this stuff, so sorry for that too!

[Code]....

View 0 Replies

ActionScript 3.0 :: Drawing Lines Between A Set Of Objects In An Array

Sep 23, 2011

I have a set of small circles(balls) on the stage, contained in an array. The array at different times in times in the program could have ballArray.length=1 or ballArray.length=125 or 48 or 0, etc.The balls float around the stage randomly too.I wish to have a function which will draw a line between all the points(balls or circles) in that array.So for example where there is 0 or 1 balls, there would be 0 lines drawn.Where there is 4 balls there would be 6 interconnections. as there would be six lines linking every object to each other object , exactly once per tick in the animation.[code]

View 3 Replies

ActionScript 3.0 :: Flash - Drawing Objects Relative To One Another?

Jul 16, 2010

How can I draw objects relative to one another in AS3? For example I have a small object in the middle of a large object. Then I move the small object to the left (subtract x) but visually I see the large object move to the right and the small object stay still.

View 4 Replies

ActionScript 3.0 :: Flash Slow Drawing Of Objects

Feb 3, 2011

I've written a small program which detects my mouse movement and draws circles on the x- and y-position of the mouse.

[Code]....

As you can probably see: after drawing a lot of circles the program slows down and the framerate makes the circles be placed with a large gap between them. I would guess that the program draws what is behind the current circle even though the user cannot see it?

View 3 Replies

ActionScript 3.0 :: Drawing Objects - CS4 Pixelated Graphics In Browsers

Nov 3, 2009

I have created some graphics directly in Flash Cs4 using the drawing tools, making them 'drawing objects', yet they are pixelated when viewed in browsers. Within Flash they look crisp, but not when exported.

Here is a screenshot:
And again zoomed-in:

View 2 Replies

Actionscript 3 :: Adding Drawing Objects To A Collection In Flex 4?

Aug 4, 2011

I'm trying to make annotations on an image. I want to store all these annotations into a collection so that I can later remove or edit particular note(annotation).I'm creating a UIComponent instance for example markUp and doing

markUp.graphics.lineStyle(2, drawColor);
markUp.graphics.moveTo(x1, y1);
markUp.graphics.lineTo(x2, y2);

[code].....

View 1 Replies

ActionScript 3.0 :: Drawing Lines Between Objects Stored In Array?

Mar 25, 2011

I'm trying to draw a line between circles stored in an array. I have a button on the stage which adds another circle to the stage. My issue is I cannot draw a line between the most recent circle added to the array and the one that will be added next.

It is a bit complicated and I'm not an experienced programmer by any stretch of the imagination.

Anyway, here's my code:

[Code]...

View 2 Replies

Professional :: Change The Drawing Setting To Show The Objects Filled?

Apr 30, 2011

When I create drawing shapes I cant see any color or fill. I know there is a setting that need to be changed so I can see them. Here is a pick of what is happening on my screen

View 2 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 :: No Resize/scaling A Movie Clip On The Scaling Stage?

Mar 11, 2008

I've search through all the threads with "scaling" and "resizing" and can't find the solution.

Basically I have a GUI element on a gallery that I don't want to scale, while the rest of the page is free to resize/scale.

I think I need to add a listener of some sort to the stage, but I'm not sure how to do this.

View 2 Replies

ActionScript 3.0 :: Scaling Button Background Without Scaling Text?

Feb 23, 2009

I'm building some navigation that extends all the way from left to right across my SWF. When the window resizes, I'd like the nav buttons to get wider but not have the text on the buttons get wider.

The buttons themselves are rectangles with a vertical gradient and a stroke around the outside. I'm using 9-slice scaling so the stroke doesn't scale, but the middle (gradient) gets wider or narrower.What'd be great is to be able to select an object or layer and say "don't scale, even if the rest of this movie clip scales". Is there a way to do that, or will I have to do it via actionscript?

View 1 Replies

ActionScript 3.0 :: Scaling Movieclip Not Scaling But Repeating?

May 20, 2010

i have a diagonal movieclip that I am trying to scale along with the background video. The background video scales perfect, I am attaching the diagonal movieclip (br in the code as bottomright) with addChild
Instead of scaling with the window, it seems to repeat such as the image is displaying. this is the main section of the code that is doing the scaling
 
var br:mc_bottomright = new mc_bottomright();
addChild(br);
//proportional scale
if ((stage.stageWidth / stage.stageHeight)> (owidth/oheight))

[code]....

View 4 Replies

ActionScript 3.0 :: Scaling A Movieclip Without Scaling Its Contents

Apr 10, 2009

I am trying to achieve an effect of scaling a movie clip on click...very similar to [URL] When the user clicks on See, Hear, Play and Shop boxes, the boxes expand. I have created a box movieclip that has a bar on top. This bar is a movie clip inside the box movieclip. When i try to scale the main box movieclip, the internal bar movie clip scales as well. How to stop this?

View 2 Replies







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