Order of events?
Ok, I am trying to make a on click event. When ever the user touches the textPlay1.png it will hide this image and show textPlay2.png and then open a new window. textPlay1 and textPlay2 were suppose to be like a button mouseover. It just goes straight to the new window. I never see textPlay2 show up EVENTHOUGH it is before the window in order. I have noticed this on several occasions. How do I maintain the order of events in which they are coded? nesting?
textPlay1.addEventListener('click', function()
{
textPlay1.hide();
textPlay2.show();
win = Titanium.UI.createWindow({
url:'views/levels.js',
title:'Levels'});
win.open({fullscreen:true});
window.close();
});
2 Answers
-
can someone help me on this?
-
help me!