A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: simple gotoandstop help

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Posts
    11

    simple gotoandstop help

    ok i havent done flash in for ever, so im just now getting back into it, and ive forgoten so much...

    Code:
    stop();
    ball.onPress = function(){
    	ball._x = Math.random()*600;
    	ball._y = Math.random()*600;
    	ball._width = 25 + Math.floor(Math.random()*41);
    	ball._height = 25 + Math.floor(Math.random()*41);
    	hits++;
    }
    time = 5;
    clearInterval(idsetInterval());
    id = setInterval( function(){
         time--;
    },1000);
    if (time == 0){
    gotoAndStop("Scene 2", 1);
    }
    everything works, except the gotoandstop, once time hits 0, it goes into negitives, and it stays at the current frame. help please

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    try -
    PHP Code:
    id setIntervaltimeout1000);
    time 5;

    function 
    timeout(){
    time--;
    if (
    time == 0){
    gotoAndStop("frame_label");
    clearInterval(id);
    }; 

  3. #3
    Junior Member
    Join Date
    Feb 2008
    Posts
    11
    oright that worked, thanks

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