Making iStrobe Application Need JavaScript Coder Help!

Discussion in 'iPod touch' started by fr0z3nic3, Feb 26, 2008.

  1. fr0z3nic3

    fr0z3nic3 New Member

    Joined:
    Dec 16, 2007
    Messages:
    841
    Likes Received:
    25
    Ok, I'm making a Strobe Light application from Jiggy IDE I'm having a little trouble with this script I made..

    Code:
    <html><head>
    <title>Strobe</title>
    
    <script>
    <!-- If you're extremely unlucky, you may break your equipment, or worse, have a seizure -->
    function toggleBgColor()
    {
      bgColor = bgColor = '#ffffff' ? '#000000' : '#ffffff';
      setTimeout('toggleBgColor()', 75); //in milliseconds
    }
    </script>
    </head>
    
    <body onLoad='toggleBgColor();'>
    </body></html>
    Its giving me an error for line 10..
    Code:
      bgColor = bgColor = '#ffffff' ? '#000000' : '#ffffff';
    Can a JavaScript savvy person help me with this small issue?

    Please Register or Log in to view images

  2. Abcmsaj

    Abcmsaj Retired Moderator

    Joined:
    Jan 26, 2008
    Messages:
    5,501
    Likes Received:
    122
    Device:
    iPhone 6 Plus
    Is this going to be similar to the blinker app? :\
    I'm not sure what a strober is.

    Sorry.. Wish I understood JS.
  3. fr0z3nic3

    fr0z3nic3 New Member

    Joined:
    Dec 16, 2007
    Messages:
    841
    Likes Received:
    25
    A strobe light a high frequency.. I guess you could call it a blinker.. Lol
  4. FluxBox

    FluxBox New Member

    Joined:
    Dec 27, 2007
    Messages:
    737
    Likes Received:
    14
    Why are you trying to call that line anyways? You can do it much more efficiently than that, and I'm not doing it for you.
  5. fr0z3nic3

    fr0z3nic3 New Member

    Joined:
    Dec 16, 2007
    Messages:
    841
    Likes Received:
    25
    You do you mean I could make it much more efficient.. You mean add extra sh*t to it..? I'm just testing this out first..
  6. FluxBox

    FluxBox New Member

    Joined:
    Dec 27, 2007
    Messages:
    737
    Likes Received:
    14
    I don't mean "extra sh*t". I mean use a completely different command to call what you're saying.
  7. fr0z3nic3

    fr0z3nic3 New Member

    Joined:
    Dec 16, 2007
    Messages:
    841
    Likes Received:
    25
    Uh, ok.. Lol
  8. FluxBox

    FluxBox New Member

    Joined:
    Dec 27, 2007
    Messages:
    737
    Likes Received:
    14
    Code:
    {
    
      bgColor = '#ffffff' ? '#000000' : '#ffffff';
      setTimeout('toggleBgColor()', 75);
      
    };
    Why can't you just use that? You used a recursive bgColor=

    EDIT: Not sure how Jiggy works, but that works on a standard HTML page.
  9. fr0z3nic3

    fr0z3nic3 New Member

    Joined:
    Dec 16, 2007
    Messages:
    841
    Likes Received:
    25
    Yea, I think thats the problem Jiggy isn't like a standard HTML page..
  10. cantcatchme939

    cantcatchme939 New Member

    Joined:
    Dec 28, 2007
    Messages:
    534
    Likes Received:
    6
    Device:
    iPod touch
    I saw a web app a couple of weeks ago that was a strobe light. It wasn't very exciting.

Share This Page