Dynamic button change color on click and reset the unclicked buttons

Hi,
I have have 3 buttons created dynamically from JSON file.
When I click on any of them the color is changed to red. (this is good).
But when I am going to click another button the previous red that I have clicked earlier doesn't change to it's grey statement, except from the last button which is the only one that works (is changing between red and grey).
If for the JSON make variable for the index e.g.(0,1,2) is working, but I want to make it work without index it. I want to make it with symbol's attr.
here is the files if someone can give it a try.
Dropbox - hover.rar

At stageCreationComplete I have it as a function, but it doesn't work correct.
I want to know why.
The problem is that when I use getJSON, it creates the ChildSymbols and keeps in memory only the last record (index).
So, I believe that I need to count the indexes of the JSON files and store it perhaps.
What I mean.
My JSON structure:
  {     "title" : "Central",
        "category": "",
    "image": "images/thumbs/models/central.png",
    "large": "auto-2f-kent-large/0.png",
        "frame": "frames-large/0.png",
         "jsonf": "auto2fk.json"
  {     "title" : "Telescopic",
        "category": "",
    "image": "images/thumbs/models/telescopic.png",
    "large": "auto-2f-til-large/0.png",
        "frame": "frames-large/0.png",
         "jsonf": "auto2ft.json"
  {     "title" : "Glass",
        "category": "",
    "image": "images/thumbs/models/glass.png",
    "large": "auto-glass-large/0.png",
        "frame": "frames-large/0.png",
         "jsonf": "autoglass.json"
it has 3 index. And on ChildSymbol I give the attr as .attr("id", item.title);
If I make index.length it will give me 3 as number.
But if I make item.title.length it will count the letters of its Word, the result will be (7,10,5).
How Can I make it to count the word itself an give me 3 as a result?

Similar Messages

  • Command Click in edit changes color white balance and tint in edit

    Command Click in edit changes color white balance and tint in edit, what is happening?

    robwouds:
    Welcome to the Apple Discussions. Must be a hidden keyboard combination for temperature and tint. Not sure if the user can set different settings of each that the keystrokes will take you thru. Just hit the reset button in the Adjust pane to get it back to normal.
    Do you Twango?

  • My Macbook will not boot the operating system.  It just goes to a blue screen after the apple logo and the spinning wheel goes off.  I took the battery out and held the on/off button for five seconds and reset the PRAM.  I have the old mac os disk.

    My macbook will not boot.  It goes to a blue screen after the logo and wheel goes off.  I have taken the battery out and held the on/off button for five seconds and reset the PRAM.  I have the the original os disk but have not put it in for fear of losing un backed op data.
    Thanks
    Rich

    You won't lose any data unless you erase your hard drive.
    Put your install DVD into the optical drive and reboot. As soon as you hear the boot chime, hold down the "c"key on your keyboard (or the Option key until the Install Disk shows up). That will force your MacBook to boot from the install DVD in the optical drive.
    When it does start up, you'll see a panel asking you to choose your language. Choose your language and press the Return key on your keyboard once. It will then present you with an Installation window. Completely ignore this window and click on Utilities in the top menu and scroll down to Disk Utility and click it.When it comes up is your Hard Drive in the list on the left?
    If it is then click on the Mac OS partition of your hard drive in the left hand list. Then select the First Aid Tab and run Repair Disk. The Repair Disk button won't be available until you've selected the Mac OS partition on your hard drive. If that repairs any problems run it again until the green OK appears and then run Repair Permissions.

  • HT1918 ive changed my account details and pressed the done button the phone and also in i tunes keeps telling me to contact I tunes support ??

    ive changed my account details and pressed the done button the phone and also in i tunes keeps telling me to contact I tunes support ??

    Click here and ask the iTunes Store staff for assistance.
    (104672)

  • Why is my calendar not holding the correct color.  I have reset the color of a particular calendar posting and within second the color reverts to purple.

    Why is my calendar not holding the set color.  I have reset the color of a particular calendar and within seconds it reverts back to purple.  I am using ICloud on a calander linked to my IPhone and IPad.

    set them at icloud.com on a computer.  its a work around.  Peace, Clyde

  • TS3274 My Ipad has a black background now and everything is color faded after the latest software update?  I restored and reset the Ipad.  How can this be fixed?

    My Ipad has a black background now and everything is color faded after the latest software update?  I restored and reset the Ipad.  How can this be fixed?

    How much data is being backed-up from each Mac?  (see what's shown for Estimated size of full backup under the exclusions box in Time Machine Prefs > Options).
    Is there any other data on your Time Capsule, besides the backups?
    Most likely, there just isn't room.  Time Machine may be trying to do a very large (or full) backup of one or both Macs, and can't.  Since it won't ever delete the most recent backup, there has to be enough room for one full backup plus whatever it's trying to back up now, plus 20% (for workspace).
    Also see #C4 in Time Machine - Troubleshooting for more details.

  • My email preview pane is blank on my Air.  Not on my iPhone or my iPad.  Just the Air.  Started two days ago.  I didn't change anything.  I can double click and open the email.

    My email preview pane is blank on my Air.  Not on my iPhone or my iPad.  Just the Air.  Started two days ago.  I didn't change anything.  I can double click and open the email.

    Back up all data. Rebuild the mailbox.

  • How to change Topic's Icon and show the Print Button

    Hi, currently i'm using robohelp html version 8. I have spent quite some time to figure out how to change topic's Icon and show the Print Button in my project. Anyone can help me on this? Btw, i using MX(template) to generate the output with FlashHelp Pro.
    Below is the screenshot for clearer clarification:
    Thanks.

    We would have told you if there was.
    Sorry but a downside of FlashHelp is that your customising options are limited.
    See www.grainge.org for RoboHelp and Authoring tips
    Follow me @petergrainge

  • Im changing my apple id and reset password,but my iphone cannot active it??!!

    im changing my apple id and reset password,but my iphone cannot active it??!!

    Do you already changed your Apple-ID here yet?

  • Somebody has created an apple id using my gmail id. So I gave forgot password option and reset the password of the id. But for resetting the security questions, link is going to some other email id which is created by the other guy.How can I resolve this?

    When I tried to create and apple id using my gmail account i found that somebody has already created an apple id using my gmail id. So I gave forgot password option and reset the password of the id. But for resetting the security questions, link is going to some other email id which is created by the other guy. Now the problem is that the other guy also can reset my password and access my account.
    I contacted apple customer care and they are not ready to help me saying that I need to give information about the last device I logged in using this id. How can I give it when I did not create it?:) Also they are saying this account has been verified and that could happen only if someone has hacked my gmail account and verified the id using the link sent by apple.
    Later I did some experiments and found that this is a security flaw from apple. Somebody has created the id and never used it(I tried to loggin to icloud and it was saying this account was not used it any apple device). The account became verified when I reset the password.(This is a bug, account should be verified only when we click on the verification link sent by apple).
    The other mistake apple did is that they allotted my gmail account to someone before it's verified eventhough it cannot be used unless verified. Actually apple should allot the account id only after verifying the email address.
    Apple customer care is not ready to help and I am tired of fighting with them. Can any of you guys suggest any means of getting back my gmail id to use it as apple id?

    I don't think you're going to be able to. I would guess the other person used your address by accident, and when he found he couldn't access the account (because you'd changed the password) he abandoned it. Your GMail address is now locked to that account and even if it was changed you can't use it to create another.
    You already have an Apple ID, which you use to log in here; you can use that to create an iCloud account if that's what you are trying to do. If you want to create a different Apple ID just get another free address such as a Yahoo one.

  • How do you save changes made in iPhoto, and export the changed file.  It keeps reverting back to the original.

    How do you save changes made in iPhote, and export the changed picture file? When I select export, current format, it reverts to the original, wiping out all my work.

    Try trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder.
    (On 10.7 or later: Hold the option (or alt) key while clicking on the Go menu in Finder to access the User Library)
    (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    What's the plist file?
    For new users: Every application on your Mac has an accompanying plist file. It records certain User choices. For instance, in your favourite Word Processor it remembers your choice of Default Font, on your Web Browser is remembers things like your choice of Home Page. It even recalls what windows you had open last if your app allows you to pick up from where you left off last. The iPhoto plist file remembers things like the location of the Library, your choice of background colour, whether you are running a Referenced or Managed Library, what preferences you have for autosplitting events and so on. Trashing the plist file forces the app to generate a new one on the next launch, and this restores things to the Factory Defaults. Hence, if you've changed any of these things you'll need to reset them. If you haven't, then no bother. Trashing the plist file is Mac troubleshooting 101.

  • "I just updated the software on my iphone 4 and prior to updating I could double click and start the camera without logging in, now I can't.  How do I fix?

    I just updated the software on my iphone 4 and prior to updating I could double click and start the camera without logging in, now I can't.  How do I fix?

    Nothing to fix...things have changed...slide the camera icon up now..no more double tap.

  • I am pulling my hair out! I am using adobe indesign and just want to make a text box 'autofit text' as I change fonts a lot and want the font to automatically re-size as I change it. help help help please - I have latest version of indesign - thanks

    I am pulling my hair out! I am using adobe indesign and just want to make a text box 'autofit text' as I change fonts a lot and want the font to automatically re-size as I change it.
    Is it not possible to create a text box, fill it with dynamic (data driven) text, but make the font size either scale up or down automatically, so that the entire text box is filled? This is a feature in PrintShop Mail Pro called COPY FIT. but no such feature in Indesign??
    help help help please - I have latest version of indesign - thanks, DJ

    lol... it seems to work, but I have another huge problem!
    Apparently .CSV files cannot contain page breaks in the data! The data I am trying to merge is a 'letter', with paragraphs, line breaks, etc.,
    But, after data merging, it ignores page breaks and only merges the first paragraph of each letter. (sigh)
    Solution? Hopefully, an EASY solution. lol as we have thousands of records.
    Is there a third party indesign plugin that will allow .xml, or .xls data merge import??
    Thx,
    DJ

  • I purchased bioshock 2 on the app store on my macbook pro (running lion) and it shows 'an error has occured' every time I try to download the app. How do I install it properly, I have restarted my mac and reset the app on the debug menu?

    I purchased bioshock 2 on the app store on my macbook pro (running lion) and it shows 'an error has occured' every time I try to download the app. How do I install it properly, I have restarted my mac and reset the app on the debug menu?

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Select "/var/log/install.log" from the file list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar. Then select the messages from the last installation or update attempt, starting from the time when you initiated it. If you're not sure when that was, start over and note the time. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.

  • Why can't I adjust the scale of my text by clicking and dragging the corner boxes?

    Why can't I adjust the scale of my text by clicking and dragging the corner boxes? Why I have the text selected, all it does it let me highlight it to change font, size, etc, OR all I can do is move it throughout the artboard. Why can I click and drag the corner box to adjust?
    M

    It's because you have a paragraph text box and it doesn't automatically resize text. This way you can change the margins of the text without resizing it which is how paragraph text functions by default.
    I'm not seeing the new text paragraph/area indicator on your text box, which is what you get in Illustrator CC, so the only way to convert this text so you can resize it by dragging on the corners is to copy the text, deselect the text box, use the text tool to click once in another part of your document, and then paste the text. The text will then come into your document as one long line if you don't have hard returns in it, but after reflowing the text manually you'll be able to drag the corners to resize the text.
    I would recommend not going this route as any text you remove from the area type means that the rest of the text has to be manually adjusted to maintain correct margins. Instead just resize the bounds of the paragraph text and adjust the size of the font in the Character panel.

Maybe you are looking for

  • My iPod touch 4th gen is stuck in recovery mode with a broken 'lock' button.

    My iPod touch 4th generation is stuck in recovery mode with a black screen and I can't get it out. It has a broken lock button and I have tried everything to get it out of recovery mode. Every time I plug it into iTunes, it recognises my iPod and say

  • Where are the movies on my phone?

    Hi, I am trying to find and then delete video content from my phone. In iTunes I choose the "Info" tab for my phone and it lists video content of 348.5 MB. I can't find any video on the phone...where would I look for it? And, once I find it, how do I

  • Trying to concatenate 3 fields wiht commas and spaces

    I have some simple code below but my results are not what i would expect.    i tried using separated by spaces but then it put a space between my 1st field and the comma CONCATENATE TRAN_STRUCTURE-NACHN ','  '  ' TRAN_STRUCTURE-VORNA ' ' TRAN_STRUCTU

  • Por que mis imagenes pierden calidad al importarlas en muse

    Al colocar imagenes en mi proyecto en muse estas pierden calidad no importa el formato .png .jpeg ni tampoco la fuente ejemplo photoshop o flash, ayuda pues estoy tratando de colocar el logo de la empresa en todos los casos esta pixelado, En adobe mu

  • Comment fermer d'autres sessions d'utilisateur? pour l'installation de Maveriks

    une fenêtre apparaît lors de l'installation de Mavricks ..d'autres sessions utilisateurs sont ouverte. Elles doivent être fermée .. Comment procéder  à la fermeture de sessions et lesquelles?