IDE :: CS4 Tutorial : Drawing Shapes In Flash?
Aug 24, 2010This thread is designed to help collect discussion on the Drawing Shapes in Flash tutorial.
View 1 RepliesThis thread is designed to help collect discussion on the Drawing Shapes in Flash tutorial.
View 1 RepliesOne thing that seems particularly easy to do in the Flash IDE but difficult to do with code is to outline an organic shape. In the IDE you can just use the inkbucket tool to draw a stroke around something. Using nothing but code it seems much trickier. One method I've seen is to add a glow filter to the shape in question and just mess with the strength. But what if i want to only show the outline?What I'd like to do is to collect all of the points that make up the edge of the shape and then just connect the dots. I've actually gotten so far as to collect all of the points with a quick and dirty edge detection script that I wrote. So now I have a Vector of all the points that makeup my shape. How do I connect them in the proper sequence so it actually looks like the original object?[code]
View 1 RepliesWhen you use Graphics object to draw very large shape(that does not fit in 10000x10000 pixels) stroke width may become much wider than value specified in lineStyle function.For now I have only two options:
1. When drawing line you can split it into several lines. However this trick does work only for drawing lines, polylines and polygons. There is no way to apply this to drawing circles and ellipses. Well, we can approximate circles via bezier curves, but this approach seems to be very inefficient.
2. Perform manual cliping. But this require manual implementation of different cliping techiniques, and I think ActionScript does not suit well for this sort of task. And again there is need to approximate visible parts of large circles.
I have one left panel in which there are different shapes like start,end connectors..... when i drag line image inside canvas i want to draw line/connector between two shapes how would i do it
View 1 RepliesI want to develop an image editing application in Flex 4. My initial requirement is to draw various shapes like Line, Rectablge, Triangle, Circle, Star etc in appication. I want to facilitate user to draw shapes using rubber banding like professional applications do.
All shapes would be vector and should look smooth in an size. So, can't use bitmap and scale them.
What are better methods to achieve this?
I have a code, that draws a horizontal line, then it turns into a slope, and at the end of the slope it draws a circle. Here's a code:
Code:
var xspeed:Number = 1; // defines increments for x of slope
var yspeed:Number = 2; // defines increments for y of slope
var hspeed:Number = 5; // horizontal line increments
[Code]....
Create document 800x700 and put this code into main timeline. Now test movie As you can see, everything works great. But there is a problem. The circle is being drawn at 0 degree angle. But I want the circle to match the angle of the slope, so it looks like the slope and the circle are both at the same angle.
I have 2 shapes drawn with the drawing api - the points are stored in an array like this...
private var shape_points : Array = [ [81,61],[81,46],[84,43],[84,0],[11,0],[0,5],[0,48],[69,48],[81,61 ] ];
Both shapes have the same number of points. I need to tween the points from one shape to the other using tweenlite/max or tweener.
If I want to draw the stroke of a square just using actionscripting, I can (i.e moveto()).That will just show the stroke of a square as soon as I play the .SWF file.Let's say I want to animate the drawing of the stroke of a square from one point to the next. This way when I play the .SWF file, it will show the square being made. How would I go about doing so?
View 2 RepliesI am building a diagramming tool using Adobe Flex 3. I am about to implement connector lines and I have a question.
Imagine I have 2 squares at random positions on the canvas. I need to draw an arrowed connector line between them. I need it to tend to the target square's center but end on its border.
How do I find out the exact points between which to draw the line?
I am simply trying to draw a rectangle inside of a panel using flex4. I am using spark instead of mx. It complains about addchild being replaced by addelement; however, addelement expects type ivisualcomponent. I think sprite should be of that type; however, it reports an error when trying to use the below code... I have tried a few different ways. I think I am missing something very basic about flex 4.
[Code]...
I have 2 shapes drawn with the drawing api - the points are stored in an array like this...
Code:
private var shape_points : Array = [ [81,61],[81,46],[84,43],[84,0],[11,0],[0,5],[0,48],[69,48],[81,61 ] ];
Both shapes have the same number of points. I need to tween the points from one shape to the other using tweenlite/max or tweener.
I have 2 shapes drawn with the drawing api - the points are stored in an array like this... Code: Select allprivate var shape_points : Array = [ [81,61],[81,46],[84,43],[84,0],[11,0],[0,5],[0,48],[69,48],[81,61 ] ]; Both shapes have the same number of points. I need to tween the points from one shape to the other using tweenlite/max or tweener.
View 1 Replies(MX2004)I have made a 'whiteboard', users can draw on it, change width of pen, clear it.
I need to:
1. allow users to add text as well as lines
2. allow them to add a circle or a square
3. clear last stroke/shape
4. save the drawing
5. email it or print it
I want to draw lines to make a region so that anything inside that region is deleted. The Case : You could say that there are many movieclips in stage but when I just selected by drawing circle or something even complex shape to it purposely then anything inside that shape is just gone.
View 3 RepliesI am in the process of learning AS 3 and Flash on my own and currently using the Actionscript 3.0 Adobe Classroom in a book CS4 version. Having a problem with the Lesson Adendum if anyone has done it. This lession requires you to create two buttons. They both draw shapes on the stage. When one is clicked, it draws Rectangles on the stage following the mouse movement. When the other is clicked, it draws Ellipses instead. The problem I am having is that it just draws rectangles and not ellipses when the 2nd button is clicked. Would be greatful if someone could tell me what i am doirng wrong. Here is the code that I have so far. Apologize for the commented out code, I left it in to show what I have tried:
[Code]...
I know Sprite.graphics is pretty easy to use, but I was wondering if there is any ready made libraries for drawing, resizing, moving, layering, etc.. of various display elements? Also, stuff like tool selection, maybe some effects, premade shapes. Anything you would recommend?
View 1 RepliesI am trying to work with this flash tutorial -[URL] So far it draws with a simple rounded line. I have been extending this application by making the drawing board bigger and other small things. I now want to be able to choose the line style. Currently it is rounded and I want to choose and draw with other shapes - square, forward slash (/), backward slash (). Is this possible? If so, could you explain how I could go about it?
View 1 RepliesI sent an email to pom regarding a tutorial that he wrote, but the email was bounced and he hasn't replied to my PM. I have followed both of pom's tutorials that involve experiments with perspective in Flash, but I have encountered a problem while attempting to duplicate a movie clip symbol in the second tutorial ([URL]). I have a single instance of the "ball" movie clip symbol appearing at random positions. However, I cannot seem to successfully duplicate the symbol instance at random positions using the loop that pom provided:
[Code]....
I have a question about shapes (i mean the flash.display.Shape class). Is it possible to import Shapes directly from the library as Shapes and not as Sprites/MovieClips? Shapes are supposed to be faster than MovieClips/Sprites, right? So why is it only possible to import MCs/Sprites from the library? I understand that generally shapes could be created solely by actionscript, but in my case the shape comprises of many points and is curved - so it's quite infeasible.
Is there maybe some sort of plugin to generate code that would draw the desired shape from a drawn shape in CS4? And a last one: Are there any benchmarks out there for performance comparison between sprites/mcs/shapes? How much performance do i loose by using a sprite instead of a shape?
I have built a catalog in flash that was orginally built in InDesign and exported but it has some small content that is hard to read for the elderly users viewing it and I would like to add a zoom feature or some type of magnifying glass.
View 1 RepliesI am looking for a tutorial called Senocular's 3D car race tutorial
View 1 Repliesoriginal: I really just need to figure out how to center the pictures. here is what I did I have modified the tutorial that I finished to have a bigger stage for bigger pictures. Everything is working properly but the pictures are displayed on the left side, I want to have them centered in the stage for the images, after clicking on the thumbnails, plus my images are different sizes as well. ranging from 200x410 to 744x410 but all are the same height of 410. i will post up what I am talking about at the end. I believe it is something within either the action script or the xml coding that allows the position of the image to be differently? please help here is what i am talking about[URL] Continued: Here is my coding in action script:
[Code]....
Is it possible? I can't figure out how to do it.
View 4 RepliesHow can I achieve complex text shapes like warp(text on path) effect in photoshop or Wordart in Microsoft Word in flash?
View 4 RepliesI'm looking for a method to import Photoshop shapes intro flash. I want to import them as vectors not bitmaps. Is it possible?
View 2 RepliesI have a flash website template, Fla File as well as all the source files etc, I have some questions if anyone would be kind enough to help. I am new to Fla files so not sure what to do.
There is some text I managed to edit ok, but others I could not, it appears as if they started as text and have been broken apart and made into a shape? when i click you can only highlight each letter, but not change them. There are two of these, one flies in from left, the other from right.
I am new in Graphics and Multimedia Programming and I use Adobe Flash CS5 Professional V11.0 to edit and create some short flash movies.I have an old flash movie which is created by older version of Flash (Macromedia Flash 10 or 8). This falsh movie needs modification because it has some typing errors.
I had a rendered Flash movie (.swf) that I converted to its original format (.fla) with its associated resources like Action - Button - Font - Frame - Image - Shape - Sprite using a Flash decompiler software.
I have edited the shapes which includes the errors by my flash software and save it using the available formats which are CS5 or CS4 which are only allowed in saving options.
I took copies of the old edited shapes and replaced them with new correct ones but when I publish the file to be in *.swf format or expert it to flash it did not work as they are not there at all.it may be a type mismatch but I downloaded and installed old flash software version (Macromedia Flash 8.0) to read and publish them but it gives file reading error and was unable to read or manipulate them at all.
I tried a program that replaces specific shape or all flash shapes but it did not see that also and it is used only with *.swf format.Is there any way to convert or treat shapes in flash as text ?
I searched the web for that but most results coming talks about Shape tweening and I did not find what I want.How I can change the mistakes in these flash shapes and leaving the other things as they are like the action script and the timeline used as I only want to replace these wrong shapes ?
I need to calculate the intersection between two shapes in flash / action script. The problem is I can't access the shape's nodes and segments, and their coordinates, so there's no way I can calculate this. Do you know a way?
edit: further explanation: I imported irregular polygons from an EPS file to a movieclip with shapes in it.The mathematical solution to the problem is trivial, but to do that, I need to access by AS code to the coordinates of the nodes that make up the polygons, which I tried with no success. That is what I'm trying to accomplish.
edit2: dismiss this question. It's not possible. The workaround I'm applying is to save the polygons in SVG and parse them to get a list of nodes. then will feed that list to flash to calculate the intersection and areas on runtime.
is it possible to give a shape...a bevel?.....I would like to have a shape tween with a filter...lets say i had a circle turn into a square...is there a way to have a filter on it the whole time?
View 1 RepliesHere's my basic issue: I have a movieclip, with several hundred shapes inside of it that I drew with the brush tool.
I want to convert each one of those shapes to a movieclip. I could individually select each one by hand, convert it to movieclip, and then have a massive library. That would be a hassle to do, and really difficult to manage going forward and making changes.
I'd rather do something like
Code:
for each (var curShape:Shape in myMC)
{
var newMC:MovieClip = new MovieClip
[Code]...
and then I could access them as MCs henceforth (for collision detection, mainly).
That code does not work though!
how to convert every individual shape inside a MovieClip into a MovieClip using AS3?