A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Keep Counter from changing upon return?

  1. #1
    Here's the scenerio, I have a main page with a counter which uses frames. The user clicks to view a flash movie so I use GetURL with _top set to go to the movie URL. At the end of the movie there is a Return to main page button. When this button is clicked the counter changes when the main page is loaded back in using GetURL. Is there a way to make the counter NOT change upon the return from the movie page? Perhaps there is a URL command that just tells it to return to the previous page? Or do I need to deal with sending a CGI command to the counter script?

    Any help would be greatly appreciated!

  2. #2
    Last Ju-Jitsu Warrior
    Join Date
    Aug 2000
    Posts
    655
    Are you using your own script, or a given counter by a company like - thecounter.com?

    If you are using your own script, with visual basic, you can use the Session mode...

    Waiting for your replay...

  3. #3
    I'm using a counter supplied by my ISP.

  4. #4
    Last Ju-Jitsu Warrior
    Join Date
    Aug 2000
    Posts
    655
    I think there is another way. You make it that when going back, it'll start from the second frame with Javascript.

    But, why don't you make a seperate page and movie without the counter, that on turning back it goes there??

  5. #5
    Senior Member
    Join Date
    Jul 2000
    Location
    Manchester UK
    Posts
    259
    if you can get to the cgi-script (im assuming its cgi) and edit it - then you could add an extra if clause -

    if (x==1)
    {
    //add the counter script here but remove the
    //part that says $counter++; (or whatever the
    //variable is called that is the counter)
    }
    else
    {
    //add the unchanged counter script here
    }


    then, if you add on the end of the flash movie - when
    it uses the geturl to load the counter, add ?x=1 onto
    the end of the url call (eg: http://www.you.com/counter.cgi?x=1)

    that way, if x is set, the script knows that you are returning to it and that it should not increment the counter
    otherwise, x is not set and it will do what it normally does. If you cant get to your ISP's cgi counter script
    that you are using then it is very easy to find a cgi counter that you can edit.

    good luck
    flishkut

  6. #6
    Last Ju-Jitsu Warrior
    Join Date
    Aug 2000
    Posts
    655
    Flishkut, that is a good idea, but how will the Flash movie know when not to add the x=1?
    What about the CGI parsing the variables?

  7. #7
    Senior Member
    Join Date
    Jul 2000
    Location
    Manchester UK
    Posts
    259
    because the geturl in the flash movie is only loaded after the counter loaded on the main page - so the geturl should always add it.

    if im mistaken here then you could pass a variable to flash - and if that variable was set then add ?x=1, if
    not then dont.

    *shugs*

    goodluck

  8. #8
    Last Ju-Jitsu Warrior
    Join Date
    Aug 2000
    Posts
    655
    Now that's a great idea with no problems.

  9. #9
    Thnaks FlishKut! editing the cgi script and passing the variable is a great idea. You are absolutely right that the counter will alwysa be loaded before the movie is played!
    Thanks again!

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