473,771 Members | 2,328 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

actionscript - mc.rollOver event listener to sendAndLoad

daJunkCollector
76 New Member
I wrote the following script. I have a movieclip named countyA_mc. I want the user to mouse over this movie clip, and result in the sending of a variable to the middle tier.

I can establish communication when I use a .click event listener on a button component, but when I attempt to convert the script (in the following logical way) I do not establish communication with the aspx page:

Expand|Select|Wrap|Line Numbers
  1. var hoverColor:Number = 0x9A9A9A;
  2. var originalColor:Number = 0x333399;
  3. var countyTitle:String = "testTitle";
  4. var testingServer:String = "testServer";
  5.  
  6.  
  7. var objectListener:Object = new Object();
  8. objectListener.rollOver = function(ev:Object) {
  9.     var result_lv:LoadVars = new LoadVars();
  10.     result_lv.onLoad = function(success:Boolean) {
  11.         if (success) {
  12.             textArea_ta.text = "Good Day!!";
  13.         } else {
  14.             textArea_ta.text = "Error connecting to server.";
  15.         }
  16.     };
  17.     var send_lv:LoadVars = new LoadVars();
  18.     send_lv.name = title_text.text;
  19.     send_lv.sendAndLoad("destination.aspx", result_lv, "POST");
  20. }
  21. this.countyA_mc.addEventListener("rollOver", objectListener);
Jul 26 '07 #1
0 4475

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

Similar topics

17
4883
by: abs | last post by:
My element: <span onclick="alert('test')" id="mySpan">test</span> Let's say that I don't know what is in this span's onclick event. Is it possible to add another action to this element's onclick event ? I've tried something like this: oncl = document.getElementById('mySpan').onclick oncl = oncl + '\n;alert(\'added\')' document.getElementById('mySpan').onclick = oncl
47
7630
by: Lauren Quantrell | last post by:
I have constructed the following code that simulates the common rollover effect when moving the mouse over a label (this example makes the label bold.) I'm wondering if anyone has come up with a better solution. lq 'start code:
1
1180
by: Jim Van Abbema | last post by:
I have the identical rollover button on the same page, going to different links. (They are links to the given institution's online store.) Is there a simplified script that doesn't require each button to be uniquely named? At this point I have 34+ of changes with each button having its own name, and I will be needing to adding more. Is there a simpler solution? Thanks, Jim Van Abbema
1
1817
by: mckrooks101 | last post by:
My problem is that I have a javascript cycling banner at the top of my page and navigation buttons about 20 pixel underneath that both have external js files but the banner doesn't work when I attach the button rollover js. Is there a type of flow or proximaty that I am not aware of? Someone please help. Thanks, Robert
8
2345
by: Zarwadi | last post by:
Hi, I have been creating a simple flash site and I need to use PHP and MySql, which I have never done. And I really need help. I've created a database but I can't get my action script to send my variable to my PHP code. I think my Mysql data base has been set up wrong, but because I have never done this before I don't know what I am doing wrong. Please can some help me. I have not slept for 3 days If anyone can help me i will be eternally...
3
2444
by: Zarwadi | last post by:
Hi, I have been creating a simple flash site and I need to use PHP and MySql, which I have never done. And I really need help. I've created a database but I can't get my action script to send my variable to my PHP code. I think my Mysql data base has been set up wrong, but because I have never done this before I don't know what I am doing wrong. Please can some help me. I have not slept for 3 days If anyone can help me i will be eternally...
1
2487
by: Rocky86 | last post by:
hi ppl bascially I am require to pass my php coding to actionscript and the actionscript will seperate the code of my php how do I do it? Must I create a function for php to be pass into actionscript like below? function showuserdetails(uname, uid, department, designation, contact) { locate.uname.text = uname; locate.uid.text = uid; locate.department.text = department; locate.designation.text = designation; locate.contact.text =...
1
2207
by: Rocky86 | last post by:
hi people how do I retrieve some value from a php file that I have created? do I do something like the code below? var passingurl= mainurl+"passing.php"; //link to pass url // create two new instances of LoadVars, one to send and one to receive data var postalOut:LoadVars = new LoadVars(); var postalIn:LoadVars = new LoadVars(); // define what should happen when the response is received,
1
3653
anfetienne
by: anfetienne | last post by:
i have this code below that i made....it loads vars from txt file splits it then puts it into an array....once in an array it the brings the pics in from the array to create thumbnails and a larger image. my problem is i have captions to go with it and when i try to load the captions nothing happens or can be seen to be happening. i dont know where i am going wrong as i have no output or compiled errors var locVar = new Array();...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9910
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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 we have to send another system

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.