PDA

View Full Version : Scaling Bounding Box


iliketheska
03-17-2006, 04:20 AM
I'm making a custom scaler and I was wondering how to make the scaling bounding box appear? Do I have to create it all from scratch or is there a way to extend the existing scaling bounding box? I know how to scale a selection and all, but I'm new to this and making a GUI for real time scaling confounds me, hah. Thanks in advance!

krayzeebean
03-17-2006, 04:51 PM
I think fl.tools.activeTool.showTransformHandles(true); is what you're looking for.

iliketheska
03-17-2006, 08:48 PM
Thanks for the reply! I tried that (putting it in the configureTool function) put it didn't seem to do anything. Is there something I missed or is there something I have to call at mouseDown?
By the way, this is another very newbie ish question, but how do I make a tool select the fill and stroke of a shape with a double click? Right now I have this:
function mouseDblClk(){
// Full select
var tempPt = fl.tools.penLoc;
fl.getDocumentDOM().mouseDblClk({x:tempPt.x, y:tempPt.y}, false, true, true);
}
function mouseDown(){
// Select
var tempPt = fl.tools.penLoc;
fl.getDocumentDOM().mouseClick({x:tempPt.x, y:tempPt.y}, false, true);
}
But its not working.
Thanks again for the help!

krayzeebean
03-17-2006, 10:33 PM
function mouseDblClk() should actually be mouseDoubleClick().

I don't know why the transform handles aren't showing up though, I've just started to delve into custom tools myself so I'm not the expert just yet :)

androo_animator
03-21-2006, 04:53 PM
I believe the fl.tools object is ONLY for use with custom tools and is not the same as selecting the Free Transform tool with your mouse in the toolbar. I'm pretty sure that there is no way to choose or change tools using JSFL. (unless it is a custom tool).

You'll need to draw your own bouding box using the drawing object unfortunately.

I really hope Adobe strengthens JSFL so you can script tasks like changing between the line tool and pen tool for instance. Or other simple things like turning snapping on and off. It would be nice to be able to write a script you could execute at startup to set your enviornment up the way you want it when Flash opens.