Results 1 to 4 of 4

Thread: Link to URL stopping snow effect

Hybrid View

  1. #1

    Link to URL stopping snow effect

    I urgently need help.

    I am using the downloaded snow effect from the following link.

    http://www.kirupa.com/developer/flas...s3_cs4_pg1.htm

    I want to add a link to the movie:

    I use this:

    Code:
    var link:URLRequest = new URLRequest (“www.myurl.com”);
    
    button_mc.addEventListener(MouseEvent.CLICK, gooo);
    
    function gooo(event:MouseEvent):void {
    
    navigateToURL(link);
    
    }
    But it stops the snow - and I'm not sure that the links work either.

    Can anyone help?

    Thanks in advance.

  2. #2
    keep in mind that you are adding code to button_mc and at least from a visual inspection I can't see the button so I presume you added it.

    What your doing should not stop the snow.

    Just for my personal curiosity can you try this instead:

    PHP Code:
    var link:URLRequest = new URLRequest ('www.google.com');

    button_mc.addEventListener(MouseEvent.CLICKgooo);

    function 
    gooo(event:MouseEvent):void {

    navigateToURL(link"_blank");


    the basic information on navigateToURL can be found here:
    http://help.adobe.com/en_US/AS3LCR/F...navigateToURL()
    Last edited by Shaedo; October 11th, 2010 at 09:46 AM.

  3. #3
    Thanks soooo much! That works perfectly.

    I can see what you have changed - but please can you tell me why it would make such a difference?

    Cheers

    Craig

    Quote Originally Posted by Shaedo View Post
    keep in mind that you are adding code to button_mc and at least from a visual inspection I can't see the button so I presume you added it.

    What your doing should not stop the snow.

    Just for my personal curiosity can you try this instead:

    PHP Code:
    var link:URLRequest = new URLRequest ('www.google.com');

    button_mc.addEventListener(MouseEvent.CLICKgooo);

    function 
    gooo(event:MouseEvent):void {

    navigateToURL(link"_blank");


    the basic information on navigateToURL can be found here:
    http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/net/package.html#navigateToURL()

  4. #4
    I think the key phrase from the live docs (link previously provided) is:
    "In the stand-alone player, you can either specify a new ("_blank") window or a named window. The other values don't apply."

    So my interpretation is that the default value (null) does not work in the stand-alone player (that's the one your testing your code in).

    Another way of putting this is that to run it in your compiler/stand-alone player you must have "_blank" as your second parameter/argument.
    Last edited by Shaedo; October 11th, 2010 at 12:28 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012