A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] help on creating website link

Hybrid View

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Posts
    9

    resolved [RESOLVED] help on creating website link

    Hi everyone,

    I use to make buttons to link to other pages of my site using getURL in Actionscript 2 how do I do it in Actionscript 3, here is my code and its not working. Any help would be very much appreciated. Thanks.

    homeBtn.addEventListener(MouseEvent.CLICK, fncHome);

    function fncHome(e:Event):void{
    trace("home");
    getURL("index.php");
    }

    Thanks,
    Literain

  2. #2
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    Try something like this:

    PHP Code:
    var urlTarget:URLRequest = new URLRequest("http://www.motors-san.com/");

    btn.addEventListener(MouseEvent.CLICKonClick);

    function 
    onClick(event:MouseEvent):void
    {
        
    navigateToURL(urlTarget"_self");

    btn si the instance name of your movie clip.



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


  3. #3
    Junior Member
    Join Date
    Aug 2007
    Posts
    9
    thanks again.its working. More power to you.

    Literain

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