A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: button and html url

  1. #1
    Member
    Join Date
    Nov 2002
    Posts
    68

    button and html url

    Hi,
    I have a button that is nested in 5 movies. When clicked it is supposed to get a page. It isn't. It does on its own. This is my code:

    on (rollOver, dragOver) {
    gotoAndPlay(2);
    }
    on (release, rollOut, dragOut) {
    gotoAndPlay(16);
    }
    on (release) {
    getURL("http://www.something.com");
    }

    I tired target blank and it doesn't work. What is the proper syntax?
    thanx

  2. #2
    lemon juice hurts your eyes florianvanthuyn's Avatar
    Join Date
    Jul 2005
    Location
    Merelbeke, Belgium
    Posts
    546
    It is correct, but I've seen a simmilar today or yesterday, try putting the on(release) action on top, it helped the other person ...
    If that's not the problem, maybe it's because you're using two times the on(release) action; put them together:
    Code:
    on (rollOver, dragOver) {
    gotoAndPlay(2);
    }
    on (release, rollOut, dragOut) {
    gotoAndPlay(16);
    getURL("http://www.something.com");
    }
    U can still use the ,"_blank" if you like, but it's normal that it doesn't change anything to your problem ...
    The only thing I think is strange, is that you a btn rollOut does the same action as the release function ... maybe this would be better:
    Code:
    on (rollOver, dragOver) {
    gotoAndPlay(2);
    }
    on (rollOut, dragOut) {
    gotoAndPlay(1);
    }
    on(release){
    gotoAndPlay(16);
    getURL("http://www.something.com");
    }
    Florian Vanthuyne

    WAR AGAINST SOLVED THREADS
    mark yours as Resolved under Thread Tools!

  3. #3
    Member
    Join Date
    Nov 2002
    Posts
    68
    Hi, I tried
    a few combinations and received an error when clicking the button stting: "Macromedia flash has stopped a potentially unsafe operation..."
    I've never seen this before. At any rate it still doesn't work.
    thanks

  4. #4
    Member
    Join Date
    Nov 2002
    Posts
    68
    never mind figured it out.
    thanx

  5. #5
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    code:

    on (rollOver, dragOver) {
    gotoAndPlay(2);
    }
    on (rollOut, dragOut) {
    gotoAndPlay(1);
    }
    on(release){
    gotoAndPlay(16);
    getURL("http://www.something.com", _blank);
    }


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