1120:Access of undefined property error
I'll try and be clear about my problem. I'm working on a site and have a MovieClip, named "form" on the main timeline that I want to play when a button is clicked. I keep getting this error and it's driving me crazy, I'm obiously missing something. The button instance name is "sub_btn". Below is my code , it's the subscription button code, but not quite sure what's up, I'm not an actionscript guru but am gaining a small understanding of it. If anyone can help that be awesome. Also I have a close button on that movie clip is there a simple close script I can attach. Thanks again.
Dt
stop();
import flash.events.MouseEvent;
var getHCSG:URLRequest = new URLRequest("http://www.houstonceliacs.org");
var twitter:URLRequest = new URLRequest("http://www.dggrafix.com/glutenfree/twitter.html");
// --- Page Button navigation --- \\
home_btn.addEventListener(MouseEvent.CLICK, hClick);
glutenfree_btn.addEventListener(MouseEvent.CLICK, gClick);
menu_btn.addEventListener(MouseEvent.CLICK, mClick);
restaurant_btn.addEventListener(MouseEvent.CLICK, rClick);
contact_btn.addEventListener(MouseEvent.CLICK, cClick);
function hClick(event:MouseEvent):void{
gotoAndPlay("home");
}
function gClick(event:MouseEvent):void{
gotoAndPlay("glutenfree");
}
function mClick(event:MouseEvent):void{
gotoAndPlay("menu");
}
function rClick(event:MouseEvent):void{
gotoAndPlay("restaurants");
}
function cClick(event:MouseEvent):void{
gotoAndPlay("contact");
}
// -- Get URL Button -- \\
supportgrp_btn.addEventListener(MouseEvent.CLICK, hcClick);
function hcClick(event:MouseEvent):void{
navigateToURL(getHCSG);
}
twitter_btn.addEventListener(MouseEvent.CLICK, tClick);
function tClick(event:MouseEvent):void{
navigateToURL(twitter);
}
// --- Subcribtion Button navigation --- \\
sub_btn.addEventListener(MouseEvent.CLICK, clClick);
function clClick(event:MouseEvent):void{
form.play();
}
