Draw two borders around the image when needed.
Here's an example of a custom component with the rollOver/rollOut fx.; right-click to view source.
Disclaimer: I didn't clean this up real well; there are probably more efficient ways of doing this.
Heck yeah it does!
Thank you so much, it's perfect! I was able to take your code and combine it with mine, and joila!
Please post code, so others can benefit..
The link doesn't work anymore..
This code is long gone and so is my memory of it.
What are you trying to do, exactly?
Hello, First of all, thanks for the reply.
What i am trying to do is the following:
Drag drop an image onto a canvas. When the image is selected/active/dragged it shows a border of 1px so the user knows he is working with this particular image.
When i drag a second image on the canvas, all other images must lose its border and the one i'm working with must have a border.
The code for creating a border works, but the border stays on the image when i drag the second image.
Here some code;
Many thanx for your help..
Hi, I looked at the code and from what I can see, the problem is within your custom component. As you know, it is not updating the border color/width.
I couldn't tell you why, but I did notice a lot of brute force being applied to try and make it update. I would probably start from scratch and examine where and how the border color is being applied, and re-do those areas. You shouldn't have to call the createChildren() method each time you want to update the border color; I think that is a good place to start. Also, the nolines() method being called on all the components on the canvas upon each drop seems expensive. Sorry I couldn't be more helpful.