A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: navigation url

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    3

    navigation url

    I am making a navigation system for a website using adobe flash CS3 professional, and I do not know how to create a url destination for each button using the actionscript.
    Any tips and help will be greatly appreciated.
    Thank you.

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    On the button:

    Actionscript Code:
    on(release){
        getURL("someotherpage.html", "_self");
    }

    - OR -

    On Frame:

    Actionscript Code:
    [HIGHLIGHT=Actionscript]btn_instance.onRelease = function(){
        getURL("someotherpage.html", "_self");
    }
    [/HIGHLIGHT]

    _self means that the new page will load in the same window as the current one (another value is _blank, which loads the new page in another window without affecting the current one)
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Junior Member
    Join Date
    May 2012
    Posts
    3
    Thank you. I do this, but instead of going to the url I type in, it goes to yourcompanyname.com Do you know if there is somewhere that I can change this setting?

  4. #4
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    What do you mean? Could you post the code attempt you tried?
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  5. #5
    Junior Member
    Join Date
    May 2012
    Posts
    3
    this is what is typed in
    onClipEvent (load) {
    getURL("index.html", "_self");
    }
    It now goes to the correct page, but it opens automatically before I am able to click the button.

  6. #6
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Because onClipEvent(load) is executed once your movieclip loads, and that is like instantaneously, so of course it will fire off at once. Try this instead:

    Actionscript Code:
    on(release){
        getURL("index.html", "_self");
    }
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

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