A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Weird Action after adding AS.

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702

    Weird Action after adding AS.

    I'm building a webform and something strange happened.

    It's a multipage form. I put navigation buttons in each page and at first everything seemed to work fine.

    I added a NEXT Button - used the options on release, goto next frame and that worked. The problem occurred when I added a previous button. In that button I did the obvious, on release, goto previous frame.

    Suddenly, the NEXT button has to be clicked multiple times before it responds and goes to the next frame. So, I thought it might be a problem with using the options and I hard coded the button.
    code:

    on(release){
    gotoandplay("nextframe");
    }


    Now, when I click the NEXT button it seems to skip over the entire form and loop back to the beginning. I have a stop movie action in each frame so I don't know why it's skipping frames.

    The form can be seen at http://www.nsfilms.com/km/webform.html
    The fun file http://www.nsfilms.com/km/webform.fun
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    Ok, I've updated the AS in the button action to (below) and now I'm back to the same problem I had before, I have to click the NEXT button 3 times before it responds. Not that this is a really big deal but I'm guessing the form users will think the form isn't working.
    code:

    on(release){
    nextFrame();
    }


    The updated form with the button issue is at http://www.nsfilms.com/km/webform2.html
    http://www.nsfilms.com/km/webform2.fun
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  3. #3
    Relaxing tmoore935's Avatar
    Join Date
    Oct 2001
    Location
    colorado, usa
    Posts
    1,713
    I changed what you have to

    On(release){
    gotoandplay("privacy_statement");
    }

    When you change this it changes the other next button. I believe it works to the way you want it now. You click on the next button, have a privacy statement, click the checkbox, then click next and the form appears.

    I looked in Colin Moock's book and can find nothing of "nextframe", but I could be wrong.
    Any programming language is at its best before it is implemented and used.

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    What the???

    How in the heck doesn't this possibly work? I changed it and it does work...(we'll see if it still works after I add another page) BUT how in the world could it possibly work?

    What I mean is, if I tell it to go to the privacy_statement page on release, why doesn't the next NEXT button cause it go loop back to privacy_statement page? It goes on to the next frame?

    I didn't even try this method because of this line of thought.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    What the???

    How in the heck does this possibly work? I changed it and it does work...(we'll see if it still works after I add another page) BUT how in the world could it possibly work?

    What I mean is, if I tell it to go to the privacy_statement page on release, why doesn't the next NEXT button cause it go loop back to privacy_statement page? It goes on to the next frame?

    I didn't even try this method because of this line of thought.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    LOL

    Yeah, now the next button works but the previous button doesn't go back to the previous page...it goes back to frame one. I'll try putting in the name of the first frame I need it to go back to, and see if the same theory works like it did with the NEXT button.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  7. #7
    Relaxing tmoore935's Avatar
    Join Date
    Oct 2001
    Location
    colorado, usa
    Posts
    1,713
    Try removing the tweens. I think this is why you have to hit the button four times to get to the page that you want. This is why I used labels. Bob H and necromanthus had to explain this to myself a couple of years ago. This is why i use labels now. (Though anything that I do is usally only a few keyframs).
    Any programming language is at its best before it is implemented and used.

  8. #8
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    nextFrame goes to the next tween. gotoAndPlay should be spelled like this because it won't work it you export as flash 7 or 8 the way you spelled it.

  9. #9
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    Thanks...guys.

    I set the tweens to 0 and then went back to
    on(release){
    nextFrame();
    }

    with success.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  10. #10
    Junior Member
    Join Date
    Dec 2005
    Posts
    21

    yessss

    is necessary to make a button play movie

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