ActionScript 2.0 :: Paint Program - How To Change Thickness Of Line
May 23, 2005
Right now I create a paint program, which will consist of _xmouse, _ymouse, different colors to draw lines, different sizes. But I have a problem:
_root.line.lineStyle(size,0x00ff99,100);
The size is the thickness of the pen. But it don't seems to work inside of that script.
View 8 Replies
Similar Posts:
Jan 16, 2010
trying to make a slider that changes the line thickness in a drawing app that I would to share with my students. When moved from left to right a circle changes scale. This circle would act as a visual reference on the stage telling the viewer that the line thickness is changing. Right now I just want to figure out how to connect the slider so that the circle changes dynamically. Once I get that I feel I can figure out how to connect it to lineStyle(). The current code I am attaching has the circle change size at onle two points-the far left and far right. I keep trying to write something that uses mouseX properties but so far nothing is working.
View 5 Replies
Dec 29, 2009
I have made a flash painting program, and need a "save function" that will save the image to my database.
View 1 Replies
Mar 24, 2009
Creating a paint like program in Flash. I have it so the mouse is replaced with a brush and when the brush is over the toolbar, the brush goes back to the mouse. It works until you start to paint.
Code:
var currentDepth:Number = 0;
var startDrawing:Boolean = false;
var brushSelect:Boolean = true;
[code].....
View 8 Replies
Mar 26, 2009
i have been messing around with a script found for a simple paint program. After adapting the code a bit for my own needs and getting an understanding of how it works I had a couple questions.first of all I need to create a button that will clear the stage (or more specifically lvg1)second what does e reference in lines similar to
Code:
e.target.graphics.lineTo(e.localX,e.localY);
Code:
import flash.events.MouseEvent;
import flash.geom.Matrix;[code].........
View 2 Replies
Jan 17, 2010
Its an mx:Text object. (The Text object is actually being used as a mask so don't know if that's the problem.) If underline is set with the <u> tag in Text.htmlText, or Text.textField.setTextFormat, the underline thickness is always just one pixel which is not acceptable. (There are other problems with <u> so I'm limited to using setTextFormat currently.)
Can the thickness of an underline be set through CSS? (textField.styleSheet, etc.)
I may have another problem as I already use setTextFormat extensively, and the documentation says you can't use textField.setTextFormat if you use textField.setStyleSheet.
I primarily need the underline to simulate correctly the look for an anchor tag.
View 2 Replies
Oct 28, 2009
(Im using CS4 and actionscript 2)
I have some movieclips with a graph (not generated, manually drawn). I want to change the thickness of the line inside the movie clip. How do I do that?
When I move the mouse over the line the graph must highligt (become thicker). I can do this with the line as a button, mouse-over graphics. But I also need to highligt the graph when the mouse is over some text (to link the graph with the text). If I have 2 - or several - buttons can I have them all show the mouse-over image at the same time, if the mouse is over just one of them?
Another ideer: I have made an actionscript the fades (using alpha 0 and 100) for 2 similar movieclips each with different thickness positioned over each other. But the initial value for both lines is a problem, only the thin line must be shown, the thick line must be alpha=0. If I set it at the start of the actionscript then it resets every time the flash starts over. Is there some way to set the inital value (alpha=0) just once? When the flash playes first time?
View 1 Replies
Sep 24, 2009
I made a small box that is filled with navy blue and has a red line around it, but when I increase the thickness to say 50, it reduces the size of my navy blue box.
PHP Code:
public class Box extends MovieClip {
public var color:uint = 0x000099; // class property of navy blue
public function Box() :void {
initialize();
construct();
this.graphics.lineStyle(50, 0xFF0000);
this.graphics.beginFill(color);
this.graphics.drawRect(0, 0, 100, 100);
this.graphics.endFill();
}
View 2 Replies
Feb 28, 2011
how can i control my line thickness with the speed of the cursor?Right now ive got this code, but how can i convert (speed) into something that can be translated into thickness?
ActionScript Code:
var prevPt:Point=new Point(mouseX,mouseY);
addEventListener(Event.ENTER_FRAME,mouseSpeed);
function mouseSpeed(e:Event){
[code]....
View 7 Replies
Apr 17, 2007
I am working on a interactivity wherien i draw lines using a pen/pencil just as in MsPaint application in Microsoft. Ia m done with the pencil/ pen tool and its working fine but I basically want to change the thickness of the line at runtime by using a slider functionality.
Code:
drawing_mc.lineStyle(1, 0x99CC00, 100);
View 1 Replies
Feb 10, 2010
When using a simple line shape graphic (that was created in Flash) to supply Deco Tool > Symmetry Brush > Rotate Around, the line looses it's thickness along the rotation. See attached image. I'm following chapter 2 in Flash CS4 Classroom In A Book, and the visuals from the book do not match what is happening on my computer.
View 1 Replies
Apr 11, 2012
I'm having an issue when it comes to line thickness on movie clips, when a movieclip is flipped the line thickness vanishes due to Flash thinking I'm squishing the MovieClip. Is there any way I can make Flash not bother the line thickness when changing scale or some sort of alternative? Or is my only choice to kill line thickness altogether.
View 1 Replies
Feb 8, 2009
I am a new user. How do I can add more thickness and change color of a rectange Sprite object on mouse over and on mouse out I want to make it normal again.
View 2 Replies
Jun 10, 2011
I want to be able to change lines thickness/color for sprites/movieclips created in Flash CS in ActionScript code. Is it possible to achieve this kind of functionality?
View 2 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
Oct 5, 2010
My paint brush tool seems to be locked. I can't change the stroke, style, or scale....?
View 1 Replies
Jan 16, 2010
Is there any way to create an Air 2 program that runs just in the command line? (no windows, no gui, etc)
Something similar to Windows Ping program. It would accept arguments and then output std out.
View 2 Replies
Nov 23, 2009
I'm trying to create/write a custom flash video player program which I want to compile into an .exe after I'm happy with it.The tricky part is, I want my other windows application to be able to specify a path to a video in the hook to open the .exe video player. Example .... When clicked inside of my Custom .Net application, I will open a link to my video program with a hook for which video to play as such...
Target: "C:VideoPlayer.exe" -C:VideosExample.flv
how I can do this in code of my video player? I am willing to vary my format of handling this to accomplish my goal. have thought about reading from a text file and pulling the path to the video from there and then deleting the text file later, this is a last resort however as I would like very much to use a command line hook instead. Please give me any suggestions or ideas and or samples of code.
View 1 Replies
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
Oct 19, 2010
I have this code:
ActionScript Code:
for (var j:int = 0; j < 20; j++){
if (values==j){
var "ingredient"+j:"Ingredient"+j = new "Ingredient"+j();
[Code].....
it doesn't work for what are probably obvious reasons but I show it to give you an idea of what I'm trying to do which is change the name of the variables while the program is running.
View 6 Replies
Jan 18, 2010
I can't change property Color of the component Movie Clip in my program? Compiler didn't found the error but when my program run color Movie Clip doesn't change.
View 5 Replies
Jul 24, 2011
Im creating MMO with flash but making it small at first.... I need to know the best way to code the characters.... I was thinking keeping all the data such as coordinates, inventory and cash all in MYSQL so the clients cant change the values in my flash client program. I was thinking of calling quires every few seconds which would eventually becomes thousands... what do you think is the best way about it?
BTW: Flash = Client Side
PHP = Server
MYSQL = DATA
View 1 Replies
Nov 4, 2008
Im trying to add an exit button onto my program so when its clicked it exits the program completely.. I've tried some of the suggestions on the forums but they arnt working. what I have been using and its not working..
// CLICK to Exit
exit_Btn.addEventListener("mouseUp", goExit);
function goExit(evt:MouseEvent) {
fscommand("quit");
};
View 9 Replies
Sep 29, 2010
Is there a way to start an unrelated program (such as Window's media player) from inside of a flash program?
View 2 Replies
Mar 24, 2003
I need to program a timer for a typing tutorial program. It needs to go to 5 minutes. When the timer gets to 5 minutes the movie has to go to frame 13 which displays the results of the typing test.
View 1 Replies
Feb 9, 2010
I want to know is there anyway to invisible title bar for a AS3 project? and how to force program to use fix resolution and change monitor resolution to what we want?
View 1 Replies
Apr 21, 2011
This css can set style for all normal Arial, but I have Arial bold in project, how can I apply bold font for them?
@font-face {
src:url("fonts/ARIAL.TTF");
fontFamily: Arial;
[code].....
View 2 Replies
Feb 3, 2009
Is there a way to draw a line with graphics.lineTo() that is thinner than 1point? According to the documentation the thinnest lineStyle possible should be 0 but I cannot see any difference between a 0 stroke and a 1 stroke?
View 4 Replies
Feb 24, 2010
The sprite which contains all element in my game world uses the real-world meter as distance unit, it doesn't know what pixels are. I then apply a scale to this sprite to make it appear correct on screen. Currently I use 1 meter = 100 pixels, so scale = 100.
If I try to draw a line inside this sprite it appears lineStyle(thinkness) rounds the thickness parameter. If I specify 0.5 (50 cm) it always gets drawn with 1 pixel (1 cm). If I specify 0.6, the line becomes 100 pixels, or 1 meter, thick. So basically I can only draw lines of 1, 100, 200 etc pixels thinkness.
Anything I can do about this? Otherwise I'll have to use a smaller unit like millimeters for my world.
View 1 Replies
Mar 14, 2012
Whenever i try to draw anthing (oval, box, pencil, brush) it just comes out as a thin green line. Ive tried the obvious by changing the thickness, style and colour for each of the tools but nothing seems to work.
View 3 Replies