Create a Shapes in Flash CS3:

satheesh

New Member
Messages
883
Reaction score
0
Points
0
Create a Shapes in Flash CS3:

This tutorial help you to Create a Shapes in Flash CS3 at run time.

Syntax:

var name:Shape=new Shape() //To create a variable.
name.graphics.beginFill(0); //Set Color to begin Fill
name.graphics.drawCircle(50,50,40); //Draw Circle
name.graphics.endFill(); //End Fill
addChild(sha); //Add this shape to Stage.

name
means User Defined name.
You want to Draw Rect: drawRect(2,2,95,95);
You want to Draw RouRect: drawRoundRect(25,25,50,50,10);

Example:
To Draw Circle:http://svprm.x10hosting.com/shapes/index.php?s=c
To Draw Rect:http://svprm.x10hosting.com/shapes/index.php?s=r
To Draw RouRect:http://svprm.x10hosting.com/shapes/index.php?s=rr

If you this Tutorial help you means give some rep or Credits.
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
could you explain what those coor. mean?
You want to Draw RouRect: drawRoundRect("25,25,50,50,10");
the part in quotes
 

satheesh

New Member
Messages
883
Reaction score
0
Points
0
Thanks.

@diabolo
This is function to create Rounded Rectangle.

ex:

var name:Shape=new Shape() //To create a variable.
name.graphics.beginFill(0); //Set Color to begin Fill
name.graphics.drawRoundRect(25,25,50,50,10);//to Draw Rounded Rectangle.
name.graphics.endFill(); //End Fill
addChild(sha); //Add this shape to Stage.

name means User Defined name.

Demo:http://svprm.x10hosting.com/shapes/index.php?s=rr
Edit:
Thanks.

@diabolo
This function to create a Rounded Rectangle.
 
Last edited:

Jesse

Active Member
Messages
1,360
Reaction score
0
Points
36
Woah! Nice Tutorial. This might help me in learning flash.
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
but what do those numbers mean, what if I wanted to create a rounded rect. with a 30px, rounded-corner..
I think you expand on what those numbers mean, like x, and y coord. maybe?
 

sunils

New Member
Messages
2,266
Reaction score
0
Points
0
you are surely a good flash guru. nice tutorial.
can you tell how to navigate to another frame automatically after some n seconds. is there a timer script to do this.
 

satheesh

New Member
Messages
883
Reaction score
0
Points
0
Syntax:

drawRect(x:Number, y:Number, width:Number, height:Number)
Draws a rectangle.

drawRoundRect(x:Number, y:Number, width:Number, height:Number, ellipseWidth:Number, ellipseHeight:Number)
Draws a rounded rectangle.

Now this help you.
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
thank you, this helps out alot
 
Top