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




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.



Adobe > Flash General Discussion
Posted on: 11/08/2007 05:18:02 PM


View Complete Forum Thread with Replies

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

Can You Take A Shape Without A Stroke And Give It A Stroke?
I have some shapes that I'm exporting from Illustrator. In Flash, the stroke around the shape is not a stroke at all, but becomes its own shape. For simplicity's sake, I would like each shape to be a fill and a stroke, instead of two grouped fills. Is there any way to apply a stroke to the fill of the imported shape?

How To Put A Stroke On A Shape
Yeah, I know, it's not really an ActionScript problem. Just thought you guys might know.

If you have a basic shape on the stage, how do you add a stroke to the path? You know, so that it has a line around the outside.

I've tried lots of of things, so I'd love to know how or if you can do it.

Thanks!

Stroke On Custom Shape
I wanna make a custom shape with a stroke, is it possible?

Stroke Around Illustrator Shape
Hi,

I have imported a world map into flash from illustrator. The countries in the map dont have a stroke around them.

I select a country, break it apart but i cant seem to insert a stroke around the shape. There must be a way to do this !

Please help. Ill provide the file if necessary

Thanks

Dynamically Resize A Shape But Keep The Stroke Width The Same...HOW?
So I'm looking to use some of those nice tweening functions to resize a basic rectangle with a 3pt stroke (with something like an "easeOutBounce" effect). I'm currently using the excellent MC Tween functions.

What happens though, is when the rectangle resizes (getting scaled really...), the stroke naturally scales as well --- so if i resize 200%, the strokes visually appears as 6pt.

Is there any way to create a rectangle with a stroke (even if it's a separate object that simply appears to look like a stroke) and make it maintain the correct stroke width regardless of how much it's scaled?? I've seen this done in sites before but can't figure out how it's done. Is it just using 2 objects (larger object goes behind so it appears to look like a stroke?). Or is there a way to force a stroke to ALWAYS be a certain point size, regardless of how large the object to which it is attached is scaled? HELP!

Shape Tweening With A Dashed Line Stroke?
I have a simple shape tween set up. The shape has the same dashed line for a stroke on both keyframes, but when the animation is played, the dashed line turns solid during the shape tween.

Why doesn't the stroke style animate?

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

Drawing API Set Stroke Style?
Hi there,

Does anyone know how to set the stroke style for lines created with the movieclip.lineStyle function? For example to create dashed lines with the drawing API?

Drawing Board Help Brush Stroke, Eraser, Color
Hello, how's it going?

I'm stuck in a rut as I'm not an actionscripter. For one of my classes I have to create something "fun". So I am creating a drawing board. The question is, I have the ability to change the color, change a different brush stroke, but only stays black. But what I want it to do, is change the color of the brush stroke and still keep it that color until the user changes the color. The file is located here:

http://www.vekturlab.com/flash/vekturlabflash.fla

Thank you in advance!

P.S. I've searched the whole forum for a couple of days before I posted this.

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!

Adding A Stroke To Text
Is it possible to add a stoke to your text in flash MX?

Cheers

Scott

Adding Stroke To Text?
Is there any possible way to add a black stroke to the text in this .fla file so if it is placed on an image background, it can be seen?

http://www.flashkit.com/movies/Utili...9207/index.php

I've been trying to edit the movieclips, but I have no idea what to do as far as that. Any help would be greatly appreciated! Thank You!

Adding A Stroke To Text
Hi

Is it possible to add a stroke to text in flash 8?

I cant figure it out so i have had to create my text in photoshop (with the stroke) and bring that in to flash. Not the best way to do it!

Thanks for any help.

Julian

Adding A Stroke To Thumbnails
Hello All!

I am attempting to create the Image Scroller (from the tutorial) but am having difficulty prepping my images. The thumbnails I want to use are .JPG files and it seems that I am unable to add a stroke to them in the "Over" button state. How do I work around this?

In the tutorial it appears as though some of the images are definitely non-vector graphics and I am curious to know how the stroke was added to them. My feeling is that there is something simple I am overlooking, but no matter what I try I cannot add a stroke to my thumbnails... Please Help!

Adding Stroke To Dynamic Text
Anyone know how to add a stroke to dynamic text via actionscript only? The text does not need to remain dynamic, but the whole process has to happen with code.

Adding Stroke To Text In Flash CS4?
But I can't figure this out or find it anywhere.

How do you add/edit stoke on text in Flash CS4??

Thanks.

Adding Stroke To Emptymovie Clips
Hey everyone,

I have a thumbnail gallery that creates an empty movie clip and puts another movie clip inside of it to load thumb nail images into. What I am trying to do is add a Stroke around the first empty movie clip to give it a thin border. The first movie clip is 75x75 and the thumbs are centered in it at 70x70.

I haven't been able to find any info on dynamic strokes. It doesnt look like its an easy solution. anyone have any ideas or other solutions?

Adding Stroke To Text In Flash MX 2004?
Is there any possible way to add a black stroke to the text in this .fla file so if it is placed on an image background, it can be seen?

http://www.flashkit.com/movies/Utili...9207/index.php

I've been trying to edit the movieclips, but I have no idea what to do as far as that. Any help would be greatly appreciated! Thank You!

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

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

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

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@)

Drawing A Shape With A Fade From Color Til 0 Alpha
Hi

I was doing some assets loading and thought I would construct some bits of graphics myself, instead of using the ones laid out for me in photoshop.

The "new" drawing API is giving me a bit of trouble regarding fades/transparency.

I drew a simple square and using the gradient box I am trying to make that box fade from color to nothing, becoming completely transparent on the right edge and completely opaque on the left edge..

I have been fondling this script for 2 hours and cannot get it to behave as I wish to: (the above)


Code:
var gloss:Shape;

var fillType:String = GradientType.LINEAR;
var colors:Array = [0xFFFFFF, 0x000000];
var alphas:Array = [0.9, 0.1];
var ratios:Array = [0x00, 0xFF];
var matr:Matrix = new Matrix();

gloss = new Shape();
matr.createGradientBox(198, 36, (Math.PI/2)*-1, 0, 0);
var spreadMethod:String = SpreadMethod.PAD;
gloss.graphics.beginGradientFill(fillType, colors, alphas, ratios, matr, spreadMethod);
gloss.graphics.drawRoundRect(1, 1, 98, 28, 3, 3);
gloss.graphics.endFill();
I can only get it to fade from one color to another, not from one color to another with 0 alpha.

Is there a better way to go around this one.

Thanks

Using Drawing API Shape To Mask Another Movie Clip
I have a movieclip that contains code for an API drawing shape. I can use it to mask a movieclip containing an image but not a moviclip that contains a dynamic gradient. Does anyone know how to make this work?


Code:

// CREATE MASK SHAPE WITH DRAWING API
// create empty movieclip
createEmptyMovieClip("mc", 10);
// set total number of points
total = 10;
// set point & control-point coordinates
pt = [];
cp = [];
for (i=0; i<total; i++) {
pt[i] = {x:Math.random()*400, y:Math.random()*400};
cp[i] = {x:Math.random()*400, y:Math.random()*400};
}
// draw function
this.onEnterFrame = function() {
// clear the old drawing
// and draw a new one using
// the points & control-points
mc.clear();
mc.beginFill(0x0088B2, 100);
mc.moveTo(pt[0].x, pt[0].y);
for (var i = 1; i<total; i++) {
mc.curveTo(cp[i].x, cp[i].y, pt[i].x, pt[i].y);
}
mc.curveTo(cp[0].x, cp[0].y, pt[0].x, pt[0].y);
mc.endFill();
// set new positions
// for points & control-points
// and make sure they're inside stage
for (var i = 0; i<total; i++) {
pt[i].x += Math.random()*4-2;
if (pt[i].x<0) {
pt[i].x = 0;
} else if (pt[i].x>400) {
pt[i].x = 400;
}
pt[i].y += Math.random()*4-2;
if (pt[i].y<0) {
pt[i].y = 0;
} else if (pt[i].y>400) {
pt[i].y = 400;
}
cp[i].x += Math.random()*4-2;
if (cp[i].x<0) {
cp[i].x = 0;
} else if (cp[i].x>400) {
cp[i].x = 400;
}
cp[i].y += Math.random()*4-2;
if (cp[i].y<0) {
cp[i].y = 0;
} else if (cp[i].y>400) {
cp[i].y = 400;
}
}
};
// CREATE ANIMATED BACKGROUND
createEmptyMovieClip("background_mc", 1);
//trace(targetPath(_root.background_mc));
onEnterFrame = function () {
r1 = Math.sin(ra1 += .002)*50+51; //default for all: 127+128
g1 = Math.sin(ga1 += .004)*50+51;
b1 = Math.sin(ba1 += .006)*127+128;
r2 = Math.sin(ra2 += .001)*50+51;
g2 = Math.sin(ga2 += .003)*50+51;
b2 = Math.sin(ba2 += .005)*127+128;
col1 = r1 << 16 | g1 << 8 | b1;
col2 = r2 << 16 | g2 << 8 | b2;
matrix = {matrixType:"box", x:0, y:0, w:740, h:466, r:0};
with (background_mc) {
clear();
beginGradientFill("linear", [col1, col2], [100, 100], [0, 255], matrix);
lineTo(740, 0);
lineTo(740, 466);
lineTo(0, 466);
lineTo(0, 0);
endFill();
}
};
_root.background_mc._x=0;
_root.background_mc._y=0;
// SET MASKING - WORKS WITH CLIP CONTAINING IMAGE ONLY
//_root.image1.setMask(_root.mc);
_root.background_mc.setMask(_root.mc);

Flash Drawing: Fill A Drawn Shape
Hey guys, I'm not familiar with the flash drawing api at all so I've come here

I've got a simple thing that allows you to draw lines. So lets say I draw a triangle or random closed shape with the mouse. How can I fill that with a color or bitmap?

Mac OS X Dock-type Effect By Drawing A Shape
I'm looking to create an effect similar to how the dock grows in OS X when a user rolls over a particular area of a gradient. Basically, I'd like to draw a gradient on the bottom of the stage, then depending on where the user moves the mouse, the top path of the gradient bows out a bit to follow the mouse's x location.

Has anyone seen any sample code to create this type of effect or done anything similar? If not, can anyone help me get started?

Thanks!

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