ActionScript 2.0 :: Changing Color In A Drawing Board?
Feb 21, 2005in a flash drawing board... how do i get it to change color of the pen... i know how to draw.... but not how to change color
View 3 Repliesin a flash drawing board... how do i get it to change color of the pen... i know how to draw.... but not how to change color
View 3 Repliesim making a drawing board and i want users to be able to press colours on my swf to be able to change the colour of the pen how can i do this? if you dont know what i mean just check a paint package out and look at how you chose your colour thats what i want to do?
View 9 RepliesI'm making a drawing board and i want users to be able to press colors on my swf to be able to change the colour of the pen how can i do this?
if you dont know what i mean just check a paint package out and look at how you chose your colour thats what i want to do?
I have put a drawing board on my application, but I cannot figure out how to get a colour selector..? Another problem with this, is that when the page is selected I can draw out of the board, and also when I navigate to another page I can continue to draw on other pages (not good!)...
Heres the script:
this.createEmptyMovieClip("drawing_mc",this.getNex tHighestDepth());
this.onMouseDown = function() {
drawing_mc.lineStyle(10,0x000000);
drawing_mc.moveTo(_xmouse,_ymouse);
onMouseMove = function() {
drawing_mc.lineTo(_xmouse,_ymouse);
}} this.onMouseUp = function() {
onMouseMove = noLine;
}
I found this tut http:[url]...and wat i want to do is have thing like Flash.I know how to make the lines thicker but i need when you click the button the lines turn thicker like the As changes.
View 9 RepliesUpon hoping to the frame with the drawing board actionscript on it, i've successfully created the erase button to remove all the drawings made, but then i also have a 'HOME' button that takes me back home. BUT the drawing board actionscript is still active even on the HOME frame. +On the home button i've added in the clear(); function to also remove the drawing. Either way this still does not remove the drawing board actionscript. How do I completely disable the drawing board actionscript upon clicking home? but still be able to reactivate it when I'm on the frame again.
[Code]...
This code is from a drawing board, the problem is:
1- When you click outside the drawing area, a dot is drawn (thus you cant click anything except inside drawing area because it will result in undesired dots)
2- When you drag outside the drawing area the dot is drawn (bad), the pencil doesn't draw (good), but if you drag until reaching the drawing area draws (undesired, because it should only draw when you started to drag from inside the drawing area) how to tweak the code or simple add a "deselect" tool option ? That's a link to the fla file ziped, and that's the code of the drawing board: [URL]
Code:
_root.P = 0;
_root.level = 1000;
_root.tmpx = -1;
[code]...
i'm currently devolping a drawing board out of flash but i was wondering instead of erasing all the pen lines drawn just the last pen line drawn,im using kirupa drawing board tut for the all erase just stuck to gewt the last line erase done
View 9 Replies(MX2004)I have made a 'whiteboard', users can draw on it, change width of pen, clear it.
I need to:
1. allow users to add text as well as lines
2. allow them to add a circle or a square
3. clear last stroke/shape
4. save the drawing
5. email it or print it
I used Kirupa's drawing board tutorial, but when I finished making the flash file I wondered if there was a way to limit where the viewer can draw. For example, on his tutorial he shows you how to create an easy erase button. Well, what if I don't want the viewer to be able to draw on the button. Is there a way to specify the area that you want the viewer to be able to draw on? I tried making the space a movie clip and just adding the actionscript to the movieclip, but when I placed the movie clip inside a bigger flash file it wouldn't let me draw at all. I thought making it a movie clip would then limit the drawable area. Did I do a good enough job explaining my problem? I just want to be able to limit where the viewer can draw, so that the viewer can't get wild and draw all over the buttons and controls.
View 1 RepliesThis code is from a drawing board, the problem is:
1- When you click outside the drawing area, a dot is drawn (thus you cant click anything except inside drawing area because it will result in undesired dots)
2- When you drag outside the drawing area the dot is drawn (bad), the pencil doesn't draw (good), but if you drag until reaching the drawing area draws (undesired, because it should only draw when you started to drag from inside the drawing area)[code]...
Is there a drawing board in Flash Professional CS 5.5 installed or an extension? I want to use it to display a text string, and the user would be able to draw above the text. For example I could display a question and the user would be able to circle the right answer. Is it possible?
View 1 RepliesI need to know how to script the drawing board as in the user can only draw on a specified area. For example, on a 800x600 layout, only 1/4 of it is the drawing board.After the user has drawn the image, when he/she clicks on a button, the image will be replicated on another area in the same 800x600 space. So far, I can only manage to make a drawing board on the whole 800x600 space and erasing.
View 2 RepliesHow do I create a simple drawing board/whiteboard functionality in Flex ?
View 2 RepliesHow do I create a simple live drawing board/whiteboard functionality using flash as3, and flash media server 3.5.
View 1 RepliesThis time round i need to get the pattern drawn on the drawing board to be repeated on another area of the stage.I need it to be repeated 4x4 tile.
View 1 Repliesi am trying to make a drawing board(like colouring book) where when i click and MOVE THE MOUSE it colours the object(more like a brush and not as a paint bucket)i would like to know how to colour objects individually(without coloring background) and the most IMPORTANT is there any way to detect what percentage of object had been colored(like if 100% of object coloured something happens!)
View 2 Repliesi'm doing a school project of mine and i am having trouble doing the changing color objects. here is an axample of the script that i;m using:
on (rollOver) {
var colorful = new Color("_root.shapes");
colorful.setRGB(0x003366);
}
For this script it does change color, but how do i make it to stay the same color that user selected after going to another scene?
I am using a tilelist I want to change the border color and the background color of the tile on selection.
View 1 RepliesI am in the making of a isometric level editor, and I have about 15 movie clips with more to come. I want to let people change the color of tiles to what they want from a list of colors, so how can I let them change the color of a tile dinamicly with actionscript so that it changes a tile's color while preserving changes of "shadows"? I mean I have let's say a cube and to make it look 3D I need to change each face to make a feeling of 3D and not a flat one.
View 1 Repliesi have been doing this tutorial http:[url]..but i am stuck on PART 8, i have done everything the tutorial has said so far (although my image and the colors used are different) but the large blank box at the top of the color pallet isnt changing color when i click on any color from the pallet.
Also this tutorial doesnt say what version of flash and actionscript is best suited for this.Currently i am using CS4 & Action Script 2.0 but i don't know if this is correct. below there is a link to the fla. file that Coloring_Book.fla.
I have a few movie clips that change color when they are rolled over and rolled out of which is great and works correctly but now I have add glows to those buttons to serve as borders or a stroke and when you roll over the buttons the color and the filter color changes.
View 3 RepliesI have a movie clip where it contains an instance of text
I able to change the movie clip and text color individually
but when i try to change both at once the text color is same as movie clip color
ActionScript Code:
myColor = new Color(myMovieClip);
myTextColor= new Color(myMovieClip.myText);
[Code].....
So i'm working on this website and I want to be able to switch out the entire color scheme on the website everytime a button is pressed, I've stepped away from flash for awhile and actionscript 3 is new me. Plus I haven't quite found any truely useful stuff on forums yet.
What i can't figure out is when a button is pressed the HTML background color changes to one of 5 preselected colors (that alternate ever time the button is pressed). Then for each background change the text changes too as it is part of a entire new color scheme.
What I've managed so far is to change the color of the background thats within the Flash file. What i did was to make a movie clip that plays to a next frame and stop everytime the button is pressed. Now i just need to also get to change the HTML color and the font colors.
//"homeText" being the name of dynamic text field and "Button" the name of the button and "background" being the movie clip that is the background within the flash file.
Button.addEventListener(MouseEvent.CLICK, Button_CLICK);
function Button_CLICK(e:MouseEvent):void{
background.play(); homeText.TextFormat(color "0x000000");}
I'm not sure if my code is just sloppy or if i'm completely going the wrong route here.
I have a button with an icon. I want to have the button in gray so I change the chromeColor but when I do that, the icon became darker.On the left the button without changing the color, on the right, the gray button with and darker icon.How can I have a gray button without changing the icon color?
View 2 RepliesMy buttonMC is build of:
1. shape (a rectangle gray color) converted to MC named = Bar
2. (on top of 1) DynamicText named = buttonText converted to MC named = buttText in order to change the color of the shape I decleard a veriable
cButton = new Color(this.Bar);
I then add actionscript onRollOver
cButton.setRGB(nRed << 16 | nGreen << 8 | nBlue);
but it also changed the color of the text so I added a veriable for the text field
tButton = new Color(this.buttText.buttonText);
tButton.setRGB(0xFFFFFF);but that didnt help
this is bad becuse the text on the screen is unseen.
Im building a pretty simple drawing board in flash, i got this code from this forum and it works fine (there is more to it but this is the drawing part)[code]This works fine. But i want to be able to erase the drawings, step by step this is ths tricky part, ive looked everywhere(ok not everywhere) but in a whole lot of places but the only thing i found is how i could delete everything with removeChild and that in not what i want. Maybe i need to change the function abowe? Please help me to get in the right direction. What should i read about /look at?
View 5 RepliesI 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.
i've come across this ActionScript sample, which demonstrates drawing of the color spectrum, one line at a time via a loop, using waveforms.however, the waveform location of each RGB channel create a color spectrum that is missing colors (pure yellow, cyan and magenta) and therefore the spectrum is incomplete.how can i remedy this problem so that the drawn color spectrum will exhibit all colors?
// Loop through all of the pixels from '0' to the specified width.
for(var i:int = 0; i < nWidth; i++)
{[code]...........
Drawing a line runtime with the drawing API:
_root.createEmptyMovieClip ("line",1);
// with set color 0x000000 :
lineStyle (2, 0x000000, 100);
...
but after the line is draw, want to change the color of "line" The:
mYColor = new Color(line);
//mYColor = new Color(_root.line);
myColor.setRGB(0x00FF00);
is not working, for this Is there any other way to change the color or need to draw again the line?