A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Browser buttons for Flash!

  1. #1
    Junior Member
    Join Date
    Aug 2001
    Location
    Canada
    Posts
    25

    Browser buttons for Flash!

    Does anyone know how to actionscript buttons in flash that control browser functions such as back, forward, stop, refresh, etc.

    You can see what I am trying to accomplish at DinoWax.com on the main page (after the intro). I am making a navigation menu that spans the top of the browser window.
    _________________________________________
    Thanks,

    Grant

  2. #2
    Member
    Join Date
    Dec 2002
    Posts
    76
    THe solution is probably easier than you think, but not as simple as you hoped. Flash doesn't have intergraded controls for that. But your action code looks like this:

    Code:
    getURL("www.somepage.html")
    Then change it to use varibles. Varibles will give you control. Then you can access that particular line of code from almost anywhere. Instead use this:

    [code]
    // put this on your code for your refresh buttons

    getURL(varibleName) //i.e. 'thisPage'
    [code]

    [/u]How this helps you[/u] You want a refresh button, but that is just opening the page you're currently on, so when the page loads
    it changes the varible make that function work.
    For example this goes where the flash is embeded:

    Code:
    // Here
    
    PARAM NAME=movie VALUE="flash.swf?thisPage=www.thispage.html"> 
    
    
    //and here
    
    EMBED src="flash.swf?thisPage=www.thispage.html"..
    Now 'back' and 'forward' and done the same way just with two more varible names. You just have control where you store value of those varibles to get the button control effect that you want.


    hope that helps!

  3. #3
    Senior Member
    Join Date
    Jun 2001
    Location
    in the back room of a dark pub
    Posts
    454
    http://www.sbrady.com/hotsource/javascript/back.html

    this might work

    Code:
    getUrl("history.back()")
    getURL("history.forward()")
    getURL("location.reload()")
    ~bugged

    imageWeaver gallery
    microsite direct download

    "Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac."

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