Recently I started working with adobe flash pro, what is the essence of the problem: the fact is that I made a small banner with blocks of goods, each block has its own button with an assigned link, and blocks of goods changed when moving to the next frame (something like slider ), respectively, links also changed.
It would seem that on the first frame everything works well, but if you make links for the second frame, the compiler knocks me the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at NonameFlash_fla::MainTimeline/frame1() I hope for your help, I have been struggling for a whole hour with a problem, but to the point of 0.
Here is the code:
// Первый кадр function fl_ClickToGoToWebPage(event:MouseEvent):void { navigateToURL(new URLRequest("http://site"), "_blank"); } btnlink.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage); function fl_ClickToGoToWebPage_1(event:MouseEvent):void { navigateToURL(new URLRequest("http://site"), "_blank"); } btnlink1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_1); function fl_ClickToGoToWebPage_2(event:MouseEvent):void { navigateToURL(new URLRequest("http://site"), "_blank"); } btnlink2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_2); // Второй кадр function fl_ClickToGoToWebPage_3(event:MouseEvent):void { navigateToURL(new URLRequest("http://site"), "_blank"); } btnlink3.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_3); function fl_ClickToGoToWebPage_4(event:MouseEvent):void { navigateToURL(new URLRequest("http://site"), "_blank"); } btnlink4.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_4); function fl_ClickToGoToWebPage_5(event:MouseEvent):void { navigateToURL(new URLRequest("http://site"), "_blank"); } btnlink5.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_5); Clearly clumsily made. )