Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-31-2006, 12:02 AM   #1
juworld
Registered User
 
Join Date: Mar 2005
Posts: 44
Default jsfl for looping through a list of shapes

I am new to jsfl. I finally figured out how you can select all the shape objects on the stage with a given frame.

PHP Code:
 var elts tl.layers[tl.currentLayer].frames[0].elements;
    for (var 
0elts.lengthx++) {
          var 
elt elts[x];
          var 
type elt.instanceType;
          if(
type=="shape")
          {
            
//Selects all shape objects
           
          
}
          
     } 
However, this will select all the shape objects. Is it possible to write a loop to go through all the shape objects.

What I want to do is to write a loop that takes each shape make convert it into a MC.

Please advise,

Thanks in advance!

Justin
juworld is offline   Reply With Quote
Old 02-01-2006, 06:59 AM   #2
juworld
Registered User
 
Join Date: Mar 2005
Posts: 44
Default

k, I found a good way to get around it. Its by grouping the shapes together. Each grouped shape is treated as its own element. So, instead of checking for shapes, check whether or not the element is grouped.
juworld is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Major Problems trying to capture "click" event in List component ManinBlaq Components 11 01-30-2007 07:12 PM
CyanBlue's 5000th Post - Useful Threads List CyanBlue Projectors and CDs 104 02-25-2005 01:13 PM
JSFL Programmer NEEDED -- freelance proj. tim594 JSFL - Extending Flash 4 11-09-2004 09:51 AM
Macromedia Central CyanBlue ActionScript 1.0 (and below) 13 08-01-2003 09:05 PM


All times are GMT. The time now is 09:08 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.