dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: opening a website about a movie

  1. #1
    Senior Member
    Join Date
    Sep 2005
    Location
    Detroit
    Posts
    193

    opening a website about a movie

    I am having a bit of a difficultly with something. I have a panel that moves to a specific xtarget when a button is clicked. But after that I want a webpage to open. I know this should be a simple easy thing but my mind isn't grasping it right now. Any help would be greatly appreciated. Thanks, Kid C

  2. #2
    Moderator enpstudios's Avatar
    Join Date
    Jun 2001
    Location
    Tampa, Fl.
    Posts
    11,282
    in the last frame of the panel animation:

    getURL("http://www.yourdomain.com", _blank);

  3. #3
    Senior Member
    Join Date
    Sep 2005
    Location
    Detroit
    Posts
    193
    I wish it was that easy. Thanks for your reply I should have been more specific. The movie is a script so I don't have a last animation frame. In the script I could have an extra frame at the end but I want a different website to open depending on what button I am using. Here's the action script I am using in the script:
    <as>
    stop();
    baseRate = 8;</as>
    frame 5:<as>
    difference = _root.targetx - _root.panel._x;
    rate = difference / baseRate
    _root.panel._x += rate; </as>
    Frame 6:<as>
    gotoAndPlay("move");</as>
    And each button has a different xtarget like this:
    <as>on (release) {
    targetx = 460;
    script.gotoAndPlay("move");
    }</as>
    I was thinking about defining another variable in each button's script and then having another frame on the script that would open the site but I don't kow how to do that. Thanks for your help, Kid C

  4. #4
    _global.chosenson="flash"; chosenson's Avatar
    Join Date
    Jul 2002
    Location
    BIG APPLE
    Posts
    716
    You're on the right track.

    Assign a variable to pass location:
    var location1 = "";

    Then on the button add:
    location = "www.somewhere.com";

    then on the last frame added:
    getURL("http://"+location1, _blank);
    location = "";

    Something like this should solve your problem. You may have to tweak it a little.
    If you have a question, need some help, email me:chosenson

    It's always the simplest things that escape the complex mind!

    always be just

  5. #5
    _global.chosenson="flash"; chosenson's Avatar
    Join Date
    Jul 2002
    Location
    BIG APPLE
    Posts
    716
    Here is a small example of what I am referring to. I realize this will need work to fit your application, but it demonstrates the principals.
    Attached Files Attached Files
    If you have a question, need some help, email me:chosenson

    It's always the simplest things that escape the complex mind!

    always be just

  6. #6
    Senior Member
    Join Date
    Sep 2005
    Location
    Detroit
    Posts
    193
    Thanks for your help. It seems to be getting somewhere but I was working on it and I guess my tweaking isn't really doing the trick. I actually have managed to crach my computer as the script appears to loop and reopen the window over and over again. I put a stop into it and that didn't change anything. Maybe this is something I should bring up in the actionscript forum. Should I repost or will a moderator do that for me? Thanks again. I so happy this is finally getting somewhere, Kid C

  7. #7
    _global.chosenson="flash"; chosenson's Avatar
    Join Date
    Jul 2002
    Location
    BIG APPLE
    Posts
    716
    Any chance we could see the file? It would be much easier to find a solution that way.
    If you have a question, need some help, email me:chosenson

    It's always the simplest things that escape the complex mind!

    always be just

  8. #8
    Senior Member
    Join Date
    Sep 2005
    Location
    Detroit
    Posts
    193
    Yea that would be perfect for me. Thanks:
    http://www.mnjournal.com/menubutton.fla

    That has all the script incorporated that you recommended that still isn't working.

    Thanks again, Kid C

  9. #9
    _global.chosenson="flash"; chosenson's Avatar
    Join Date
    Jul 2002
    Location
    BIG APPLE
    Posts
    716
    Sorry. I need MX (ver. 6)
    If you have a question, need some help, email me:chosenson

    It's always the simplest things that escape the complex mind!

    always be just

  10. #10
    Senior Member
    Join Date
    Sep 2005
    Location
    Detroit
    Posts
    193
    opps sorry about that I forgot that I switched computers. Heres the MX (2004 i hope that's not an issue) form:
    http://www.mnjournal.com/menubuttonmx.fla

  11. #11
    _global.chosenson="flash"; chosenson's Avatar
    Join Date
    Jul 2002
    Location
    BIG APPLE
    Posts
    716
    Sorry, MX 04 is ver. 7.

    I'm an old timer. I use ver 6 - MX
    If you have a question, need some help, email me:chosenson

    It's always the simplest things that escape the complex mind!

    always be just

  12. #12
    Senior Member
    Join Date
    Sep 2005
    Location
    Detroit
    Posts
    193
    Well darn. Thanks for your time. You have been extremely helpful. Sorry you couldn't check it out. I can't save it any further back on this system sadly. Can anyone else help me out?

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