|
-
if ... else ... bug?
Don't know if this is a bug or not.
If I set my if-else like this then my app not working:
_level0.btInfo.onPress = function() {
if ( _level0.msgLCD =! _level0.msgInfo){
var tmpMsg = _level0.msgLCD ;
_level0.msgLCD = _level0.msgInfo;
setInterval (function() {_level0.msgLCD = tmpMsg}, 5000);
} else {
trace ("same message")
}
};
but if I change to this, then it works
_level0.btInfo.onPress = function() {
if ( _level0.msgLCD == _level0.msgInfo){
trace ("same message")
} else {
var tmpMsg = _level0.msgLCD ;
_level0.msgLCD = _level0.msgInfo;
setInterval (function() {_level0.msgLCD = tmpMsg}, 5000);
}
};
is this a bug, or it's me ???
Still looking for a freelancer to work on my footer!
-
Hi RapidCarbon,
_level0.btInfo.onPress = function() {
if ( _level0.msgLCD != _level0.msgInfo){
var tmpMsg = _level0.msgLCD ;
_level0.msgLCD = _level0.msgInfo;
setInterval (function() {_level0.msgLCD = tmpMsg}, 5000);
} else {
trace ("same message")
}
};
U've put the != sign wrong, that's it.
Keep flasin'
Sam
Flash makes the Web go Round
-
thanks
I can't believe I overlook that
Still looking for a freelancer to work on my footer!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|