mardi 28 février 2017

Adobe Animate Errors - Building a website with buttons, need assistance please! :)

I'm very new to coding/script and am working on building a website for a class I am enrolled in. I have read manuals, books and even google answers but can't seem to figure out some of the questions I have with Animate CC.

First question is: When building a website on Animate, I have created separate keyframes to represent the pages. Each page gets 1 keyframe. Buttons connect all the pages. If I want to add a motion or shape tween, how do I do so in only one frame?

Second Question: I am unable to connect all the pages with the following code I was given from class....


     function button1_clicked(e:MouseEvent):void{gotoAndStop("home"); }   

     function button2_clicked(e:MouseEvent):void{gotoAndStop("about"); }  

     function button3_clicked(e:MouseEvent):void{gotoAndStop("shop"); } 

     function button4_clicked(e:MouseEvent):void{gotoAndStop("cart"); }   

     function button5_clicked(e:MouseEvent):void{gotoAndStop("blog"); } 

     function button6_clicked(e:MouseEvent):void{gotoAndStop("contact"); } 

     button1.addEventListener(MouseEvent.CLICK, button1_clicked);
     button2.addEventListener(MouseEvent.CLICK, button2_clicked);
     button3.addEventListener(MouseEvent.CLICK, button3_clicked);
     button4.addEventListener(MouseEvent.CLICK, button4_clicked);
     button5.addEventListener(MouseEvent.CLICK, button5_clicked);
     button6.addEventListener(MouseEvent.CLICK, button6_clicked);

    function handleClick(pEvent:MouseEvent):void {
     var myFirstVariable=boxOne.text;
         boxTwo.text = " Thank you! We will respond to you within 48 hours." 
     myButton.addEventListener(MouseEvent.MOUSE_UP, handleClick);

Animate keeps giving me the error message of

"TypeError: Error #1009: Cannot access a property or method of a null object reference. at MyWebsite_fla::MainTimeline/frame1()"

and I'm unsure how to fix it.

Lastly, with that code all my buttons aren't seeming to work to connect the pages to one another.

Please, if anyone can help it would be GREATLY appreciated!!!! Thank you all so much.


Aucun commentaire:

Enregistrer un commentaire