Small problem

  • solaris
  • Student
  • Student
  • User avatar
  • Posts: 83
  • Loc: NC

Post 3+ Months Ago

Working on a php / flash email form, and I have been successful so far. I am trying to get an arrow that is visible when a field has been filled, and not when its empty. For some reason, its doing exactly the opposite.

Heres my code:

Code: [ Select ]
p = new Object();
p.onKeyUp = function()
{
    if (Sname.text != '') {
        x1._visible = false;
    } else {
        x1._visible = true;
    }
}
Key.addListener(p);
  1. p = new Object();
  2. p.onKeyUp = function()
  3. {
  4.     if (Sname.text != '') {
  5.         x1._visible = false;
  6.     } else {
  7.         x1._visible = true;
  8.     }
  9. }
  10. Key.addListener(p);


It was working a few minutes ago, but now its not. >_< help

x1 being the arrow

Btw, I tried switching the true and false values to no avail -_-
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

replace with this: if (Sname.text != "")
-> quotation marks
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

you can do the same thing inside of a textfield.onChanged()...

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.