ActionScript 2.0 :: Troubleshoot This Drawing API Routine?

May 11, 2004

I have a pretty simple script that allows you to draw multiple rectangles using the drawing API in MX. I need to create multiple MC containers, so that I can later do other functions to these areas.Now, what I can't figure for the life of me is why the rectangles are drawing in the way they are. If you copy this script into a blank file and run it, you'll see what I mean. Why is it duplicating/replicating/echoing as you draw? If you debug and list Objects, it is creating the MCs properly, so where are these other lines coming from? I'm sure this is something simple to fix, that there is some recursion going on, but I can't troubleshoot it.

Code:
drawLevel = 0;
drawOK = "yes";
this.onMouseDown = function() {
//

[code]...

View 5 Replies


Similar Posts:


ActionScript 3.0 :: Rotation Troubleshoot: Where Is 270 Degrees?

Oct 19, 2010

I am rotating an object by incrementing in 90 degrees,however after 180degrees it rotates to -90...then it can't quite make it's mind up if it should go to -180, or 0, which should be the same thing? (except it messes up my if statements down the line)(by that I mean, sometimes it will go back to 0, and sometimes it will switch to -180??)Where is 270, and for that case, 360?

View 2 Replies

ActionScript 2.0 :: Quick Troubleshoot: Preloader With External MP3?

Apr 27, 2005

I had a preloader that would load in some external SWF's... and now decided to also preload a sound I am importing using aSoundObject.load(). This is how I added the sound to the preloader:

Code:
mySound = new Sound();
mySound.loadSound("som/fundo.mp3", false);
bytes = myExternalSwfContainer.getBytesTotal() + mySound.getBytesTotal();
loadedBytes = myExternalSwfContainer.getBytesLoaded() + mySound.getBytesLoaded();

For some reason, whenever the preloader starts now... it'll start something around 70%, so I traced the loadedBytes and found out that it thinks its already loaded about 100Kb on the first loop through (even though it hasn't). So then, the preloader reaches 100%, calls the site, and the sound isn`t even loaded in completely yet.

View 4 Replies

Flash :: Crashed After 8 Ours Of Work On A Routine Thing?

Jun 17, 2011

Worked on a project for 8 hours. I should have saved it, but the abobe stuff seemed to be bullet proof. I pressed the up arrow and poof gone.
 
Why is there not some sort of auto save for when it crashes? such a simple task you completely forgot. I guess now I have to save non stop to use your product. I don't want to sit there and mash that crap all day long. Another thing why does cutting and pasting frames from another file always put it in random spot? then when you go to move it, you have one messed up animation. When you click on a layer, you see the motion in the little colored line, and then the actual pic. When you select more then 1 layer it only picks one of the dotted lines, but it proceeds to copy incorectly. 
 
BTW why restrict underscores in screen names? WHY? I can't come up with any good reason.

View 3 Replies

Flash :: Hardware Access Service Routine

May 29, 2010

Is it possible to access Hardware service routine using flash?

View 2 Replies

Actionscript 3 :: Implement Swapping Routine In Similar To C++ Std?

Mar 31, 2011

Is it possible to implement swapping routine in ActionScript 3.0 similar to C++ std::swap?I mean something like

[Code]...

It doesn't work "as is" for integers because they're passed by value, not ref into the Swap routine.

View 3 Replies

ActionScript 3.0 :: Iterative Image Loading Routine?

Jan 11, 2011

I'm working on an image gallery project that uses 45 jpgs that need to be displayed all at about the same time (like a splash of photos).Everything works except for inconsistent display of the loaded images (it works consistently on localhost but not on the remote server).All of the images successfully preload into the cache, but when the routine that displays them starts, it sometimes fails to complete.I haven't been able to find anything unusual in the display code that would account for the failure.So I thought I would try to add a work-around (maybe a Timer) that would repeatedly run the display routine until it completed successfully (sounds sloppy and hokey, but I'm at my wits end and way behind schedule).

View 2 Replies

ActionScript 3.0 :: Force Update During Processor Intensive Routine?

Apr 29, 2009

i have a swf with several processor intensive subroutines within a main init() routine at start up (about a 5 secs startup wait). it needs a preloader not due to asset loads but to the processor intensive routines.i'm trying to create a preloader that will display progress as the routines complete but when i try to write text to text field as each subroutine completes either the textField.text is not updated or the text field display is not updated after each subroutine finishes.this prevents me from tracking the progress of the start up.

is there a way to force an update to the display list in the middle of a processor intensive routine? i believe flash is supposed to update after each frame but i'm not seeing this.also, the text field i'm displaying *before* this processor intensive routine *does* display when running locally but *does not* display before the routine when running online.not sure why.

View 21 Replies

Actionscript :: Convert The Following Java Binary Search Routine?

Dec 31, 2009

I am trying to convert the following java binary search routine to as3.I assume that 'compareTo' is a built in java method and that '>>>' s a type of bitwise operation.

package binary;

public class Finder {
public static int find( String[ ] keys, String target) {
int high = keys.length;[code]..........

View 3 Replies

ActionScript 2.0 :: Stuff - Drag And Drop (snap Into Place) Routine

Nov 4, 2003

I am using a drag n drop (snap into place) routine. MC1 is dragged onto mc2. I want a button on mc2 to make mc1 go to its original position and reset itself. As it is mc1 goes to frame 2 where the frame is empty.

View 1 Replies

ActionScript 2.0 :: Good Routine Fails To Work Inside Listener

Aug 29, 2006

I have a routine that dynamically loads photos into movie clips.However, when I put the routine inside a listener, it does not work.[code]Here is the exact same code inside a listener.I verified that the listener actually runs by placing a trace statement inside it.But no photos appear on the screen.[code]

View 3 Replies

Routine / Typical Route To Take When Adding Video To Banners But Also Keeping Under The File Size Limitations?

Apr 8, 2010

I've been doing a number of pretty basic flash banner ads at the typical advertising size (728x90, 300x250, etc.) but the client wants to throw in some video for this upcoming batch. I've already been given the .flv movie file. It's about a minute long at 3 mb, but I'm only going to use about 4 seconds of it. My question is what is the routine/typical route to take when adding video to banners but also keeping under the file size limitations (around 37k)? I did some brief research and read about progressive downloading but wasn't sure what the typical direction was when delivering files like this to the vendors.

View 2 Replies

ActionScript 3.0 :: Pencil Tool - Drawing Above A Image But The Drawing Is Below The Picture

Nov 9, 2010

i've tried to simulate a pencil tool, for drawing above a imagem, but the drawing is below the picture. How fix it?

[Code]....

View 3 Replies

ActionScript 3.0 :: Generate Drawing API Data From Drawing Object?

Jul 22, 2009

Basically I've got a reasonably complex drawing object in a fla and I want to reproduce it in a class definition using the drawing api. However obviously this is a tedious task, so is there some trick or automated method of doing this?

Last time I needed to do this it was a drawing of an arrow and I ended up writing down x,y,width,height values for everything but this one has curves in it which I don't have experience with drawing anyway.

View 2 Replies

ActionScript 2.0 :: Enabling Drawing Only When Drawing = True

Sep 28, 2009

I cannot get this to work. Without the "var drawing", "var drawing being true or false" and the "if statement", it works fine. But I need to add the "var drawing" so that you can only draw if you turn it on by pressing the "draw_btn" button. Note, I do not get an error, the script "apparently" contains no errors. Here is the code:

ActionScript Code:
var drawing = false
_root.createEmptyMovieClip("myLine", 0);

[Code].....

View 3 Replies

ActionScript 3.0 :: Drawing Over A Movieclip In A Custom Drawing App?

Jan 13, 2012

I've created a drawing tool which allows the user to draw on the canvas, the problem is that if I try to draw over a movieclip nothing happens. Is there a way I can allow for the user to draw over movieclips? For example if I had a background of paper?

Here's the code I'm using for it:

// This code is for drawing the lines on the page
//1.
var drawingLine:MovieClip = new MovieClip();
addChildAt(drawingLine,0);

[code]....

View 8 Replies

ActionScript 3.0 :: Drawing Api Drawing 40,000 Objects

Feb 18, 2009

I need to draw on stage about 40,000 4x4 squares each a different color. The color is determined by an xml file. I have this working in as2 and have converted it to as3 the problem is the amount of time it takes to draw is causing cs4 to time out. I have extended the script time out to 60 seconds. In cs3 as2 it would draw the squares in about 15 seconds. I was hoping as3 cs4 would improve performance but seems to be the opposite. I have tried several methods such as adding children and various drawing variations. the bellow seems to work the best, but is still causing flash to crash.

ActionScript Code:
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Shape;

[Code]...

View 9 Replies

Drawing During Run Time

Jul 23, 2009

Does anyone have the code for drawing lines (with smoothing) in an onMouseDown click event?

View 1 Replies

ActionScript 3.0 :: Drawing API To SWF?

Jul 10, 2009

I have an app that allows the user to draw and create temporal objects (sounds and animation).I want the user to be able to SAVE and PUBLISH their output as an SWF file they can download to their computer. I have no problem with the drawing and animation aspects, but I'm stumped on how to begin coding the output. Do I need to call some remote actions (JSFL) on the server to create the SWF? How would be the best way to pass the data?

View 2 Replies

IDE :: How To Create A Drawing Pad?

Mar 29, 2009

creating a drawing pad in Flash that will let a user (from my website) draw an image(also have different shapes and colors) then be able to click on "save". Now here's the tricky part, When a user clicks on save, I need it to be saved as a .jpeg file then have that image sent to my email for review

View 3 Replies

ActionScript 2.0 :: Using The Drawing API?

Jul 2, 2009

how to replicate the "add anchor point" tool using AS2? I have managed to use the API to draw a square with four anchor points, but am not sure how to add extra anchor points. What I want is that these extra anchor points are added when then user clicks on a line.[URL]

View 2 Replies

Drawing The Pythagoras Tree?

Feb 26, 2009

I want to program a program that draws a Pythagoras tree. The only programming language I know is C but I tried it in that language and it was horrible. Someone recommended Flash (AS3) to me so I am trying it in that now, but I only started yesterday so that's why I am posting this in the newbies forum. If this belongs in the math forum, then please move it there.

Anyway, I got to the point where I can draw the leftturning branch of the Pythagoras tree, but I don't know how to draw the other branches. The number of "houseshapes" a square with a rectangular triangle on top increases with every step according to the formula 1 x 2^(n-1) (First step is n=1). I created a function that draw this houseshape, called drawHouse() and it takes as its arguments the co-ordinate of the lower left corner of the square part of the house, the length of the side of the square part of the house and the current rotation angle. Rotation angles are always multiples of 45 for now, but I might try to expand it to other values later, but for now I hardcoded a lot of stuff that assumes the 'roof' of the house is a rectangular triangle.

how do I store the 2 new x and y co-ordinates that I can calculate after drawing the houseshape, for drawing the next houseshape, and how do I store the angles? Do I need 3 separate arrays for x, y and angle? And how do I then call the houseshape function for every x and y co-ordinate and angle in these arrays? Code is attached.

View 1 Replies

Animate The Drawing Of A Picture?

Jun 20, 2009

i'm trying to animate the drawing of a picture with my wacom tablet, but the only way that i know how is to start with the full drawing and erase frame-by-frame backwards, which takes a lot of time and can look choppy.

View 1 Replies

Sketch Drawing In Flash?

Feb 3, 2010

I am very new to flash and only know the basics, but would like to put together a flash animation similar to this website [url]...

View 3 Replies

ActionScript 3.0 :: Allow Vector Drawing In .swf??

Nov 29, 2011

I have seen flash games where the player can actually draw objects. Meaning they have like a pen cursor in the game, and they can just start creating vector art. I have a game in mind where it might be a cool feature to have the user draw a few things. I bet this is a heavy subject so I am not asking for every bit of code I'd need to create something like this, but I have searched quite a lot for anything remotely brushing on this subject and clearly I have no idea what I should be punching into google.

View 3 Replies

ActionScript 3.0 :: Way To Clear A Drawing

Mar 25, 2012

I have a project I am working on in which I would like to teach how to cash a scratch off card. I have made the scratch and made it so it will "scratch", however my masking technique seems to not be working how it should...

The idea is that the user would "scratch" the card and then hit "Next" after that it would load a new frame (Progress Bar would move) and then do what they need to on that frame, and so on.

However it would seem that Flash is keeping the users "drawing" and still allows them to draw after the first frame, which is not what I want.[code]...

View 1 Replies

ActionScript 3.0 :: Drawing API - Resize The Box ?

Apr 28, 2009

Just wana know if I have created a box or L shape box dynamically, how it can be resized through specific points.I have a project something like[url]... and when you select a Layout section it gives you points to modify the size of the box.

View 2 Replies

How To Tween Drawing Object

Aug 28, 2009

I've received a number of graphics from an Illustrator user - they imported as symbols containing drawing objects.   When I opened one of these symbols and tried to tween (fade out) the drawing object, I don't have the Alpha option.   I don't use Illustrator myself and I had to install CS4 so I'm not used to that either.

View 4 Replies

ActionScript 3.0 :: Drawing Gradients In 3 To 2?

Nov 21, 2009

how to change below code to as2.
  
var _loc_1:MovieClip;
//var _loc_2:Graphics;
var _loc_2:MovieClip;
var _loc_3:MovieClip;
var _loc_4:Matrix;

[code]...

View 1 Replies

Drawing Cartoons In Flash?

Dec 5, 2009

how to draw various things, cartoons in Flash.

View 2 Replies







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