This content has been marked as final. Show 8 replies
for clearing your dynamic mc you can use... your_mc = null;
Set movieclip to null to make the movieclip eligible for garbage collection.
Thank you for that, but I've tried that and I'm still getting "1120: Access of undefined property <clip name>."
The problem remains of the text field I need to show how many pixels have been drawn pixel by pixel. In AS 2.0 this worked perfectly:
What am I missing?
Getting very frustrated here. I thought maybe it would work if I used the Sprite stuff and spent ages working on a class that was all about the draggy thing that would display as the mouse was dragged, then set the sprites to null and draw the final line. Not working. Could someone please help?
see this... could help you...
Yes, thank you, I understand that code very well. What I don't understand is why my code, which is trying to do something different, doesn't work. It's all fine and dandy to have the bits and pieces all created at runtime and sitting there waiting to be dragged and double clicked to make them disappear, but it's quite a different matter to nest the creation of those bits and pieces inside an event and try to do something with them in a different event.
And still no one has told me why my code that should update a dynamic text field with the number of pixels being drawn won't work at all in the mouseMoveEvent.
But thank you for trying.
i dont know what you are trying to do...
but see this...
Ummm, thank you. I did have those two variables there already I just hadn't bothered to include them. I did say I was using the Adobe example to work it all out. What I'm trying to do, with no success in AS 3.0 despite having it working perfectly in AS 2.0 is draw a line constrained to the x axis. As the line is drawn I want there to be a temporary clip with markers at each end and a hairline between them that will stretch as the mouse is dragged across the picture in the scrollpane. When the mouse is released the tempporary line will disappear and the drawShape function will draw the final black or white line. Also as the mouse is dragged across the image in the scrollpane I need the textfield, pixel_tf, to dynamically update and show how many pixels there are as they're drawn. I then also want to have the clr_btn clear both the pixel counter text field and the final line in case the line was incorrect.
Thank you, I think I'm nearly there, but it's a lot harder to do in AS 3.0 than it was in AS 2.0.