dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Apr 2018
    Posts
    12

    What would be the AS2 equivalent of this AS3 Code ?

    https://www.kirupa.com/flash/hiding_..._some_time.htm

    Can anyone translate this in AS2 ?

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,863
    Please stand by, I've got the solution, but am getting an error trying to post it. Will post the code as soon as the issue's been resolved
    Last edited by Nig 13; 04-30-2018 at 10:29 AM.
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Senior Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    926
    ill make you an as2 > as3, as3 > as2 convertor application if you donate to my paypal

  4. #4
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,776
    Would love to see and test the convertor

  5. #5
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,863
    So, I was finally able to post the code here without being blocked by FlashKit, so I'm posting this for anyone still interested

    Here's the code in AS2, just paste it in your Frame Actions/Code:

    Code:
    var secondsToWait = 2; // only change this value
    var currentCount = 0;
    
    setInterval(HideMouseAfterWait, 1000);
    onMouseMove = ResetTimer;
    
    function ResetTimer(){
    	Mouse.show();
    	
    	currentCount = 0;
    }
    
    function HideMouseAfterWait(){
    	currentCount += 1000;
    	
    	if(currentCount == secondsToWait * 1000){
    		Mouse.hide();
    	}
    }
    I've also uploaded the file, in case you're interested: https://files.fm/f/7cgwrd9g
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

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