473,503 Members | 1,685 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Variable Button is not defined?

74 New Member
I'm making a contact form, and I keep getting two errors when I try previewing it in a web browser.

ReferenceError: Error #1065: Variable Button is not defined.
ReferenceError: Error #1065: Variable ComponentShim is not defined.

I don't know what these errors mean. Can anyone give me an explanation? I am using Flash CS4 with ActionScript 3.0. If you need any more information, please let me know. Thanks.

The first function is for the contact button to go to the contact page. The code following is the code for the contact form.

Here is my code for the contact form:

Expand|Select|Wrap|Line Numbers
  1. function onContactClick(e:MouseEvent):void
  2. {
  3.     gotoAndStop("contact");
  4. }
  5.  
  6. send_btn.addEventListener(MouseEvent.CLICK, submit);
  7.  
  8. function submit(e:MouseEvent):void
  9. {
  10.     var variables:URLVariables = new URLVariables();
  11.     variables.fromname = name_txt.text;
  12.     variables.fromemail = email_txt.text;
  13.     variables.fromsubject = subject_txt.text;
  14.     variables.frommessage = message_txt.text;
  15.  
  16.     var req:URLRequest = new URLRequest("contact.php");
  17.     req.data = variables;
  18.     req.method = URLRequestMethod.POST;
  19.  
  20.     var loader:URLLoader = new URLLoader();
  21.     loader.dataFormat = URLLoaderDataFormat.VARIABLES;
  22.     loader.addEventListener(Event.COMPLETE, sent);
  23.     loader.addEventListener(IOErrorEvent.IO_ERROR, error);
  24.     loader.load(req);
  25.     status_txt.text = "Sending...";
  26. }
  27.  
  28. function sent(e:Event):void
  29. {
  30.     status_txt.text = "Your email has been sent.";
  31.     name_txt.text = "";
  32.     subject_txt.text = "";
  33.     email_txt.text = "";
  34.     message_txt.text = "";
  35. }
  36.  
  37. function error(e:IOErrorEvent):void
  38. {
  39.     status_txt.text = "Error - please try again later.";
  40. }
Here is my code for my php file:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. $sendto = 'run_for_life@verizon.net';
  4. $name = $_POST['fromname'];
  5. $from = $_POST['fromemail'];
  6. $subject = $_POST['fromsubject'];
  7. $message = $_POST['frommessage'];
  8.  
  9. $name = stripslashes($name);
  10. $from = stripslashes($from);
  11. $subject = stripslashes($subject);
  12. $message = stripslashes($message);
  13.  
  14. $data = "Name: " . $name . "\n";
  15. $data .= "Email: " . $from . "\n\n";
  16. $data .= "Subject: " . $subject . "\n\n\n";
  17. $data .= $message;
  18.  
  19. if(mail($sendto, $data))
  20. {
  21.     echo 'response=passed';
  22. }
  23. else
  24. {
  25.     echo 'response=failed';
  26. }
  27.  
  28. ?>
Jul 3 '09 #1
2 7303
JWest46088
74 New Member
It turned out to be the scrollbar component I brought to the stage.
Jul 6 '09 #2
Change your button to be a MovieClip instead of a button at properties panel.
Oct 23 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2662
by: Thomas Hoheneder | last post by:
Hello, I use PHP 4.3.10 and want to deliver a post variable from a PHP page to itself. In my page mypage.php I have a hidden field named "dbaction" and a form button. When clicking the form...
3
3007
by: Stefano | last post by:
Hi all, i have a problem with javascript variable. I have a script that sets a global variable and open a dialog, then when i push a button of this dialog and i read the variable, this variable...
1
1105
by: bscofield | last post by:
I have 4 *.js files that I am referring to with <script src=*.js></script> call the files A, B, C, and D. From file "A" I can view and use variable "Data1" from file "D". From file "B" I...
2
3373
by: John Holmes | last post by:
I have a web interface where the user types in ID's one at a time. After an ID is typed in, a button is clicked and the button click event has code that does a query and returns a data reader and...
9
3120
by: Shapper | last post by:
Hello, I am declaring a variable in my aspx.vb code as follows: Public Class catalogue Public productid As String Private Sub Page_Load ... I have an image button where I call the...
7
2177
by: Aaron | last post by:
Complete code follows. I am new to .NET programming (and programming in general) and I am having a difficult time understanding how to fill a variable in one sub, and then access it from...
4
2463
by: arvind | last post by:
How to pass the variables defined inside the function to the another function on click event of the button in Tkinter? pleas send me a sample code if anybody has it. thanx
2
1486
by: bcshaw | last post by:
Hey all I have a vb.net/asp.net dynamic website connected to an access database using a oledb connection. I use a datareader to retrieve the results of a query and iterate through the results using...
1
3707
by: Wolfman | last post by:
Hi gang! I've been searching for a solution to this problem extensively but nothing really hits the mark. I have a descriptive popup page that contains a PayPal order button. The normal PayPal...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7460
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.