ActionScript 2.0 :: Rectangle Brush On Paint Instead Of Circle?
Oct 16, 2010
I have a paint brush that has a stroke of a circle i wanted to replaced it with rectangle instead here is my code.
Code:
private function drawCircle():Void
{
var r:Number = 40;
var xcenter:Number = _xmouse;
[code]....
View 3 Replies
Similar Posts:
Aug 24, 2009
I`m working on a app that you can draw lines.....like circles, rectangles... my problem is when a user draw a circle for example....i wanna be able to paint (change color) inside of this circle. I`ve tried working on Shapes with cacheAsBitmap = true and Bitmaps with BitmapData but it doesn`t seens to work.
View 4 Replies
Apr 11, 2006
a drawing application in Flash that that you can paint on using a custom "brush", and not use the default lines that are made by lineTo. The idea I had was to create a brush movie clip, and as the mouse moves duplicate it and place it at the mouse location. However, the problem arises that I often get large gaps in between movie clips if I move the mouse fast enough (which is more like normal speed for me).
View 6 Replies
Mar 16, 2010
I have a drawing api with the simple code of a flash:
Code:
stop();
this.createEmptyMovieClip("dibujo", 1);
dibujo.lineStyle(4, 0x000FFF, 100);
attachMovie("lapiz", "lapiz", 11);
[Code] .....
But I need a more complex lineStyle, I mean, a brush that look like a paint brush, like water color.
View 0 Replies
May 8, 2006
im currently developing a flash paint app for the psp and im stuck in a little rut here i need a way to allow the user to change brush size depending on what they press aka if they press pencil get a thin line stroke,if big brush big line stroke is there anyway of doing this?
and the next one how can i make a undo button so it undos the last line done
[Code]...
View 7 Replies
Jul 23, 2009
I am trying to unmask an image using a movieclip when the mouse hovers the stage. (like a paint brush effect).
my_mc = image
my_mask = mask movieclip (square)
this is what I have so far
ActionScript Code:
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
//Main Class
public class Artist extends Sprite{
private var drawing:Boolean;
[Code] .....
I tried putting the masking property in the constructor ( image.mask = imagemask ). but that gave me an error because imagemask is defined in the draw function. If I define imagemask (privately) ontop of the constructor and add the masking properties to the constructor it doesn't work correctly.e
View 5 Replies
Oct 5, 2010
My paint brush tool seems to be locked. I can't change the stroke, style, or scale....?
View 1 Replies
May 20, 2009
I draw a rectangle i should see a little bold circle to indicate a perfect rectangle, I seemed to lost mine, can somebody please tell me how to get it back!
View 2 Replies
Nov 17, 2010
When I use the Flash CS4 brush tool in "Paint Inside" mode it erases part of the strokes around shapes. For rectangles it erases the stroke on the top and left hand side where the brush head crosses it, though it never seems to affect the other sides. The effect is less consistant with ovals, but it breaks the strokes at some points. I am using Flash CS4 version 10.0.2 on Windows XP, and I have checked for program updates through the Help menu. Here are two examples:
View 2 Replies
Aug 19, 2009
I need to make a circle with a brush tool so that it looks like a child draws it. If I make a dot with the brush tool on the first frame and a circle on the 15th frame and then create shape tween between those frames it looks stupid, like the circle grows itself. Is there any possibility of making such a thing except for drawing it per frame?
View 3 Replies
Mar 22, 2009
most efficient way to test for a collision between a circle and a rectangle?
View 3 Replies
Jan 2, 2010
Is there a way to apply a colorTransform to a BitmapData in a circle rather than in a rectangle?
Instead of erasing rectangular parts of an image by reducing the alpha channel as in the code below, I'd like to do it in circles.[code]...
View 1 Replies
Aug 28, 2011
I'm a newbie in flash.I want to click a circle to show a rectangle surrounding it,and click any other places in this stage to hide this rectangle,how to implement this event?
View 1 Replies
Oct 9, 2010
In AS3 is there an easy way for collisions to take place between a moving circle and a rectangle object. A moving circle has a direction and you need to know how it collides with an object rather than knowing it just hits. In .net you use a points test where you test several points around a circle to see what hits an object and then you can work out what direction it will bounce off.
View 2 Replies
Jun 20, 2011
I have a BitmapData with 2 red circles. I want to find the rectangle area or each circle. If i use [B]getColorBoundsRect[/B] I get the smallest area enclosed by the 2 circles. How can i go about this and get individual area of the circles?
View 1 Replies
May 11, 2009
I want to make an editor like this site. [URL] If you browse this link you will find "Button. If you press this button you will navigate to a editor to design your layout. After draw a rectangle or circle or line you can resize that or can rotate that. When you finish if press the "you will back to the previous page where your desinged layout display. If you press the "" again then you will navigate the editor with the previously designed layout. I want to make a site like this. I want to use the flash cs4 to make the editor. Anybody knows how to draw a rectangle or circle shape with mouse and how to scale by setting the point and how to rotate by setting the rotation point also by using flash cs4 and as3?.
View 3 Replies
Mar 8, 2010
For those of you still with me, I am tasked with making some scrollable content in Flash. Load in a TextFile using LoadURL(), then display it. To get the text, we've written our own class TextFieldExtended, which is basically just there to give the textfile location to the constructor and then have the class do the various steps of getting it and loading it for you.So I needed to get a Scrollbar, which I got hereThe thing is, it works with Sprites.After trying to get it to accept TextFieldExtended, I bumped into a block, since the scrollbar relied heavily on a Sprite property that TextFieldExtended didn't have or could have.
So I tried adding the TextFieldExtended instance to a Sprite instance using addchild.A problem occurs here that I do not know how to handle. It seems that a Rectangle is drawn and the Text is drawn on that. I say this because the scrollbar moves the Rectangle up and down a bit, but the text doesn't scroll, just the Rectangle it is positioned in and the text then moves along with it.My question: can this be fixed, or is does this implementation of scrollbars need a lot of adaptations before this is possible?
View 1 Replies
Mar 8, 2005
I'm developing a game atm, and I need some help on the mathematics/coding of colliding circles (and their change in x/y speed). What i need to know is how to calculate the direction and speed a circle has after colliding with a static (non-moving) circle. I know how to detect a collision between the two, but I'm not sure about the maths I need to give the circle the right speed and direction after the collision
If i do know how far away the two circle-points (in the middle of each) are to each other (in both x and y coords) would it be easy for me to find the new speed and direction of the large circle in the example above? I know that I somehow should use the angles to pretend the circle hits a flat "wall" (as it only hits one point), and then calculate the new speed/direction. My only problem is that I'm not sure how to decide the angle of this flat "wall" and how x and y speeds should change when colliding with a wall that is angled. Does anyone here have any insight, links or tips on how I can du this?
View 6 Replies
Sep 30, 2005
i want to make one circle follow the mouse cursor, inside another circle. Similar to an eye looking at the cursor. Ive attached an example.
View 4 Replies
Nov 5, 2008
I have text in a dynamic field showing up as circle. I want to say if circle shows up change it to cercle (french).
[Code]...
View 1 Replies
Mar 8, 2005
What i need to know is how to calculate the direction and speed a circle has after colliding with a static (non-moving) circle. I know how to detect a collision between the two, but I'm not sure about the maths I need to give the circle the right speed and direction after the collision.If i do know how far away the two circle-points (in the middle of each) are to each other (in both x and y coords) would it be easy for me to find the new speed and direction of the large circle in the example above? I know that I somehow should use the angles to pretend the circle hits a flat "wall" (as it only hits one point), and then calculate the new speed/direction. My only problem is that I'm not sure how to decide the angle of this flat "wall" and how x and y speeds should change when colliding with a wall that is angled.
View 6 Replies
Mar 16, 2012
I want to create circle, and put 8 points on it. So, user can drag each point in order to change it's shape.
Is there any way to do this in flash?
I have some following code:
Ref. - How to draw a continuous curved line from 3 given points at a time
package{import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Point;
[Code].....
So, can anyone convert these three point curve line to 8 points circle?
View 1 Replies
Oct 6, 2009
I have to draw a circle using action script. The Circle Diameter has to be controlled by a button.
View 0 Replies
Apr 10, 2010
Trying to do circle circle collisions via math which I'm really having trouble with. One circle (player) just moves from keyboard. The ball reacts to the player. All the code shown is in my players class and I passed in a reference to the ball.
On my enterframe I have:
Code:
var xmov1 = xSpeed;
var ymov1 = ySpeed;
var xmov2 = ballRef.xSpeed;
var ymov2 = ballRef.ySpeed;
[code]....
Perhaps I'll go with a box2d equivalent instead of trying out my own physics shenanigans.
View 2 Replies
Aug 2, 2011
I am trying to convert a rectangle(actually multiple rectangles) to a curved rectangle. I think it should be pretty easy but I guess i am stupid. Basically I would have a start position and stop position (many of these), and they would be converted to curved rectangles and follow in a cicrle around.
View 0 Replies
Jun 26, 2010
I would like to create a rectangle inside of a rectangle, starting approximately 15% inward from the right side of the other rectangle.
I know how to create rectangles with:
Code:
var newHotRect:MovieClip = new MovieClip();
newHotRect.graphics.beginFill(0x00FF00);
newHotRect.graphics.drawRect(0, 0, 100, 100);
addChild(newHotRect);
But how would I make another rectangle on top of that (the black one pictured) that is approximately 15% from the right?
I toyed around with .right, and .bottomright with no success. Can anyone lead me in the right direction? or even finding the x and y of the upper right or bottom right side of a rectangle?
View 10 Replies
May 20, 2011
how to respond when a rectangle hits another rectangle? I already know how to detect the collision, I just don't know how to respond to it. I'm just trying making a simple side-scrolling platform game where I have platforms I can walk on and bump against on all sides. I have searched everywhere and just can't find the tutorials I'm looking for.
View 6 Replies
Sep 19, 2004
Here I what i need is : Start drawing first circle and when first circle is on half way, Start second circle.same way second and third circles. and after completing 3 circles, just gotoAndPlay 2nd Frame .
View 3 Replies
Feb 18, 2010
I have a simple three ring animation where the three rings fade in and out.On the stage the rings are a perfect circle, in the publish preview they look fine, but once I publish the SWF, all of the sudden the rings are not perfectly round anymore.
They are almost perfect but right at the top and bottom there is just a small portion which has sort of "flattened out"...
View 2 Replies
Apr 26, 2011
I bought a Flash video tutorial online for Animating and the FIRST step is to create a circle with the circle tool, and the guy does it online, and it fills itself in. I repeat his actions exactly and I cannot get the same result at all. I just get a circle.
View 5 Replies