dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Button Help

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    9

    Button Help

    I have two buttons on my flash document. I am trying to link them to the other two webpages for my website. I am using actionscript 3.0, here is the script;

    var request:URLRequest = new URLRequest("http://www.seashellcrazy.com/gallery.html");
    h_gallery.addEventListener(MouseEvent.CLICK, linkClick);
    function linkClick(event:MouseEvent):void {navigateToURL(request);}

    var request:URLRequest = new URLRequest("http://www.seashellcrazy.com/contact.html");
    h_contact.addEventListener(MouseEvent.CLICK, linkclick1);
    function linkclick1(event:MouseEvent):void {navigateToURL(request);}

    I though keep getting an error saying "A conflict exists with definition request in name space internal." It only finds this error on the var request for the contact.html line. Could someone please help me on what I need to do.

    Thank you so much.

  2. #2
    Junior Member
    Join Date
    Aug 2010
    Posts
    12
    for starters you have 2 var's, each with the same name.
    try
    var request
    var request2

  3. #3
    Junior Member
    Join Date
    Jul 2010
    Posts
    9
    Well I gave that a shot and i set the gallery page to var request and the contact page to var request2, the gallery button goes to the gallery and the contact button goes to gallery too. In the actionscript the var request is blue for gallery, for the contact as the var is blue and the request2 is black.

  4. #4
    Junior Member
    Join Date
    Aug 2010
    Posts
    12
    did you change this line to include your new var?
    function linkclick1(event:MouseEvent):void {navigateToURL(request);}
    should be now
    function linkclick1(event:MouseEvent):void {navigateToURL(request2);}

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