SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member creativebee's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Help regarding Non repeating frames!!!

    Hi,

    I just wanna ask anyone help regarding a flash navigation

    the thing I need is that how to remove the repeated playing of the movie when we click it repeatedly..
    I want each button to play once that means only when clicking them from other area.If we are still in an area and we click the same area link button it automatically replays from the start as in the example how can I avoid this

    to know just keep clicking on the same button continuously you can see the movie being played again and again and ......


    for example check the following link :

    ***.tu-world.com/flash/flash_tutorial_07.php.***

    pls check the sample by adding www and .com

  2. #2
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try something like this:

    Code:
    var firstClick:Boolean=false;
    
    myBtn.onRelease=function(){
    if(firstClick==false){
    myMc.gotoAndPlay(1);
    firstClick=true;
    }
    }
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.

  3. #3
    SitePoint Member creativebee's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry pal
    this one doesnt seem to work for ME
    can you refer me some tutorials with this kind!!!

  4. #4
    SitePoint Guru krityx's Avatar
    Join Date
    Jan 2006
    Location
    Around
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the code jim posted should work. post your own code so we can see what's wrong


  5. #5
    SitePoint Member creativebee's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am sorry guys but I am a AS beginner so i donno much deeper

    hope to study much from here!

    anyway I have got the script like this !!!

    Code Actionscript:
    on(rollOver){
    	_root.wbtn.gotoAndPlay(2);
    }
    on(rollOut){
    	_root.wbtn.gotoAndPlay(16);
     
    }
    on(release)
    {
    	gotoAndPlay(30);
     
    }

    the thing is that I have got a rollover button that's "wbtn" and when releasing I need the frames to be navigated to 30, it goes well but the problem is when I click the same "wbtn" again and again the movie gets playing from frame 30 again as each time I press the "wbtn"...

    hope you guys understand that any way

    THANKS FOR THE REPLY !!!

  6. #6
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Since you have embedded your script on buttons itself you can use the same method i have described above with a minor change:
    Code:
    On the main timeline declare a variable called firstClick:
    var firstClick:Boolean=false;
    
    Then in the embedded script add the following
    
    on(release){
    if(_root.firstClick != true){
    gotoAndPlay(30);
    _root.firstClick=true;
    }
    }
    Since you're a beginner in AS i must suggest using code on the timeline instead of embedding it inside a movie clip or button symbol like you have done. If you happen to delete the symbol you'll lose your script as well.
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.

  7. #7
    SitePoint Member creativebee's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for that .....

    It worked !!!!

    BUt I still have some doubts about it ...
    can you refer me some tutorials which has this kind of stuff in....

  8. #8
    SitePoint Member creativebee's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OOOOooooooooooooooooooopsss !!!

    sorry again it is working for only one time after that it stop I mean when i click for the first time its ok done!!
    but after that from the second click the link is like freezed its not working(link)!!



    I dont know wat to do....

  9. #9
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to toggle the value of firstClick between true and flase, whenever you click another button(s)
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.


Tags for this Thread

Bookmarks

Posting Permissions

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