Find the number of symbols on the stage

Hello

I'm trying to find out how much of symbols with a certain naming convention is on the scene. The name of these symbols are incremented by 1, if for example I have symbols "drag_1" & "drag_2" currently on the stage and I want to go back to how many symbols "drag_" is on the scene. This can change depending on how much of these symbols that the user adds to the scene.

I have included some pseudo-code below to help understand what I'm talking about!

for (var i = 0; i < 100; i ++) {}

If (SYMBOL_ON_STAGE = "drag_" + i) {}

number_of_symbols = number_of_symbols + 1

}

}

Thanks for any help!

You can use

var childSymbols = sym.getChildSymbols ();

var num = 0

for (var i = 0; i)<>

var reg = new RegExp(/Stage_drag_*/);

{if (Reg.test (childSymbols [i] .getSymbolElementNode (USER.USER)))}

NUM ++;

}

}

Alert (num);

Tags: Edge Animate

Similar Questions

  • Count the number of symbols on the stage

    It is possible to count the number of symbol on the composition and store it in a variable?

    symbolCount = 0;

    var childSymbols = sym.getChildSymbols (); for (var i = 0; i)

    symbolCount ++;

    Alert (symbolCount);

    Add to the compositionReady, loops through the child symbols and alerts and how they are.

  • How to find the serial number of 8300 Gs graphics card please help

    I try contact evga tech support but I need the number of graphic series of 8300 Gs registration card of finished products for support technique evga. My pc is a Dell inspiron 530 pc exalted pix to A crash, I'm sure that the screen's video card problem.  I do not turn off the pc and open the computer case and find the 8300 GS graphics still then the Pc card serial number works well. I have Service Tag any good help please

    Do you mean you bought an EVGA 8300 GS on your own or being the 8300 GS installed by Dell?  The serial number will be on the retail box or on a sticker on the map.  You need to open your side panel and look on top of the card to get the serial number if necessary.  If installed by Dell, most likely you don't have any collateral at this stage on the 530.

  • Find the number of days between the dates...

    Hi friends,

    I am new to this development of blackberry applications so I do not know how to find the number of days between two days. Y at - there any API is avilable otherwise we have to write our own code. In fact, I tried GregorianCalendar but I get error that cannot find the symbol but I already imported net.rim.device.api.util and package java.util also... Please give an idea how to solve this problem.

    with respect,

    s.Kumaran.

    Use DateField class instances to represent dates on the screen.

    And your code will be as follows:

    long date1 = date1DateField.getDate ();

    long date2 = date2DateField.getDate ();

  • I can't find the serial number

    Hi, I bought and downloaded Acrobat, but I can't find the serial number. It is not followed in the order confirmation, and I can't find it on my account, plans, and products...

    Hi, everything works now. It was as mistaken installation guide when its asked for the serial number.

    The thing that was at the front stage "Log in with your Adobe ID" where he was also the question "Isn't it your Adobe ID?"

    It was my ID and so I continued to the next step and came the serial number, but in fact I needed to choose 'Isn't your Adobe ID?' to get through...

    Confused, but it worked...

    Thank you all for your advice.

    / Sten

  • JSON content - click here to see another symbol on the stage

    Hello

    Thanks Zaxist, I have a code of work similar to that below:

    $.getJSON ("content.json",

    {function (Data)}

    for (var i = 0; i < data.length; i ++) {}

    var s = sym.createChildSymbol ('template', 'content');

    s.$("title").html (Data [i] .title);

    s.$("description").html (Data [i]. Description);

    s.$("Seira").html (Data [i]. Seira);

    s. $("imageholder") .css ({'background-image': "url ('" + data [i].) "}) (image_+_«_'_»)});

    .data s. $("imageholder") ("Great", data [i] .largeimage);

    s.. Click$ ("imageholder") ("click", Function {}

    sym.getComposition () .getStage ().$("finte").css ({'background-image': ' url ("+ .data ('l arge') $ (this) + ') '});

    });

    }

    });

    Now, I'm trying on the click function to show the display symbols on the stage, for example during the click on the first point, the red symbol will appear, so cliked the second element of the (previous symbols which appeared will be hidden) and the new blue symbol will appear. So on with all the other ellements with JSON files.

    I tried this on the code, but nothing:

    $.getJSON ("content.json",

    {function (Data)}

    for (var i = 0; i < data.length; i ++) {}

    var s = sym.createChildSymbol ('template', 'content');

    s.$("title").html (Data [i] .title);

    s.$("description").html (Data [i]. Description);

    s.$("Seira").html (Data [i]. Seira);

    s. $("imageholder") .css ({'background-image': "url ('" + data [i].) "}) (image_+_«_'_»)});

    .data s. $("imageholder") ("Great", data [i] .largeimage);

    s.. Click$ ("imageholder") ("click", Function {}

    sym.getComposition () .getStage ().$("finte").css ({'background-image': ' url ("+ .data ('l arge') $ (this) + ') '});

    If (data [i] = 3) {}

    sym.getComposition () .getStage ().$("red").show ();

    }

    else {}

    sym.getComposition () .getStage ().$("red").hide ();

    }

    If (data [i] = 5) {}

    sym.getComposition () .getStage ().$("blue").show ();

    }

    else {}

    sym.getComposition () .getStage ().$("blue").hide ();

    }

    });

    }

    });

    Could you help me?

    Thanks in advance!

    Well, if I have understood correctly, you want to check your image index, and the index was 3 or 5 show you a symbol appropriate for this...

    I want to tell you something before I tell you how you can do this:

    data [i] is your index of json files that return data from your json file not a number, and if your json file is something like this:

    [

    {"image": "images/toy - B.jpg",}

    "title": "1st Image."

    'Names': 'toy-B '.

    }

    ]

    (I'm looking for purpose of json that have index 0) means of data [0]

    Well in this address, we have an object, but no data! because it has not itself data say witch we want, so it just return a data unreadable (just object), so if we say

    Image Data [0] (now we have image data and this will return us Images/toy - B.jpg )

    so we cannot simply say that [i] data

    you need to do this way:

    .data s. $("imageholder") ("Great", data [i] .largeimage);

    s. $("imageholder") .data ('myIndex', i); We need another variable to save our index

    s.. Click$ ("imageholder") ("click", Function {}

    sym.getComposition () .getStage ().$("finte").css ({'background-image': "u rl (" + $(this).data('Large') + ")"});

    If ($(this) .data ("myIndex") == 3) {/ / read value right and check}

    sym.getComposi () .getStage ().$("blue").hide () ing;

    sym.getComposition () .getStage ().$("red").show ();

    }

    ElseIf ($(this) .data ("myIndex") == 5) {}

    sym.getComposi () .getStage ().$("red").hide () ing;

    sym.getComposition () .getStage ().$("blue").show ();

    }

    });

    }

    });

    also, you wrote your statement if and else in an improper way, learn the right way at the top for future use

    If you have any question do not hesitate to ask

    Zaxist



  • Find the channel number

    Hi guys/girls,

    I want to be able to find a number (a number) in a text string, I want ultimately do is crop the number off the chain to simply meet with a numeric value, the only problem is the string could be any length and the number starts not necessarily at any time from the last character

    I have elements on the stage named 'image0', 'textfield2', 'button500' etc, as you can see the prefix before the number is not fixed length, so I could not use substr and define an index, and because the number could be any number I could not put the index as a certain value before the end of the string. (IE it can return '500' or 'ld2' or "ge0" in the examples given before)

    I was looking for how to use IndexOf, but I don't really know how to make sure that there any number and non-specific

    can someone help me?

    Thank you

    To do this is using regular expressions.  In the example below, the string str has everything that is not a retired number.

    var str:String = "button500";
    var regex: RegExp = \D/g; matches anything that is not a digit
    var numStr:String = str.replace (regex, "");
    trace (numStr);

  • How can I find the number of pixels is in my photos of the ipad? I sell on ebay and they have new requirements for the photos. 500 pixels on the longest side. Is it possible to increase the pixels on already took pictures?

    How can I find the number of pixels is in my photos of the ipad? I sell on ebay and they have new requirements for the photos. 500 pixels on the longest side. Is it possible to increase the pixels on already took pictures?

    See if this application works for you > https://itunes.apple.com/us/app/image-size/id670766542?mt=8

  • Please tell me where to find the registration number of contract?

    What is the registration number and where to find the registration number of contract

    If there is a link to find our registration staff den please notify

    If you can't find the number that I myself could not because I got this Macbook from my college for my future course you should give AppleCare a call as once again, I myself did. They were able to confirm the serial number on my Macbook, take my personal information, register for my Macbook, and now I'm good to go! Then call AppleCare to get the situation sorted is definitely the way to go. I waited a minute to connect, but it's easy and fast after connection with someone to AppleCare and the guy was very, very friendly and courteous. Hope this helps! Have a nice day

  • How can I find the serial number of my iPhone?

    So earlier today, I lost my iPhone 4 (it probably slipped from my pocket while I was attending). So now that I have not the device or the box, I can not find my serial number. I did not back up on my mac so I can't check for the serial number on iTunes either. I didn't find my iPhone activated so I can't take all of the measures. I plugged my iPhone on my mac several times, but not for backups, so is it possible to find my serial number on my mac?

    PS: I can not contact my local cellular provider because it is saved under my mother (I'm 14) and I don't want her to know that I lost my phone.

    Thank you in advance!

    Your parents will find out later.  You just tell them.

    Why do you think the serial number?

    It would be on the box.

    Here are the ways to find the serial number:

    You can find the serial number or IMEI on your iPhone, iPad or iPod touch...

  • How to find the serial number of the processor in the MacBook pro s serial number? I have a dead MacBook that was given for service to a third party. I doubt that they have replaced the original parts. Help, please. Thank you

    How to find the serial number of the processor in the MacBook pro s serial number? I have a dead MacBook that was given for service to a third party. I doubt that they have replaced the original parts. Help, please. Thank you

    As far as I KNOW, the serial number of the MacBook does not have the serial number of the processor.

  • How can I find the number of entries on a Web site when you use 'find '?

    I press Ctrl + F, the "Find" option appears. I type in a text, the 'Search' tab does not show the number of entries. For Firefox 25.0.1, is it possible to find the number of entries using 'find '? This is really essential.

    Thanks for your help!

    Can I afford too, for future versions of FF, the number of entries found in a web page by using the Find must be indicated.

    I'm sure that you need an add-on for that. Maybe:

    https://addons.Mozilla.org/en-us/Firefox/addon/findbar-tweak/

  • Find the IMEI number

    Hello. IBought my IPhone of the Korea. I lost my Iphone 5. But I don't have the IMEI number. You can help me find my IMEI number

    iOS - how to find the serial number IMEI and MEID, CDN or ICCID number. It should also be on the box of origin in which it came. I hope you kept.

  • Where can I find the version number of the latest version of Firefox before downloading?

    I have to ask permission to download Firefox at work and he needs version number before granting approval. Texas regulators use Firefox and work does not allow microsoft to explore internet. I need Firefox to use the reports and models of agencies. The download Web site does not list the version number. Where can I find the version number of the latest version of Firefox before downloading?

    You can find the latest version of Firefox 20.0.x in all languages and for all systems operating here:

    If you put a download link, her you should see the version of Firefox in the pop-up at the bottom of the screen.

  • How do you find the number on a mid 2009 MacBook AIR

    How do you find the number on a mid 2009 MacBook AIR

    Serial number? Model number?

    https://support.Apple.com/en-us/HT201665

    https://support.Apple.com/en-us/HT201300

Maybe you are looking for