ActionScript 3.0 :: Make A Paint Bucket And Open Feature?
May 8, 2010
I am making this drawing application that so far contains a pencil tool, eraser, text tool, clear tool, and even save image feature. There are a few more features that I would like to add, including a paint bucket tool and a open image feature, but I am not sure exactly how to code them. Here is my code for the whole program:
for my class i have to draw this fish. in one of the steps it says to draw fins with the pencil. then it says to use the paint bucket tool to color it in. however i cannot color it in. i used all the options too, close small, medium, & large gaps and i still can't color it in. does it have to connect to the start point? i simply attached it to the fish's body. i started over on the 1st part of this 3 time already, and my patience is wearing thin.
I want to make a paint bucket function, I know about floodfill, but it leaves a white (like the background color) outline.And anyhow I would rather make it on a sprite without converting it to a bitmap, is there a way?And if not then anyone knows how to fix the outline on the floodfill?
I would like to implement Photoshop's Paint Bucket like functionality in ActionScript. Suppose, I have loaded a JPEG/ PNG image into flash using URLLoader class. Now I'd click on a colored region to replace that color with another one. Now I've done something using the threshold method in the BitmapData class. But the problem is this method replaces that color found in all the regions in the image. What I want is replace the color in only the adjacent region to where I click with the mouse.
I'm putting together a little application that has a simpe paint bucket functionality. I'm having a small problem, i'm sure it's an easy fix, but frankly I'm not much of a programmer.
Essentially what I have is a set of color swatches that users can select, and then a grid of movie clips with a series of frames, each corresponding to a swatch color. Over that, I have a grid of clear buttons that check to see which swatch is selected and then tell the movieclip underneath to go to the frame that corresponds to the right color. What I want to do is just set up the function once and call it for each movie clip, rather than repeating the function for each cell in my 6x7 grid.
I want to make a paint bucket function, I know about floodfill, but it leaves a white (like the background color) outline.I would rather make it on a sprite without converting it to a bitmap, is there a way?And if not then anyone knows how to fix the outline on the floodfill?
I'm a student currently trying to learn Flash CS3. However I've encountered a problem with the paint bucket. In my assignment I've created a simple rocket, each part with it's corresponding layer. Now I need to go back in and fill the body in a light gray color. I did so successfully with the nose cone. The problem now is that the bucket won't fill any other area no matter what I do, or which layer is selected.
If I click my paint bucket color chooser, it will give me an eyedropper but it doesn't show the correct colors of what my mouse is hovering over. It's just a completely random jumble of colors whenever I move my mouse.
I am beginner in flash and I started to learn flash c4 (with video lessons in my language but from flash 8! but it is not problem now about drawing than only about code in actionscript). I have now problem in using of Paint Bucket Tool in flash cs4. I made a ship, I made a whole document/white page for drawing in rectangle tool (frame for picture), and I made to lines which will be like a hill. it is for background, behind the ship. but when I want to color this background, to be green for example, my Pain Bucket Tool don't want to color ONLY place behind the ship and under mentioned "hill lines", than Paint Tool color whole document. therefore I can't make a hill because I get everything colored in green.
I tried all option about closing of gaps. how can I color only wanted places in picture and not whole picture? "hill" is not strait line so I don't know how to select hill space. of course, after it I will have to repeat process to color space above "hill lines", it will be blue like sky. and just to say that "2 hill lines" are from left to right side of document, there is no hole, it is closed line.
I draw a shape with the pen or line tool. If i did not draw it perfectly connecting the dots, i cannot fill it with the paint buck fill tool. How can you tell it to just close the structure
if you open microsoft paint and use the pencil tool you'll tell its not like the brush tool in a vector based program. vector based tools keep drawing the object until you let go of the mouse. but the pencil tool on the other hand seems like the canvas is divided up into a grid and where ever the mouse clips it knows what grid it belongs to and it draws the pixel in that grid. thats what it feels like. my question is say i open up a new as3 file, how would i make something like that?
taking into account of course i'd be adding a zoom function were you'll be able to zoom in up to 8 times. but thats something i assume i'd worry about later, as i should be able to do that no problem.
On the creative pro website [URL].. they have a block at the top with images that change. It is titled 'today on creative pro' Does anyone know how they created it? Was it with Flash?
I'm using Adobe Flash CS5 with Adobe Air 2.5 to build an air app. Is there a way to make use of the Air 3 captive runtime feature? Do I need additional software to publish the Air app with the captive runtime?
I created a game in Flash and outputted it into an APK file for use in my Android phone. I would like to make a quit function so that it quits the game application when you leave.
Right now, I have to quit using task manager in my mobile. Also how do you enable it to maintain a high score in the game so that next time the user plays the game again, the high score is still there? Right now, the highscore is lost when you quit the game application.
I come across a problem when i follow the book "classroom in a book series" the Flash CS4 one (Red cover book) Chapter 2 Q.1 I try to draw straight lines or curves but i found i still cannot manage how to use PEN TOOL How can i draw straight line? Also how can i draw absolute vertical or horizontal line with some special combination key like CTRL or SHIFT i tried guessing SHIFT or CTRL while using PEN TOOL but no help
How can i draw curve? i know it depends somehow on whether i hold my click for a new anchor point? Any tutorial which is clear and easy for new comer for fully understanding for PEN TOOL.(Currently i try reading pdf reference from ADOBE Web site and google search but did not make myself understand.)
Q.2 I cannot use bucket filling a shape draw by PEN TOOL(i already search google sites but cannot find one with satisfied causes for this FILLING Problems) like the image shown below(Please click to enlarge this PRINTSCREEN) Tools i used are PEN TOOL drawing a shape first then a BUCKET for filling color.
I have a whole bunch of dynamic variables that I need to load into Flash, to help control a dynamic card game being developed. However, what is the best way to load these variables? I've used LoadVars in the past for two or three, but this is over a dozen. They are all primarily pulled from mySQL, based on Username.
I have Flash CS5 and cannot get the pencil or in k tool to change color it stays at the layer color only. When I make a shape and pick paint bucket tool it will not add the color I am choosing.
I have the following code which upon the pressing of the letter "s" opens up a new url in a uiloader window. If you press "s" repeatly it continues to open the window over and over without it finish fully playing, is there a way to add a timer to the "s" so it can only work once every few seconds or possibly a way to make the url completly open before you can press the "s" again??
Actionscript Code: stage.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler);function keyHandler(e:KeyboardEvent):void{ if (e.charCode == "s".charCodeAt(0)){ var
I have a bunch of flv files and at the momment when a user clicks on the link to each of the files on my site, they are prompted to download each FLV file or asked how to open the video. Is it possible so that when the user clicks on the link the file opens and plays in a flv player( not embedded though), without asking to be downloaded or how to open the video ? Do i have to somehow add the player code to the flv file ?
Does anyone know how to make the URL open in the same window. I am using flash CS3:
vr getnextpage5:URLRequest = new URLRequest ("http://www.yokubou.co.uk/digitalart.html"); Button6.addEventListener(MouseEvent.CLICK,b5Click) ; function b5Click(event:MouseEvent):void{
I'm using an as3 TextField called textField and I'm updating the .htmlText property to include a hyperlink. I'd like to know if anyone knows how to make the hyperlink open in a new window or is it limited to opening up in the same window?
I'm building a kind of dynamic level generator, at the moment I have it draw a grid of alternating coloured squares/plots (for visual debug), currently set at 1 pixel which I then scale up so they are easier to see. I make a list of all these open 'plots' in an array(maybe a dictionary would be better?)... Next I draw a random selection of roads on top of my grid in another sprite. Ranging in width from 2 to 8 plots. First drawing all the horizontal, and then the vertical ones. Now I'm wondering what would be the best way of finding all the plots/pixels that these roads occupy?I thought perhaps I could draw the roads into bitmap data, and then find the x,y values of all the black pixels? something like:
PHP Code: var bData:BitmapData = new BitmapData(roads.width, roads.height, false); bData.draw(roads)
How on earth do I get the HTML links inside a flash movie open up in the same browser window where said movie is embedded in (As opposed to opening up as a new pop-up windows)? Here is the code I have inside each of the buttons I have inside my flash movie:
var link7:URLRequest=new URLRequest("videos/december.html"); videos_btn.addEventListener(MouseEvent.CLICK, buttonClicked7); function buttonClicked7(event:MouseEvent):void { navigateToURL(link7); }
Im guessing this is linked to actionscript,Ive made 2 buttons, One named Home, And another Exit,When home is clicked i want it to open a certain scene in this case called S Home,And when exit is clicked i want it to open the scene S Exit,How to do this?I will explain my problem more if needed,You could maybe call this linking a button,Only it opens a new scene rather than .html or an website
I am trying to create an effect that when someone clicks a button it opens a movieclip. I want everything behind that movieclip to get dark so that the only option is to click on a button in the open movieclip.