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?
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.
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);
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);
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.
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
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]
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.
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.
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.
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]...
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.
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.
I have a flash CS3 AS 2.0 that is composed of 7 layers. I am trying to draw on a specific layer but I can't figure out how.One layer is named Carm and this is where my button controls are;
[code]...
This works to draw a line but it looks like it is on a layer behind all of the others. How can I draw on differnet layers I guess is the question I have?
It looks to me like the easiest route in AS3 is to use a Shape/Sprite's Graphics property to draw these lines, clearing and re-drawing each time the stickman changes. But some of the newer Flash 10 stuff seems to suggest a closer functionality to 3D graphics where you can define points and lines/triangles and then move the points rather than recreating all from scratch each render. Is this the case?
How can I make sure I draw over (not under) mc's that are on the same layer as I'm drawing to?
I have attached several movieclips to "layer1", and now I'm using layer1.lineTo to draw several lines, but they all appear under the mc's. I need to draw over them, is there any way to do this without creating another layer on op of it?
I want to create an app for drawing polygons with a variable number of vertices, with the following requirements (very similar to a vector drawing program such as Adobe Illustrator):
-each click of the mouse on the stage sets a vertice (e.g. draws a small square or circle to mark the spot), which draws a line to (e.g. LineTo) the prior vertice, and so on, until the final click, if close enough to the first vertice, will complete and close the polygon
-each of the vertices of the completed polygon should be draggable with the mouse, so that that completed (or partially completed) polygon maintains its integrity while changing shape, that is, so the user can modify the polygon shape without having to redraw it. it's the second step I'm having the most difficulty with...in general terms, how would I implement this? Perhaps each vertice should be a draggable Sprite containing a small square or circle graphic?
[URL] This kind of `pulled down/up` effect, as soon as it loads the gray background kinda pulls/folds down this one also curves! also appears on some of the content boxes in the site, like a small strip at the bottom of the images when you click on partnership, adaptation and security.
I'm trying to get a better handle on creating dynamic content, so I made a little experimental Flash file to test out programming with more robust and portable code to accomplish it (). I have two functions, one creates rounded rectangles and the other regular rectangles. I'm planning on using the regular rectangle to hold an image (which it does), and the rounded rectangle as a mask to give the appearance of a rectangle with uh, rounded corners. I've run into a couple problems with this:
1. The mask doesn't apply to the image. The regular rectangle (pictureHolder_mc) will appear and the picture (a .JPG file) will load into it; the rounded rectangle (pictureHolderMask_mc) will even appear on top of the picture. But as soon as I use the setMask() method, the mask disappears and not in the cool applying-to-the-movie way.
2. Both the rounded rectangle function and regular rectangle function have parameters for X and Y coordinates that worked fine when I was testing without trying to load an image. As soon as I did, it'd put the image at (0,0) for some reason, even with 300 passed for X and 50 for Y.
3. I've set up an onRelease() function for the image-holding movieclip that calls a tweening function, just to test out functionality. It doesn't work so hot; the mouse doesn't even turn into the clicky button cursor when the movieclip's rolled over.
I am using the drawing API to create 2 red rectangles. The following loop *should* create 2 rectangles in movieclips (holder2, holder1). However, later in the timeline when I hide one of the movieclips nothing happens. I think the problem is using this.attribute to draw these rectangles.
Code: for (var i:Number = 2; i > 0; i--) { _root.createEmptyMovieClip("holder" + i, i); this.lineStyle(1,0,100); this.beginFill(0xFF0000,50);
This code below is from a tutorial on this site, what i want to do is create a drawing box within my movie, rather than having the whole background available to draw on like in this code, I want the user only to be able to draw on a small area of the movie. I am making an interactive movie where the user is allowed to graffiti on a wall, but the wall does not take up the whole scene, and there are other interactive elements in the scene that i don't want the user to be able to draw all over
// 1. SETTING THINGS _root.createEmptyMovieClip("line",1); // 2. EVENTS IN _ROOT: _root.onMouseDown = function(){
I'm in the process in making a little drawing board using flash Drawing API. Right now i have the lines drawn by using lineTo() but i was wondering if there is a way to erase portions of the line. I know i could just write over it with white but was thinking of a better way. maybe by change the alpha or using a mask something like that. Just wanted to know if anyone came across this before or have a theory that can give me some insight to solve this problem..