ActionScript 2.0 :: DragOver - Drawing White Line By Erasing Dots
May 19, 2010
I have the raster of dots on white background. I would like it when I DragOver each dot it becomes white so it looks like you are actually drawing white line by erasing the dots. Ive somehow found the way how to do it by making it transparent when I rollover. But it doesnt work with dragover. How to do it only when I hold down the mouse button and drag my mouse over the dots?
This is the script assigned to MC with one black dot (I copied this MC with one dot into another MC and multiplied it to have the raster):
this.onRollOver = function () {
this._alpha = 0;
} this.onPress = function () {
this._alpha = 50;
}
I've tried also this, but it doesn't work:
var erasepoint = false;
this.onMouseDown = function(){erasepoint = true;}
this.onMouseUp = function(){erasepoint = false;}
this.onRollOver = function () {
if(erasepoint){
this._alpha = 0;
}}
I've almost got a bit of flash finished, The .swf so-far is here: [URL]. For some reason the file won't attach but the important bit of code I have so-far is below. I need to make a line to literally 'connect the dots', each of which is one end of a movieclip, I know it needs to boil down to ' line x,y, to (movieclipname)x,y, but cannot work it out!
I tried to erase whatever was drawn on the stage by using a similar function in a recent previous post but I'm not getting it.when I try to use it an error says that this is no longer supported. I tried addChildAt() and inserted different Num but it only erased everything including my button.the current code is:
flash and at the risk of sounding like an idiot, here goes.My question is:How can I make it so that the stage is divided up into a grid of 4 by 4px spaces that can be filled with a color after a click?So far I have some code that lets you draw a 4 by 4px dot but the dots can overlap because there is no grid:
dot.addEventListener(Event.ENTER_FRAME, do_stuff); /*dot is a movie clip of a 4x4 black dot*/ function do_stuff(event:Event):void
I am drawing some circles with a bit of code like this: Code: for (var i = 0; i<=1; i++){ for(var j = 0; j<= 1; j++){ this.drawMyCircle(radius,i*a,j*b); }} //a and b being the gap between the columns and rows
What I would like to do is add some metadata to each point I create, containing the centre coordinates for that dot (e.g. i*q, j*b). I have no idea about this part. Then with an onRelease event on a given dot , I can get the location. I have never dynamically made an event firing object. My goal is to be able to draw lines between two clicked dots. Unfortunately I have to do this dynamically so I can introduce a bit of variety.
URL...I'm thinking of haveing the dots move on a path (the line) clockwise. now I wonder: is it do-able in actionscript?I mean, can I set the line to be a path for the dots in actionscript? I'm thinking of something similar to the setMask() function..
So, I have a simple connect the dots game working by drawing lines. The line is drawn when clicking the right dot.However I want to be able to let the user be able to see the line and the line moves to any dot but only draws if clicking the right one.
i m making sketch pad in as3 and i have got smoothness issue when i draw a curve but now i am facing serious issue which is "dots are coming when i draw line through mouse movement and make alpha 0.5 or less" these dots are coming with mouse speed variation, i am sending u the code which em using for smooth line
I'm trying to plot data from several entities over time. Each entity will have its own line, so there will be several lines. Each line will be connected, but it's important that dots are drawn to represent data.
I'm aware of the linked bar chart, but at initial inspection, I can't seem to find one that offers me the ability to draw the dots. Anyone knows which library has this? I'm open to PHP, Flex, degrafa, whatever else that gets the job done.
I am using Flex 4 and AS3 and I am trying to make it so that the user can draw a freehand line with the cursor - I have this part done.However, I also need the line to be a dashed line instead of one solid line like it is now. below is my code I am using. I have found some examples on how to do this, but they are all for straight lines, not for a freehand line.
I am developing a white board application which allows the user to draw line with arrow head (some like Microsoft Word line with arrow feature). I am using graphics property along with lineTo() method to draw a line. Now i have to draw a angular arrow on the last point of line. I am drawing the arrow by connecting the points around last points. As 360 line can pass through this point and each line can have a different angle of arrow.
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?
I tried to create this preloader and test it but it seems not to work. I saw this tutorial, i tried to do it but unfortunately it doesn't work for me. I want to do it the easiest way possible. just : a loading bar ( white line) a background bar ( a blu background bigger line ) a AS ( which i am not able) i sent the file in attachments please look at the AS inside the symbol, an tell me where i'm wrong
Most of my experience with XML has been with image galleries where I have mostly stored information into attributes, but now I'm making a simple news display with XML. For practice. And the problem is here and I can't seem to solve it. You see, this is my code.
It doesn't actually display (empty line), but there are two empty lines that are selectable before and after the text. This boggles me, since I set ignoreWhite to true. I'd like it to display just Man, I rock, without any empty lines before or after that text. Sure, I could edit my <update> node so that the node and it's chlid text node are in the same line, but I want my XML to be easily readable. And it's strange that everytime I use a line break (with return of course, in notepad) in a text node, Flash displays that as two line breaks. So does anyone know what's with those two lines before and after the text and why does it make two line breaks where there is one in my XML file?
Most of my experience with XML has been with image galleries where I have mostly stored information into attributes, but now I'm making a simple news display with XML. For practice.
It doesn't actually display (empty line), but there are two empty lines that are selectable before and after the text. This boggles me, since I set ignoreWhite to true. I'd like it to display just Man, I rock, without any empty lines before or after that text. Sure, I could edit my <update> node so that the node and it's chlid text node are in the same line, but I want my XML to be easily readable.And it's strange that everytime I use a line break (with return of course, in notepad) in a text node, Flash displays that as two line breaks.
I have simple black line on white. It needs to crack like a whip. And it needs to recoil nicely. I'm not sure if top-notch tweening would do the trick. Or maybe a dense 'Inverse Kinematics' bone structure. Or if actionscript is the best course. I'm using a pen-tool/bezier-curved line right now and trying to shape tween with hints? I've never been bad at math, but I'm not a programmer and it's been a while.
I am making a website. Client's requirement is full browser will be flash but content will be fixed. There is a line in the header which will scale full browser.
Please check the attached rough layout. Red border will be removed. Now it is a guide of flash movie. I need to make white line in the header full screen and rest of the movie fixed size. Scrolling no problem.
I have a flash movie that has a thin white line on the left side which comes and goes as you stretch a window. Does not show up in any other browser. [URL] Same thing occurs in another site [URL] The flash movie is the same width as container div.
How do i animate a drawing line? I mean like from point A to point B, the flash will show it is "drawn" itself.Can I do it simply without actionscript? Is it possible? Because I have many lines to draw, to make it into a diamond.
What I'd like is the ability to draw a line with the drawing tools in Flash, and have that line appear onscreen as if it were being drawn. I don't think there's a way to do that with the animation tools (I'd like to give it a go, but I have no idea, once I've drawn a line and converted it into a symbol, how I could access the anchor points and whatnot of said line to then do some funky stuff with curveTo, or whatever better solution is out there...
With several flashes I'm trying to create, I find that I need to know how to depict a line being drawn or a plant/vine growing (same concept right). Obviously frame-by-frame animation can be used, but that's quite tedious. There must be some other, more productive way to pull it off. Example of the vine: [URL] I've tried shape tweens with shape hints but it didn't render very well at all.
I'm having troubles with the width of a line using the lineTo and lineStyle function, I can put setting the thickness and noScale parameters, and it works fine for no longer lines than 32000 pixels, but when I try longer line, the thickness changes to a bigger width. if you want to try what I'm saying you can prove this by changing the num variable:to 33000 for example:
I'm trying to create a simple graph showing the stock trends for the past few days. In the x axis I have the dates and in the y axis I have the stock value. I have to do this dynamically and I think I can figure it out, but I need help with something else: I need to be able to (dynamically) draw the slope of the line as the user clicks on a point... something like in www_calculusapplets_com/twicediff.html except that instead of having the slider the user will click on the actual line.