View Single Post
Old 11-26-2012, 02:11 PM   PM User | #1
NancyJ
Senior Coder

 
NancyJ's Avatar
 
Join Date: Feb 2005
Location: Bradford, UK
Posts: 3,162
Thanks: 19
Thanked 65 Times in 64 Posts
NancyJ will become famous soon enough
Adding and removing borders at runtime

I have a bunch of little coloured rectangles with 1px grey borders. The rectangles are movie clips inside a movie clip and they're created with actionscript so they don't have instance names but they do have their own class (which extends movie clip). Drawing them with a 1px border is fine but when they are clicked on I need them to have a 2px border (to highlight which has been selected) and all the others should just have a 1px border.
I thought the best way to do this would be to create a 2px border of the same size and then move it around to the position of the movie clip but when I trace this.x and this.y from within the onclick of the squares they return 0,0 ?

Any ideas?
__________________
http://www.hazelryan.co.uk

Last edited by NancyJ; 11-26-2012 at 02:35 PM..
NancyJ is offline   Reply With Quote