Flash Question

Discussion in 'HTML & Website Design' started by calisonder, Oct 24, 2008.

  1. #1
    Hi, i'm using Flash CS3 and ActionScript 3.0

    I am linking from a button (instance name "RMDSite") in my flash movie to a separate html site.

    Here is my simple code


    var link:URLRequest = new URLRequest ("blahSite.html");
    RMDSite.addEventListener(MouseEvent.CLICK, gooo);
    function gooo(event:MouseEvent):void {
    navigateToURL(link);
    }


    It is on my actionscript layer above the button layer.

    AND IT WORKS. Problem is, when i use the same code on a different part of my flash movie and make a minor change


    var link:URLRequest = new URLRequest ("blahSite.html");
    RMDSite.addEventListener(MouseEvent.CLICK, gooo2);
    function gooo2(event:MouseEvent):void {
    navigateToURL(link);
    }



    I GET THIS ERROR: 1151: A conflict exists with definition link in namespace internal.
     
    calisonder, Oct 24, 2008 IP
  2. DylanM

    DylanM Active Member

    Messages:
    150
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #2
    try this it should work:


    this.stop();

    var linkBLAH:URLRequest = new URLRequest("blahSite.html");

    RMDSite.addEventListener(MouseEvent.CLICK, onClick);

    function onClick(event:MouseEvent):void
    {
    navigateToURL(linkBLAH);
    }
    RMDSite.buttonMode = true;
     
    DylanM, Oct 24, 2008 IP
  3. flatrox

    flatrox Banned

    Messages:
    520
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    send your query to kumbhdesign dot com and agileinfoways dot com, they help you
     
    flatrox, Oct 24, 2008 IP
  4. calisonder

    calisonder Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4


    sorry i'm ignorant when It comes to true programing languages, where whould i put the instance name in this code?
     
    calisonder, Oct 24, 2008 IP
  5. calisonder

    calisonder Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    nevermind i see : ) i'll let you know if it works.
     
    calisonder, Oct 24, 2008 IP
  6. calisonder

    calisonder Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    alright i get this error:
    1119: Access of possibly undefined property buttonMode through a reference with static type flash.display:SimpleButton.

    and it highlights the last line of the code????
     
    calisonder, Oct 24, 2008 IP
  7. calisonder

    calisonder Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    alright, i got the answer on another forum, thought i would share



    here is what i did:

    1. I changed "gooo" to "gooo2"

    2 I changed "link" to "link 2"

    var link2:URLRequest = new URLRequest ("Ross-Morph-Designs.html");
    RMDSite.addEventListener(MouseEvent.CLICK, gooo2);
    function gooo2(event:MouseEvent):void {
    navigateToURL(link2);
    }



    BEFORE I WAS JUST CHANGING "GOOO" TO GOOO2"
     
    calisonder, Oct 25, 2008 IP