[Extendflash] JSFL: Macromedia Request your Feedback [last call nag]

"Tore B. Jørgensen" tore.jorgensen at atlantia.no
Fri Nov 4 09:25:10 PST 2005


Ibis Fernandez wrote:

>3. Select and manipulate intems in a document based on x parameter... For
>example... To perform such things as, selecting strokes in a frame or
>document that is colored #FFCCEE and delete them, or select all items that
>are colored red and change to blue, or select all items located at X:27 and
>move to x:125... That could have such powerful applications.
>  
>
To some degree this is possible. It is possible to select everything, 
and then choose only the stuff you want to keep.
But since all strokes and filled areas are selected as one shape item, 
you can't select individual strokes easily.

Anyway, to filter the selection, you can do something like this.
D = fl.getDocumentDOM();
SEL = D.selection;
MSEL = new Array();
for (i=0;i<SEL.length;i++){
            if (SEL[i].whatever == whatever it is you want to keep){
                MSEL.push(SEL[i]);
            }
}
D.selectNone();
D.selection = MSEL;

I use this solution to select all the text elements.


More information about the Extendflash mailing list