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;
}}

View 6 Replies


Similar Posts:


ActionScript 1/2 :: MovieClip Control - Drawing Line By Connecting Dots

Oct 7, 2009

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!

time.onChanged = function() {
if(time.text.length == 4) {
var hours:Number = parseInt(time.text.substr(0,2),10);
hours *= 60;
var minutes:Number = parseInt(time.text.substr(2,2),10);
[Code] ......

View 3 Replies

ActionScript 3.0 :: Erasing Drawing From Stage?

Jan 12, 2010

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:
 
var drawing:Boolean = false; 
this.graphics.lineStyle(5,0x000000);this.graphics.moveTo(mouseX,mouseY);
this.addEventListener(Event.ENTER_FRAME, onLoop, false, 0, true);stage.addEventListener(MouseEvent.MOUSE_DOWN, onDown, false,0,true);stage.addEventListener(MouseEvent.MOUSE_UP, onUp, false,0,true);

[code]....

View 2 Replies

ActionScript 3.0 :: 4 By 4px Stage Grid For Drawing Dots?

Jan 13, 2011

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

[code].....

View 4 Replies

ActionScript 2.0 :: Drawing Lines Between Two Clicked Dots Dynamically

Nov 30, 2007

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.

View 1 Replies

ActionScript 2.0 :: Set Line To Be Path For Dots

Feb 21, 2004

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..

View 2 Replies

ActionScript 2.0 :: Connect The Dots With Line Attached To Mouse?

May 2, 2009

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.

Code:
this.createEmptyMovieClip("line",1);
line.lineStyle(2,0x000000,100);
dot_array = ["d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10","d11","d12","d13","d14"];

[Code...

View 3 Replies

ActionScript 3.0 :: Dots Are Coming When Draw Line Through Mouse

Mar 25, 2011

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

[Code]...

View 3 Replies

Php - Charting Libray That Offers Linked Line Chart With Dots?

Jul 27, 2010

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.

View 2 Replies

Flash - When Drawing A Freehand Line With The Cursor, How To Make It A Dashed Line

Nov 23, 2011

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.

Class File (DrawingArea):

package
{
import flash.display.BitmapData;
import flash.events.Event;
import flash.events.MouseEvent;

[code]....

View 3 Replies

Actionscript 3 :: Drawing An Arrow At The End Point Of The Line Using Line Slope?

Jan 9, 2012

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.

View 1 Replies

Flex :: Creating Simple Live Drawing / White Board Application?

Jul 9, 2010

How do I create a simple live drawing board/whiteboard functionality using flash as3, and flash media server 3.5.

View 1 Replies

Actionscript 3.0 :: Flash Drawing Board With Erase Function / Erase Line By Line

Jan 9, 2009

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 Replies

ActionScript 3.0 :: Preloader - Loading Bar (white Line) A Background Bar

Jun 10, 2009

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

View 4 Replies

ActionScript 2.0 :: XML Output And White Spaces And Line Breaks

Mar 20, 2005

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.

Code:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function() {

[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?

View 8 Replies

ActionScript 2.0 :: XML Output And White Spaces And Line Breaks?

Mar 20, 2005

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.

Code:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function() {

[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.

View 8 Replies

ActionScript 3.0 :: Simple Black Line On White - Whip Animation

Jan 13, 2011

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.

View 1 Replies

Professional :: Thin White Line On Right Side Of Project When Viewed From Web?

Jun 2, 2011

I have double checked flash, design and code and I can't seem to correct the small thin white line appreaing to the right of my movie.

View 5 Replies

ActionScript 2.0 :: Make White Line In The Header Full Screen?

Apr 9, 2011

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.

View 1 Replies

Professional :: Flash With Thin White Line On Left Side When Resize Window In Firefox

Jan 27, 2011

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.

View 1 Replies

IDE :: Animating A Drawing Line?

Nov 19, 2009

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.

View 14 Replies

ActionScript 3.0 :: Line Drawing Effect?

Apr 16, 2009

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...

View 2 Replies

Create An Animation Of Line Drawing Itself?

May 15, 2009

How can a create an animation of line drawing itself.

View 1 Replies

Simulate Drawing A Line Or Growth

Nov 9, 2009

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.

View 6 Replies

ActionScript 3.0 :: Looking For Smooth Line Drawing In It?

Oct 18, 2010

I am looking for a smooth line drawing effect as in the pencil tool in Flash. I need to implement the same using as3.

View 7 Replies

ActionScript 1/2 :: Drawing A Long Line?

Mar 26, 2009

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:

num = 32000
this.createEmptyMovieClip ("Envolvente", 100);
this.Envolvente.lineStyle(0,0x00CC00,100, false, "none",
"round", "miter", 0.8);

[Code]...

View 2 Replies

ActionScript 3.0 :: Line Drawing Is Too Slow

Sep 4, 2011

i'm developing a game for mobile devices where I need to draw many objects and some lines(1~3 just occasionally).
 
my problem in short is: Line drawing is too slow for iPhone4

objects are drawn with bitmap, so it's pretty fast with GPU support. drawing lines are slow.

a end point of a line follows mouse cursor, so it changes every frame.

here's how i did it

initialization step:
var img:Shape = new Shape();
addChild( img );

[Code]....

that gives me 47~48 FPS on my iPhone. +2 FPS but still way too slow for a simple line. 
 
without the line, i can maintain my whole game around 30 FPS. with the line, it goes below 20.

View 3 Replies

Flex :: Drawing Line Without Mxml ?

Feb 16, 2011

i want to draw a line with actionscript .Here is my code

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"[code]......

View 2 Replies

ActionScript 2.0 :: Animating A Line Drawing?

Sep 23, 2009

I was told that by using actionscript to animate, it will make the flash file smaller and animations smoother... is this a correct assumption?

with this in mind, I have the code:

ActionScript Code:
this.createEmptyMovieClip("myLine", 10);
myLine.lineStyle(2, 0x000000, 100);
myLine.moveTo(10, 10);

[Code].....

View 0 Replies

ActionScript 3.0 :: Drawing Slope Of A Line?

Jan 27, 2011

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.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved