Jump to content
xisto Community

srawr42

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Hello,I've made an image map in Flash using AS3, however it does not seem to be working properly.The links only work in a strange succession. In order to click all the links you must first click the last link followed by the first link, then the second link. After that the image map behaves as it is supposed to. I'm not sure why this is happening.It complies without error and aside from the little quirk mentioned above, it works beautifully.I've checked and double checked the AS, even copied and pasted some code from one button to another to see if it would make a difference, but to no avail.I am using the code listed below: button1.addEventListener(MouseEvent.CLICK, callLink1);function callLink1 (event: MouseEvent) :void { var url:String = ("https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl;); var request:URLRequest = new URLRequest (url); try { navigateToURL (request, "_parent"); } catch (e:Error) { trace ("Error occurred!");} Any and all help would be much appreciated, thank you!
  2. Hello,I have created an image map which links to various external pages. I'm not sure what went wrong but the links worked fine when I had just a couple buttons on the page, but once I added more I started getting the 1084 compiler error.I am using the following code: button1.addEventListener(MouseEvent.CLICK, callLink51);function callLink51 (event: MouseEvent) :void { var url:String = ("https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl;); var request:URLRequest = new URLRequest (url);try { navigateToURL (request, "_blank");} catch (e:Error) {trace ("Error occurred!");} Whenever I try to view the .flv I get around 42 errors saying the same thing."1084: Syntax error: expecting rightbrace before end of program."The location of the error is listed as "Scene 1, Layer 'button1', Frame 1"I have double checked all of my code, added right braces left and right, and even tried deleting the layer. Whichever layer is listed last becomes the source of the error, which is the same every time.Any and all help would be much appreciated. Thank you!
  3. Any help would be great. The current set of code I am using is below function callLink (event: MouseEvent) :void { var url:String = ("https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl;); var request:URLRequest = new URLRequest (url);try { navigateToURL (request, "_blank");} catch (e:Error) {trace ("Error occurred!");}} It is showing a 1120 error, but from what I understand, that's pretty vague. Thank you!
  4. Hello, I am making an image map with some odd shaped buttons that should link to external web pages. The link is recognized but it does not do anything. I have tried various sets of code from various online tutorials to no avail. Here are some of the things I've tried: and and I have switched between AS2 and AS3, but I can't seem to figure out how to do this in either of them. I'm not entirely sure what I'm doing wrong and any help or nudges in the right direction would be greatly appreciated. Thank you!
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.