Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drawing a line in actionscript using a movie clip

Status
Not open for further replies.

mancroft

Programmer
Oct 26, 2002
267
GB
Drawing a line in actionscript using a movie clip

is it possible to take a small image file, turn it into a movie clip and then use that to draw a line?

I know how to use lineto to create a single color line and beginGradientFill to create a gradient color but can you use an image file to create a line?
 
not sure i know what you mean but if for example you had an image of a pencil i guess you could use that pencil to make it look like the pencil was drawing the line.


is that what you meant ?
 
No bill, what i mean refers to the fill of the line.

you can draw lines of one colour, or lines with a gradient fill but is it possible to draw more fancy lines using an image file of a speckled red or something presumably put into a movie clip?

 
never tried that so i dont know however wont you get the same effect by taking the movie clip and altering its dimensions to that of your line 100 x 2 or something.

if you made one very large image then you could possibly get rid of or minimise the scaling effect
 
bill, folowing works

button1.onRelease=function(){
for(hiThere=1;hiThere<8;hiThere++){
circle1.duplicateMovieClip(&quot;circleCopy&quot;+hiThere, hiThere);
_root[&quot;circleCopy&quot;+hiThere]._y=100;
_root[&quot;circleCopy&quot;+hiThere]._x=hiThere*circle1._width;
}
}
 
ok so you building the line bit by bit with i assume a bitmap fill in the movieclip
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top