LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-31-2005, 12:33 AM
Mike Reynolds's Avatar
Mike Reynolds Mike Reynolds is offline
Registered User
 
Join Date: Jul 2005
Posts: 13
Rep Power: 0
Mike Reynolds is on a distinguished road
Soften Fill Edges makes shapes and I want to manipulate their color and alpha. Shapes can't have their color or alpha manipulated in ActionScript, but MovieClip symbols can, so I need to convert all of the shapes in the soften fill edges to movie clips.
Actionscript:
// On an empty stage with 1 frame only, I type a character, break it apart and
// do a Soften Fill Edges with parameters of 50, 50. Now I have 50 shapes in the
// only frame. This code should convert each shape to it's own symbol, but instead
// it puts all 50 shapes into a single symbol.

var elementArray = document.getTimeline().layers[0].frames[0].elements;
fl.trace(elementArray.length);

// This trace prints out ONE instead of fifty!!
// Thus the following code fails to put each shape into it's own symbol.

var nSym = 1;
var selectionArray = new Array;

for (var nElem = 0; nElem < elementArray.length; nElem++)
{
if (elementArray[nElem].elementType == "shape")
{
selectionArray[0] = elementArray[nElem];
fl.getDocumentDOM().selection = selectionArray;
document.convertToSymbol("movie clip", "d"+nSym, "center");
}
}

BTW, what is the comment command for JSFL? // doesn't do it.

Last edited by Scottae : 07-31-2005 at 06:42 AM Reason: Format with AS tags
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading with sound only played once but keeping hover over menu item sound intact Azdolfan Newbies 2 05-25-2010 03:18 PM
Help getting average/total time on site [PAUL FERRIE] Server Side 2 02-15-2008 03:26 PM
last item on submenu not working billystyx Actionscript 2.0 Components 3 06-09-2005 09:43 AM
Time code csaw Newbies 3 04-29-2005 01:44 AM
Time accuracy - need help for pilot research Maceo Flash MX 2004 27 12-03-2004 12:15 PM




All times are GMT. The time now is 11:53 PM.