Actionscript 3 :: Create A Shape Using The Drawing API?
Mar 20, 2011How can I create such a shape using the Drawing API? where red means filled and white means not filled
View 1 RepliesHow can I create such a shape using the Drawing API? where red means filled and white means not filled
View 1 RepliesI'm making an android air application for school, a sketch app.But I'm facing an annoying problem, when I'm drawing I can draw over my bar and my menu, here's some code:
[code]....
--> so this is the function for drawing a shape on stage the shape is declared as
Actionscript Code:
public static var brushDraw:Shape = new Shape();
now the problem is that I can draw over my menu and everything. Putting the setChildIndex of brushDraw to 1 doesn't work, it gives some error...
The issue I am having is how to tackle forming a logo using circles. I have done one letter manually, however it would take forever to do this with every single letter, and so I am asking here if anyone knew of a faster method. Requirements:
- Has to fill non-circular letters(i.e. does not have to be precise, but look like it has edges)
- Circles have to animate in, therefore they need to have drop shadow and seem like they are landing in place
how to make a self-drawing shape with actionscript
View 2 RepliesIs it possible to draw a border around an arbitrary Shape (or Sprite) dynamically with ActionScript? From the IDE is really easy, just select the line color and click the Shape with the paint tool (S).
View 3 RepliesIs it possible to draw a strokeless shape with the pen tool (as in Illustrator)? It is quite tedious to have to go back and remove strokes from my shapes.... especially since I can't see how to do it without clicking on each segment and hitting "delete"!
View 2 RepliesI'm trying to draw an image in actionscript, I set it as a BitmapFill within a rectangle. The problem is that if I move the rectangle away from the origin(0,0), in my case I start drawing the rectangle at (20,35), the bitmap background doesn't follow along. The background is always drawn at (0,0) and then repeated, so I don't get a centered image but rather 2 halved images. Here's what my code looks like:
public class PageTileRenderer extends VBox
{
private var sp:Shape;
[Code]....
how to move the background fill origin. Or is there another solution to draw the image centered.
I've found a similar thread to this but my problem's a little different.I've never used the drawing function on Flash and I followed the fairly simple tute on it just recently.Is there any way to confine the drawing area to a specific shape. Mine's a rectangluar shape that's rotated. You can download my FLA with the background image here > url...I'd like to try and keep it confined to the notepad area.I think it might be a hitTest thing with if/else. My other thing would be to just rotate the notepad so that it's straight.Even still i'd like it confined to the area beginning with the corner of the notepad, not the corner of my movie.
View 2 RepliesThis is my first meeting with the Shapes; which don't seem cooperating, at all. Following is the Class code:
Code:
package
{
[code]......
I have 2 shapes, in different color, and i would like to have this effect ( see the attached file ).
How can i achieve that by using pure actionscript 3, or using source like TweenLite, TweenMax etc...
i have been tasked to create a rollover state that has dynamic irregular shapes that surround the movieclip target. The target is always a rectangle and the shapes will look roughly like:I think i will have to draw this old school without using the easy predfined shape classes. I first thought about doing two rounded rectangles to fake it, but the line cross over (pointing green arrow) will overlap. Anyone have ideas on how to approach this? If i go with the drawing api, is there a formula to working out the rounded curveTo angles on the corners to always be the same radius?
View 2 RepliesI have a movieclip that contains code for an API drawing shape. I can use it to mask a movieclip containing an image but not a moviclip that contains a dynamic gradient.
Code:
// CREATE MASK SHAPE WITH DRAWING API
// create empty movieclip
[code].....
I've never used the drawing function on Flash and I followed the fairly simple tute on it just recently. Is there any way to confine the drawing area to a specific shape. Mine's a rectangluar shape that's rotated. You can download my FLA with the background image here > [URL]. I'd like to try and keep it confined to the notepad area. I think it might be a hitTest thing with if/else. My other thing would be to just rotate the notepad so that it's straight. Even still I'd like it confined to the area beginning with the corner of the notepad, not the corner of my movie.
View 2 RepliesI'm trying to draw a mask that's a pill shape but I can't seem to adjust the linestyle properly.
Code:
import flash.display.Sprite;
var pill:Sprite = new Sprite();
pill.graphics.beginFill(0xFF0000,1);
pill.graphics.lineStyle(1,0x000000,1,false,"normal","round","round");
pill.graphics.moveTo(0,6);
[Code] .....
Im giving a action script for drawing a predefined process shape that is used in flow chart. There are action script to draw a square, rectangle, circle and triangle. Can anyone in the forum give code for drawing the shape.
View 1 RepliesIf I draw a rectangle or trapezium, how might I go about drawing bitmap data into that shape? I need to give a slight perspective to a loaded photo. Native 3D rotations seem to leave the bitmap really blurry, and a full 3D engine is too heavy for this project.
View 3 RepliesI drew a line (stepVoltage) in a fla using the graphics class. Once drawn, I want to move it to the right in an update function, but am having trouble. I tride just moving the line with statements like stepVoltage.x = newX; stepVoltage.y = newY; but this didnt work. Then I tried to delete the previous line and draw a new one with a clear () function (see below) but this blocked the next drawn line from showing up.
The code:
var stepVoltage:Shape = new Shape ();
stepVoltage.graphics.lineStyle(2,0x000000);
addChild (stepVoltage);
[Code]....
creating a drawing pad in Flash that will let a user (from my website) draw an image(also have different shapes and colors) then be able to click on "save". Now here's the tricky part, When a user clicks on save, I need it to be saved as a .jpeg file then have that image sent to my email for review
View 3 RepliesDoes anyone have an example of using code and the shape class to create a star shape?
View 1 RepliesI have two bitmap graphics (bmp1, bmp2) already created with the BitmapData class using the contents of an object (label1):
var myBitmapData1:BitmapData = new BitmapData(150, 150);
myBitmapData1.draw(label1, matrix, null, null, null, true);
var bmp1:Bitmap = new Bitmap(myBitmapData1);
[code].....
I have a diamond shape movieClip and I need add a text Field in the same shape format.Now how to create a diamond shape text field?
View 1 RepliesWell, there's a web page that shows this effect, but I can't post links here (<50 post count) so I'll just have to describe it in words.
The flash content is a rectangle in the center, which is centered depending on the browser size. This would probably be the size of the stage.
What I'm interested in is the dynamic background that fills the screen with a shape. What seems to be happening is this[code]...
how I can create a movie that draws a shape on screen.
I understand how to draw a line, etc but can not work out how to see the shape build. I do not want something likes Kirupas' drawing demo as I do not want the viewer to create the shape.
For example I want to see the lines being drawn and control the speed, rather than the shape simply appearing in the movie.
I realise I need to change the lineTo value
An example is the way the TV is drawn in [URL] although I am not sure if this uses actionscript or is something else.
How can a create an animation of line drawing itself.
View 1 RepliesIs is posible to make a linea ( using the Drawing API ) and convert it to a button , so I can catch clicks on it ??
View 3 RepliesHow can i create an animation of a line drawing itself.
View 1 RepliesI want to use Image Reflection in trapezoid shape. That why i ask how to create trapezoid shape with the class of matrix
View 1 RepliesI have used the following code to create a drawing facility on my site, what code would I use to de-activate this? [code]...
View 1 RepliesI want to create the drawing effect in Flash that many of us have seen on various websites.URL...I have an object already made in Fireworks. It's just a simple rounded rectangle with a 10 pixel stroke. I'm looking to draw the mask which in turn will give the impression to the user that the object is being drawn (because masks work in reverse).Right now, I have a version already done with a frame-by-frame slow erase of the mask. When played, it makes it look like the rectangle is being drawn. The problem is that it's just too shaky and jumpy. I need a more fluid animation which, like most things, can be done much better in ActionScript. I saw the Drawing API tutorial on Kirupa.com, but it doesn't show how to animate it and I definitely don't know enough AS to do it myself.
View 7 RepliesHow do you create a sinusoidal wave using the drawing API in Flash?
Code:
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.geom.Point;
[Code].....