Small problem

  • solaris
  • Student
  • Student
  • User avatar
  • Joined: Oct 18, 2003
  • Posts: 83
  • Loc: NC
  • Status: Offline

Post February 22nd, 2007, 9:00 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 22nd, 2007, 9:00 am

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post February 22nd, 2007, 12:47 pm

replace with this: if (Sname.text != "")
-> quotation marks
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post February 23rd, 2007, 8:55 pm

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 48 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.