Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
New selection tools for download

New selection tools for download

2004-05-27       - By Till Schneidereit

 Back
Reply:     1     2     3     4     5     6  

hi patrick,

your "Select Inside"-tool is a godsend! great to finally be able to use such a
functionality..

i found one small bug in the mouseUp-function and implemented one improvement:

- when just clicking at one point without drawing a rectangle, the tool threw
an error because "r" was smaller than "l" and "b"
smaller than "t"

- holding the shift-key, it is now possible to select multiple parts, just like
with the standard Arrow-tool. I had to set your
constrain45-function to use the alt-key to do this, but i think it is better to
use the same key-modifiers as in the default tools.


the new mouseUp-function:

function mouseUp(){
  fl.drawingLayer.endDraw();
  var endPoint = fl.tools.penLoc;
  transformPoint(endPoint, fl.getDocumentDOM().viewMatrix);
  endPoint = fl.tools.snapPoint(endPoint);
  constrain45(startPoint, endPoint);
  endPoint = roundOff(endPoint);
  var w = endPoint.x - startPoint.x;
  var h = endPoint.y - startPoint.y;
 
  if(w < 0)
  {
    var l = endPoint.x + 0.095;
    var r = endPoint.x - w - 0.05;
  }
  else
  {
    var l = startPoint.x + 0.095;
    var r = startPoint.x + w -0.05;
  }
 
  if(h < 0)
  {
    var t = endPoint.y + 0.095;
    var b = endPoint.y - h -0.05;
  }
  else
  {
    var t = startPoint.y + 0.095;
    var b = startPoint.y + h -0.05;
  }
  if(r<l) r=l;
  if (b<t) b=t;
  //Select the region
  if (fl.tools.shiftIsDown){
    fl.getDocumentDOM().setSelectionRect({left:l, top:t, right:r, bottom:b},
false);
  }
  else {
    fl.getDocumentDOM().setSelectionRect({left:l, top:t, right:r, bottom:b});
  }
}

also, the first line of constrain45 should now be:
  if (fl.tools.altIsDown)


cheers and thanks again for this great tool,
till



__ ____ ____ ____ ____ ____ ____ ____ ____ ___
Till Schneidereit           Grosse Bleichen 34

phone ++49(0)40 41161823    20354 Hamburg
fax   ++49(0)40 41161829    germany
__ ____ ____ ____ ____ ____ ____ ____ ____ ___  

> -- --Original Message-- --
> From: Extendflash-bounces@(protected)
> [mailto:Extendflash-bounces@(protected)] On Behalf Of
> Patrick Mineault
> Sent: Thursday, May 27, 2004 2:17 AM
> To: Extending Flash
> Subject: [ExtendFlash] New selection tools for download
>
> Hi all,
>
> I've created two new selection tools that should prove
> useful. You can
> download them here:
>
> www.5etdemi.com/extend/pxSelectionTools.mxp
>
> The first tool selects inside figures (unlike the ordinaty
> arrow tool,
> which will move the shape you,re editing if you try to do
> that), and it
> snaps to pixels.
>
> The second tool selectes a line the width or height of the stroke's
> thickness, much like the similar tools in Photoshop.
>
> Please report bugs and feature requests,
>
> Thanks,
>
> Patrick Mineault
>
> __ ____ ____ ____ ____ ____ ____ ____ ____ ____
> Extendflash mailing list
> Extendflash@(protected)
> http://flashguru.co.uk/mailman/listinfo/extendflash_flashguru.co.uk
>


__ ____ ____ ____ ____ ____ ____ ____ ____ ____
Extendflash mailing list
Extendflash@(protected)
http://flashguru.co.uk/mailman/listinfo/extendflash_flashguru.co.uk