ActionScript 3.0 :: Add Shape To Stage Using It?
Jun 21, 2009I'm trying to add a rectangle to the stage.
I've imported the following.[code]...
I'm trying to add a rectangle to the stage.
I've imported the following.[code]...
I'm trying to add a rectangle to the stage.I've imported the following.[code]
View 1 RepliesI'm trying to make a "paint on" effect so that when the user clicks down, they can paint whatever shape onto the stage. I really need it to look like a "spray paint" effect, and I'm having a hard time animating this.
View 4 RepliesI found a nice script for drawing a donut shape. I don't know why it only works with using 'this' or ' _root' . You should be able to apply this to a movieclip?Or am i missing something?[code]
View 3 RepliesHow would I make it if I wanted a function (that happens to run on event MouseEvent. MOUSE_DOWN)to run while mouse is down, not just once. For example, I have this code:
ActionScript Code:
stage.addEventListener(MouseEvent.MOUSE_DOWN, keepCreating);
My keepCreating function creates a random shape on the stage. But since it runs once during mouse_down, only one shape is created until you activate mouse_down again (by lifting the mouse button and pressing down again).
What I want it to do is keep creating shapes over and over again, instead of creating one shape per mouse_down.
I need to have a shape (black rectangle) that will cover the stage. It should resize with the stage when needed. I'm trying it with the following code, but when it's resizing, there is a clipping effect that is visible and it is not fluid. How can I prevent this?
Code:
Select all
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, resizeHandler);
var blinder:Shape = new Shape();
[Code] ......
I am trying to make a so called pixel effect in witch I want to make a shape only from pixels that are positioned in some random place on the stage. And all these pixels move to a certain point and create that shape. I've been looking into BitmapData Class but I don't now if that is the best way to do it.
View 2 Repliesi want simulate Billiard ball in my project. but my code does not work good. when start with (for example) 34 degree , when hit with wall(stage in this example) return with true degree. in flash , as3
[Code]....
ActionScript Code:
package {
import flash.display.MovieClip;
public class Base extends MovieClip {
public var baseHP:int = 50;
var newRect:Shape = new Shape();
1046: Type was not found or was not a compile-time constant: Shape. 1180: Call to a possibly undefined method Shape. What does it mean by "undefined method"? I am somewhat of a newby, so sorry if there are any stupid errors
Whenever I add shape hints to a shape tween the shape disappears in the between frames. I am using CS5 on Vista. I using files from [URL]to practice.
View 2 Repliesneed to draw the shape of a existing movieclip which is irregular shape.
View 2 Repliesneed to draw the shape of a existing movieclip which is irregular shape.
View 1 RepliesId like to know if there is a way to do a shape hitTest.Not as the normal hitTest would do, but shape colliding another shape, not the rectangleof a movieclip.It can be in a movieclip.
View 23 Repliesusing the shape tool you can draw basic shapesthen using the subselection tool you can re-shape them by relocating certain points
What i want to do is create a tween whereby one of the points is movedthe problem is you have to convert to a symbol first and after you have done that you cant change the shapes shape.so how do i go about using a motion tween to change the shape of a shape?
It has me perplexed. Okay, when you draw a shape in Flash, let's say a circle, it draws a 'fill' and adds an 'outline' automatically. Now let's say I deleted the 'outline' part of it, and am left with just the 'fill'. Is there a way to add the 'outline' part back to the shape afterwards? I have a non-standard shape that I need to add an outline to, but can't seem to figure out how to do it
View 2 Replieswhen you draw a shape in Flash, let's say a circle, it draws a 'fill' and adds an 'outline' automatically. Now let's say I deleted the 'outline' part of it, and am left with just the 'fill'. Is there a way to add the 'outline' part back to the shape afterwards? I have a non-standard shape that I need to add an outline to, but can't seem to figure out how to do it...
View 4 Repliesis it possible to make button in a different shape for example i have a figure that i cut from image on a transparent background an i was wonder if it is possible to make that person in to a button but just that person not the transparent background.
View 1 RepliesI've a circle that I want to attach an image to. The trouble is I want to centre it right where I want on the shape. When I select type=bitmap and import the gif though it is 'wallpapered' over shape automatically like a pattern and obviously this doesn't line up with the image properly. How do I get the shape and image to align (both shape and image are identical in size) in cs3?
View 2 RepliesSo I like the whole convert stroke to fill option in the Modify menu, but what if I want to apply a stroke to a fill?
In other words, if I created a circle, then delete the stroke, is there any way to the regenerate the stroke? I mean, if I press A I can see the contours of the fill - can I just turn that into a stroke? In the properties menu, if I click on stroke (which as its colour has the white box with a red diagonal line) it's all greyed out. Am I missing something obvious?
I am trying to follow the exercises in the "Classroom In A Book" for Flash CS4 and I am having problems already on exercise 2. the problem is that I can not close the shape, whilst using the pen tool and anchor points. I have tried to make the anchor points extend further than the stage and then clicking on the first anchor point as the book suggests, however, a new line is drawn through the stage, to the first and last anchor point. The problem is I can not add the fill colour.
View 1 RepliesI was wondering if there is anyway to shape tween two primitive shapes using actionscript. The shapes will be drawn using AS3 and then i need to tween them. no timeline should be involved.
View 1 RepliesI am completely in the woods here - i have a sprite with a shape drawn in there (there are two different sprites in the example.) At any given point, I need to get the x and y value of the topmost point of the shape. The sprite does rotate so it's going to change at any point as well. I don't even know where to begin here
View 2 RepliesI have a filled Shape, and a BitmapData that is the same width and height as the Shape's bounding box. I need to cut the Shape from the BitmapData (basically draw the BitmapData onto the shape...) [URL]I use the rather hackish method of:
public static function cutPoly(img:BitmapData, s:Shape, bounds:Bounds):BitmapData {
var temp:BitmapData = new BitmapData(bounds.width, bounds.height, true);
Main.inst.stageQuality("low"); //hack to kill anti-aliasing
[code]....
I can import FXG files as Sprites as follows[code]...
I don't always need the fancy things that come with Sprites. How can I import them to Shapes?
I have found many posts on how to draw shapes using the drawing API. However, I'm trying to figure out if it is possible to get the coordinates of points along an exisiting path on the stage and then tween these points to new random coordinates (distort the path).
View 5 RepliesI am trying to get the position of the top left corner of a shape. It is a shape of variable size and position, so the x and y won't necessarily be the top left corner. Is it possible to find the top left position of a shape if say the registration point is at the center?
View 1 Replieshow to shape tween with actionscript.
View 9 RepliesIf I have a circle shape, or any else shape, what I should do to make a nice simple outline to that shape. Is there any way to make this simple. I tried to make this with the pen tool, bun it wasn't very precise. I want to use something else.
View 1 RepliesI'm trying to create a shape tween to take a line from a point to another point. I can get it to work if I leave the line short but if I try to take it to a point the shape tween doesn't work.
View 1 RepliesI'd like to know if there's a way to do a shape hitTest.Not as the normal hitTest would do, but shape colliding another shape, not the rectangle
of a movieclip.This shape can be in a movieclip, of course ).If there's this way, please make it in a way that our processors would thank you.