A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [F8] Something's not right with this button

  1. #1
    Senior Member
    Join Date
    Jul 2002
    Location
    Argentina
    Posts
    130

    [F8] Something's not right with this button

    Hello...My question comes from a very long code...maybe the problem isnt in the short and simple code im gonna show, but since i checked everything and this behaviour is very very strange and must come from the code im posting here, maybe u guys know what's the deal here.

    Code:
    Code:
    btnPicNext.onRelease = function() {
    	if (loadDataEnable == true) {
    		loadData();
    	} else {
    		loadSearchData();
    	}
    //IRRELEVANT CODE
    	enableSorry = false;
    	num1 = num1+2;
    	num2 = num2+2;
    	pageNum++;
    	loadPageNum();
    };
    btnNext ...when onRelease it displays information and a picture different depending on if loadDataEnable is TRUE or FALSE all data taken from PHP/MYSQL...

    This works great! but here's the catch...
    Notice that it goes to 2 different places: loadData() or loadSearchData() to load that information and picture i told before
    When its TRUE loadData() works perfectly...
    When its FALSE loadSearchData() ALSO works!! BUT... something really strange happens with the btnNext (or btnBack) when I click again onRelease (to display more/different information and picture)...if i leave the mouse in the same place/pixel nothing happens...if I move the mouse a little little bit, then the btnNext now works the code and loadSearchData() loads and works perfectly...

    So lets say i want to click a lot of times to view a lot of information (and the value is FALSE) i will have to move the mouse/cursor everytime i want to click btnNext because if not...nothing will happen...(if I do move it after every onRelease on btnNext, it works IF i dont move the mouse IT DOESNT!)

    ANY IDEAS??
    I would really appreciate some feedback on this one!
    Thanx for your reply in advance!
    Cheers,

  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Because it happens only with else statement, I would say it has something to do with loadSearchData function. Not sure but maybe button is somehow losing focus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center