dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Movie Clip Button: Cannot Play A Frame Label

  1. #1
    Junior Member
    Join Date
    Jun 2006
    Posts
    9

    Movie Clip Button: Cannot Play A Frame Label

    I am making a simple web site for a friend, and everything is running peachy keen up to now. But this web page is not only something my friend asked me to do, but a learning experiance for myself. My problem is as follows:

    The web page I created requires me to use a movie clip as a button, however I am not educated enouph to make the MC button able to play a specific frame label. However the script works when I place it in an ordinary, boring button. Here is the current script that doesn't work, and thank you for your time.

    on (release) {
    if (Proc = False) {
    if (CurrentSection != "Home") {
    }
    }
    gotoAndPlay("Home");
    }


    Edit: The MC button works when I make it go to an external web page through the gotourl thingy.

  2. #2
    Member
    Join Date
    Jun 2006
    Location
    Leeds UK
    Posts
    84
    on (release)
    {
    if (Proc == False)
    {
    if (CurrentSection != "Home")

    {
    gotoAndPlay("Home");
    }

    }

    }

    you forgot to put == in your condition("="means assign a value "==" compare vaule) I am not sure what CurrentSection does as well you might need to change it to _currentframe(you can't detect frame lable if this is what you are trying to do)
    Last edited by FlashSmashed; 06-29-2006 at 06:03 AM.

  3. #3
    Junior Member
    Join Date
    Jun 2006
    Posts
    9
    Thanks for your help, but it still doesnt work. The problem is that its a movie clip button, regular buttons work fine.

  4. #4
    Senior Member
    Join Date
    Nov 2005
    Location
    dante's inferno
    Posts
    904
    myButtonInstance.onRelease = function(){
    if (Proc == False){
    if (CurrentSection != "Home") {
    gotoAndPlay("Home");
    }
    }
    }

    give your movieclip an istance name, then change myButtonInstance to whatever you named your movieclip instance and use the code above.

    not sure, but it seem your code is not doing anything with the If statements, becuase the gotoAndPlay("Home"); statement is going to be run no matter what. it is located "outside" the if statements.

    on release will first check to see if proc = false, if it = true it iwll ignore the if staement and run "gotoAndPlay("Home");" if proc = false then it will go to your next if statement "if (CurrentSection != "Home")" if that is true, it will not do anything because there is no action in the brackets. then once outside the if statements it will run "gotoAndPlay("Home");"

    in Flashsmashed and My above code, if Proc == False it will then check if (CurrentSection != "Home")" if it is not home, the it will run "gotoAndPlay("Home");"
    if not, it will do nothing.

    hopefully, I didn't confuse you. it's hard to explain stuff in here



    IMS

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