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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drawing / hiding a line

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
US
I am using code to draw a line from one point to another when a button is released. Basically, this allows the user to drag the button and Flash will draw a line from the parent object to the button wherever the user places it. All I need to do is erase any previous lines that Flash created in the parent clip, so that there is only one line showing at any given time. Here is the code :

on(release) {
this.stopDrag();
thisPartner = String(this).toString();
thisPartner = thisPartner.substring(15, 16);
_global.partnerInfo(thisPartner);
_parent.lineStyle(1, 0x0000FF, 100);
_parent.moveTo(0, 0);
_parent.lineTo(this._x, this._y);
}

How can I remove the line I've created the next time the user releases the button? Do I have to place the line inside an empty movie clip and Create/Remove the clip everytime..? I was just hoping there was an easier way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top