Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




From Drawing API Shape To Shape Tween



I would like to take the shape I created with drawing api and shape tween it into a square via a tween. How is this done?

I have searched, but cannot find a howto for this.

Thanks!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 05-25-2004, 01:37 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Drawing Custom Shape, And Filling Shape
Hello Forum members,

I have not yet figured out how to fill a shape (not an oval or a rectangle) that I draw.

for example, I draw a triangle with the pen tool (or the pencil tool). I have a nice triangle now.
Three lines, etc.

How can I fill this new "shape" with a color? Witout using the brush or the pencil and drawing color in.

Thanks,

eholz1

Shape To Text Shape Tween Not Responding
I wanted to know if anyone has encountered this problem or can see that I'm doing something wrong. It really doesn't look too complex and I've also done it before with no issue. I'm only running 2gb of ram, but I've done this plenty of times with no latency and for some reason recently it just won't work. I'm using CS3 Pro, AS 3

Set up:
Draw a square in frame one
create a blank keyframe on say, frame 30
write some text on frame 30
shape tween the square into the text

Results:
If I tween the square to a single character-no problem
If I tween the square to a sentence slow tween on preview and publishing
If I tween 3 paragraphs it will bomb out and go into...not responding and I have to shut down the program

Any thoughts?

Shape Tween A Shape Into Text?
How do you do this. I want, for example. to make a simple square shape tween into the name, "Bryan". I fiddle with this, but it doesn't want to do it.

What needs to be done to get this to work.

Thanks
Bryan

Using Stop(); On A Shape Tween Of A Swapped Movie Clip Symbol Within A Motion Tween
Thanks a lot for your time. I'm new to actionscript, and language syntax and I never really got along to begin with so I appreciate any help in the matter.

Basically the title says it all - I made a motion tween in the main scene, made a movie clip symbol (to shape tween a gradient) and added a stop(); inside the gradient-tweened-symbol. I then swapped the movie clip symbol with the motion tween in the main scene, and got exactly the effect I wanted (the item moved, then tweened itself) but the stop(); seems to have no effect.

I know this looks like one of those "that idiot didn't google before posting" questions, but I've been looking for about a half hour with different permutations of stop, doesn't work, actionscript, and flash, and I haven't found anything that seems to target this problem specifically.

If you've got any idea what's going wrong, please feel free to respond or show me how to better seek help on my own. Thanks again.

Shape Drawing Api
Where exactle do I find the shape drawing api ? i.e. listing of methods etc

Drawing Shape
Hello,

Anyone know how to draw shape using ActionScript ? Like drawing rounded rectangle ... circle .... box

Thanks

Help With 'drawing' A Shape
Hi guys,
I started learning the basics of Flash a couple of years ago and have had a big 'gap' in my Flash knowledge in the last year or so and am really rusty now. I am trying to create an intro web animation which starts by effectively 'drawing' out a swirl shape. I have the finished swirl but how to I get Flash to 'draw' it? Do I have to use masks? Any help would be greatly appreciated.
luisack

Help Drawing A Shape
Hello...I want to draw a shape (circle, rectanlge), then position it somewhere y fill it with a color. I need it done with actionscript only. Is it posible??

than you very much

Shape Tween Like A Motion Tween, Using Guide Layer
How if possible, can i make a shape tween behave and follow a set path (like using a guide layer)while morhping/tweening?

So far it seems as each time i try it always goes in a straight line from a to b and in this case that's not what i'm after.

Drawing A Shape From A Txt File
I have a text file, which has X and Y coordinate values for a shape:

how can I place these X and Y values in an Array, then use this array to draw the shape? using actionscript

then turn this shape into a mc symbol

please help

Animation Of The Drawing Of A Shape
Could someone please offer some guidance, I am a fairly experienced flash user, however I have not been able to figure this out.

I am trying to animate the drawing of shapes
as an example: a circle, starting as a point that arcs out and around to finish as the whole circle shape

I have seen this and like it been done everywhere, is there a straightforward way of doing it via
animation & masking?
actionscript?

would appreciate any assistance or advice

Thanks!

Can't Break Apart My Drawing Shape
I'm following one of the tutorials in the beginners area and I'm having a time trying to figure out why my shape won't break apart...I just drew a simple thing with the pencil tool, on a new layer and made a keyframe and the "break apart" option is greyed out...can anyone help? No, it hasn't been made a symbol or anything like that...just a drawn shape.

Drawing Api Edit Shape
Hi,
I've looked around and haven't found anyting on this so i figured i'd ask. I'll explain what i'm trying to do first:

I want to import an image(containing a persons face) and then allow them to select points on oval shape that will be set to a mask(maybe 5 points?) that they can drag to make it so only their face is masked out.

I'm assuming i'd use the drawing api to do this. Is this correct and does anyone know if there are any tutorials out there that explain how to edit a shape in this fashion dynamiclly?

Thanks.
Paul

Drawing A Line From One Shape To Another
OOPS perhaps i should have posted this in the flex forum......I'm developing an application in Flex.

So I found out how to create shapes with the Drawing API. I also found out how to draw lines from a point (x1, y1) to a another (x2, y2).

I am going to try to explain this as easily as i can. I dynamically generate two triangles and add them to a canvas as follows:

var triangleHeight:uint = 100;
var triangle:Shape = new Shape();

// red triangle, starting at point 0, 0
triangle.graphics.beginFill(0xFF0000);
triangle.graphics.moveTo(triangleHeight/2, 0);
triangle.graphics.lineTo(triangleHeight, triangleHeight);
triangle.graphics.lineTo(0, triangleHeight);
triangle.graphics.lineTo(triangleHeight/2, 0);

// green triangle, starting at point 200, 0
triangle.graphics.beginFill(0x00FF00);
triangle.graphics.moveTo(200 + triangleHeight/2, 0);
triangle.graphics.lineTo(200 + triangleHeight, triangleHeight);
triangle.graphics.lineTo(200, triangleHeight);
triangle.graphics.lineTo(200 + triangleHeight/2, 0);

var uiWrapper:UIComponent = new UIComponent();
uiWrapper.addChild(triangle);
myCanvas.addChild(uiWrapper);

So one triagle is red then the one to its right is green. I can certainly connect both triangles by drawing a line between them like this:

triangle.graphics.lineStyle(1, 0xFF0000);
triangle.graphics.moveTo(50, 50);
triangle.graphics.lineTo(230, 50);

each triangle will have "drag and drop" functionality so heres is my question: how can I assign a point in each triangle so that the drawn line will be redrawn each time a triangle is moved? with the line drawing above that line is static. In toher words I need a dynamically drawn line that will adjust to the position of the triangles. Any ideas/tips/resources????? If lets say instead of triangles I used Button components is there a way to assing "connection points" to the buttons as well??? I would much rather use the buttons than the shapes but whatever gets me to the end....

Help!

Actionscript Shape Drawing...
With this following code I am drawing a box. Now, I would like to address the lines for each side of the box individually so that I can set their color individually. Any ideas?

PHP Code:



MainWindowClass.prototype.init = function() {
    // Create Color Object
    stage_mc_lineColor = (0x000000);
    stage_mc_fillColor = (0xCCCCCC);
    // Create Empty Movie Clips
    this.createEmptyMovieClip("stage_mc", 3);
    // Draw Box
    with (this.stage_mc) {
        lineStyle(.1, stage_mc_lineColor, 100);
        moveTo(-100, -100);
        beginFill(stage_mc_fillColor, 100);
        lineTo(100, -100);
        lineTo(100, 100);
        lineTo(-100, 100);
        lineTo(-100, -100);
        endFill();
              // Color lines individually...
    } 


Preloading In A Shape Or Drawing...
hello,

I was wondering how a preload such as this is done:

http://foxbox.tv/winx_microsite/fairies.php

you see how the have a outline of the charactors and fill it up with a preload?

I know they're using a masking technique, but what is involved here?

Custom Shape Drawing
Hey all,

Just wondering if it's possible to draw custom shapes in flash, ie: dragging out a rectangle in photoshop.

any good links or advice on how to accomplish this would be greatly appreciated.

Animating A Drawing API Shape
Drawing API examples always seem to be either really simple or really complex. I'm interested in doing something fairly simple (I think). I'd like to draw an abstract curved shape with the Drawing API and animate the shape of the object to slowly change over time. Nothing really dramatic. Kind of like a lava lamp, I suppose. I understand this is done with movie clip control points but I haven't seen any examples I can understand. I'm attaching a file showing an example of what I mean (done with manual tween in MX 2004). Thanks in advance for your help.

Closing Drawing API Shape
I've been making changes to an Ivan Dembicki "elastic line" sample file. I'd like to close off the shape with a curved line so that the shape doesn't have a hard edge to it. Right now the shape fill closes off the shape (the shape itself isn't closed). I've tried various things but failed miserably. Anyone know how to turn this into a closed, rounded shape? I'll attach my file but this is what Ivan's drawing API code looks like:


Code:
p.onEnterFrame = function() {
this.clear();
//this.lineStyle(3, 0xFF0000, 100);
this.lineStyle(1, 0x4827CF);
for (var i = 1; i<this.arrMC.length-1; i++) {
this.update.apply(this.arrMC[i]);
}
var e, s = this.arrMC[0];
this.beginFill(0x4827CF);
this.moveTo(s._x, s._y);
for (var i = 1; i<this.arrMC.length; i++) {
s = this.arrMC[i-1];
e = this.arrMC[i];
var mx = (s._x+e._x)/2;
var my = (s._y+e._y)/2;
this.curveTo(s._x, s._y, mx, my);
}
this.lineTo(e._x, e._y);
this.endFill();
};
I'm working in Flash MX 2004. Thanks for the help.

Drawing Board Within A Shape
Heya everyone,

I've been reading up on this drawing board AS and I can get it to work easily by itself, however I want to be placed within a shape and I'm not sure how to adapt to do so (e.g. A drawing board within a circle outline)

Drawing Board
http://www.kirupa.com/developer/acti...awingboard.htm

Any help would be really appreciated

Natushi12

Preloading In A Shape Or Drawing...
hello,

I was wondering how a preload such as this is done:

http://foxbox.tv/winx_microsite/fairies.php

you see how the have a outline of the charactors and fill it up with a preload?

I know they're using a masking technique, but what is involved here?

Drawing App That Recognises Shape
Hi,
im trying to make a small drawing app used to let people vote
so each item has a small drawing area next to it where people can draw a X or a √ (Tick)

so i was wondering if flash could do such a thing or if anyone has a other kind of solution

thanks

How Do You Go From A Shape To Text (and Vice Versa)using Shape Tweening?
How do you use tween a shape into text or text into a shape? Anybody know?

Drag Shape While Drawing Like Photoshop?
Is it possible to drag a shape while you are drawing it like in photoshop by holding down spacebar? I have not found a similar keyboard shortcut for flash. This would help me immensely. Please help! Thanks

[question]Is There A Way To Convert Drawing To Shape?
as above... i am currently drawing a bountry of a racing track for my car game. i realise my car unable to hit the bountry as i guess in order to detect the bountry, i need mc file need to contain shapes instead of normal drawing. is it possible to convert my drawing to shape?

[Q] Dynamic Shape Drawing Game
http://www.ferryhalim.com/orisinal/g3/floats.htm

This one puzzled me, how did he do the shape collisions?

Drawing A Shape Using Action Script...
how do you draw a shape using action script, eg...

you click in one place, then drag to another and let go, a circle appears between the two points

that kind of thing...


any help will be usefull

thanks

Converting A Shape Into A CS3 Drawing Object
Hello!

I've noticed that when I draw, say a square, in CS3, it becomes a "Drawing object" (like a symbol that doesn't appear in the library), instead of a pure shape like in Flash 8.

But let's say I break a drawing object down into a shape, how do I convert this shape back into a drawing object?

I like drawing objects, they're cool for simple shapes that I don't want in my library, and that I don't want to get distorted like pure shapes (despite being placed at integer positions) particularly in large documents.

Anybody know?

Thanks,
Kyrre

Adding A Stroke After Drawing A Shape?
I drew a circle on the stage using the oval tool and the stroke was set to none so it does not have one. I now want to add a stroke to it, so I select the entire oval by dragging over it and choosing black for the stroke color, though it will not apply the stroke to the shape. What am I doing wrong?

Thanks.

Drawing In MX - Confined To Shape (not Square)
Howdy

Another bump in the road for me.

I've found a similar thread to this but my problem's a little different.
I've never used the drawing function on Flash and I followed the fairly simple tute on it just recently.

Is there any way to confine the drawing area to a specific shape. Mine's a rectangluar shape that's rotated. You can download my FLA with the background image here > http://www.realchurch.com.au/my_draw.zip
I'd like to try and keep it confined to the notepad area.
Anyone know? I think it might be a hitTest thing with if/else. Not sure.

My other thing would be to just rotate the notepad so that it's straight.
Even still i'd like it confined to the area beginning with the corner of the notepad, not the corner of my movie.

Anyone got any thoughts?

Drawing In MX - Confined To Shape (not Square)
Howdy

Another bump in the road for me.

I've found a similar thread to this but my problem's a little different.
I've never used the drawing function on Flash and I followed the fairly simple tute on it just recently.

Is there any way to confine the drawing area to a specific shape. Mine's a rectangluar shape that's rotated. You can download my FLA with the background image here > http://www.realchurch.com.au/my_draw.zip
I'd like to try and keep it confined to the notepad area.
Anyone know? I think it might be a hitTest thing with if/else. Not sure.

My other thing would be to just rotate the notepad so that it's straight.
Even still i'd like it confined to the area beginning with the corner of the notepad, not the corner of my movie.

Anyone got any thoughts?

Converting A Shape Into A CS3 Drawing Object
Hello!

I've noticed that when I draw, say a square, in CS3, it becomes a "Drawing object" (like a symbol that doesn't appear in the library), instead of a pure shape like in Flash 8.

But let's say I break a drawing object down into a shape, how do I convert this shape back into a drawing object?

I like drawing objects, they're cool for simple shapes that I don't want in my library, and that I don't want to get distorted like pure shapes (despite being placed at integer positions) particularly in large documents.

Anybody know?

Thanks,
Kyrre

Drawing Gradientfill Shape Don't Work [as2]
Allright, i tried to draw a simple square shape with a gradient using an old s1 function. It didn't work. I check, with an exemple that macromedia give in flash mx 2004, what was wrong and nothing was wrong !!!!

This is the exemple code from macromedia give in the actionscript dictionary in flash mx 2004.

_root.createEmptyMovieClip( "grad", 1 );
with ( _root.grad )

{

colors = [ 0xFF0000, 0x0000FF ];
alphas = [ 100, 100 ];
ratios = [ 0, 0xFF ];
matrix = { matrixType:"box", x:100, y:100, w:200, h:200, r45/180)*Math.PI };
beginGradientFill( "linear", colors, alphas, ratios, matrix );
moveto(100,100);
lineto(100,300);
lineto(300,300);
lineto(300,100);
lineto(100,100);
endFill();
}

Nothing new, it's the same code in as2 then in as1. But it does'nt work.


What is the problem ?? Is 'Math.PI' the problem ?

any ideas, please share.

Drawing A Shape Behind An Existing Mask
Hi, I have a clip on my stage.

Their is only 1 layer in the shape.

On this layer is a shape which is a mask.

I am trying to place a dynamic fill behind this mask.
(so the dynamic shape is masked by the mask that is in that clip)

I cannot get it to function. I'm just using the draw command - but it keeps ignoring the mask? Any ideas>?

M@)

Diference Between Motion Tween And Shape Tween
What exactly is the difference between a motion tween and a shape tween?

What's The Best Way To Do A Motion Tween And A Shape Tween At The Same Time?
Hi all,

I'm having some difficulty doing this. I have tried motion tweening a movie clip containing a shape tween but it just doesn't look right. Anybody have any ideas?

Cheers

Do I Use A Shape Tween? Mask? Motion Tween?
How do I make this arrow grow into shape? I want it to slowly appear...but not fade in...

it's hard to explain...but here is the arrow, hopefully you will understand what I want...

I tried using a mask, but instead of revealing the arrow little by little, it dissapeared little by little...(basically the exact opposite)...

I also tried putting a white box over it & motion tweening the box to reveal the arrow...but that didn't look good...


any ideas?...suggestions?

thanks in advance...

What's The Difference Between A Shape Tween And A Motion Tween?
Hi!
I just wanted to ask that what is the difference between a shape tween and a motion tween???

Not to bother you.

please reply me back

[MX04] Shape Tween And Motion Tween
Why do Flash doesn't allow ungrouped objects into motion tween and symbols into shape tween?

Change From Motion Tween To Shape Tween
I am trying to have a motion tween of some text move on the page and then change into a shape (i.e, a shape tween). I can't seem to make this work. I put a keyframe at each end of the motion tween and that works fine. Then I add another keyframe, delete the text and replace it with my shape. Then I select just those frames and add the shape tween but nothing happens. How do I accomplish this successfully?

Thanks.

Shape Tween / Motion Tween Problem
I must be missing something very obvious.

I have created a movie that draws a box, fills in the box with color and then is supposed to have the menu swoop in from the right. Mind you this is for learnnig, not cosmetic appeal Why is it when I use tweens I get the dotted line versus a solid line in the time line?

If you take a peek at the FLA it is obvious what I am referring to. I must be using the tween function or symbols in an improper manner.

I have attached the FLA.
Any help appreciated.
Thanks,
Kerry
www.skurz.com

Shape Tween / Motion Tween Problem
I must be missing something very obvious.

I have created a movie that draws a box, fills in the box with color and then is supposed to have the menu swoop in from the right. Mind you this is for learnnig, not cosmetic appeal Why is it when I use tweens I get the dotted line versus a solid line in the time line?

If you take a peek at the FLA it is obvious what I am referring to. I must be using the tween function or symbols in an improper manner.

I have attached the FLA.
Any help appreciated.
Thanks,
Kerry
www.skurz.com

Shape Tween
Why whenever I use shape tween does Flash automatically assume that I want EVERY single line to merge? Here's what I did:

Drew an odd shape (kinda like a rectangle, only one side is slanted), filled it in with a different color that the lines, and group it together. I grouped it so I could resize the whole thing together with the Free Transform tool. In my first frame of my tween the shape is very small. During the tween, it doesn't expand, it just shows the border lines doing all sorts of weird things inside the middle and then forming the shape. I tried both distributive and angular to no avail.

It's worked before, but it doesn't seem to be today. Is there any way to tell Flash that I just want it to look like its being EXPANDED and to not collapse on itself to reform the shape?

Shape Tween
When I use the shape tween function I notice that the corners of my objects twist around in an undesirable way. Does anyone know what causes this and how I can prevent it?

Shape Tween?
Hi

I created a shape tween and i wan't it during the tween to brighten - on frame 15. What script do i need for it?

Thnx

Shape Tween, When Should It Be Used?
Every time I use shape tween it ends up looking bad.
Could someone give a example where shape tween looks good?
or is it a useless feature?
Thanks

Shape Tween
1.) I brush stroke in frame one.
2.) I hit F7 in frame 10
3.) I make a different brush stroke
4.) I make a motion tween between 1 and 10
5.) Going into the properties area, I set the tween to shape tween.

A.) The shape tween is dashed
B.) There is no shape tweening
C.) It used to work in Flash 5.

Shape Tween
Hello all,

I've been out of flash for while (since version 5) and I seem to remember there was a way to shape tween an object to make it grow along the path that you define. I'm trying to make a tree "grow" from the base to the branches but flash just wants to skip from point A to B and garble it inbetween. Is there a way to mark the "growth" path or am I just old and crazy?

Thanks in advance!

Shape Tween?
Can you help?

I have drawn in Flash a pipe with a U shape type bend and i would like to fill the pipe with water starting at one end to the other.

Evertime I try to do this the shape tween goes outside the outline of the pipe. I ve had a play with masks but am getting a bit stuck!

Does anyone know of a good way to do this or a similar tutorial?

Cheers

Jemes

Copyright © 2005-08 www.BigResource.com, All rights reserved