EventListener working 95% of the time in IE but only 2% in Firefox?
I have no clue how to even begin to debug this. The problem
is much more common in Firefox than in IE, but it does happen in
both.
The critical problem is that my EventListener function
startChatClickHandler is not triggered 98% of the time in Firefox
and about 5% of the time in IE. Even the Alert box doesn't trigger.
I can click on it all day in Firefox and it just sits there though
once ever while it works but never more than once. But if I right
click on it, then select Rewind, it will work 100% - at least till
I try it again. That must be a clue but I have no idea what it
means. Also, it used to work just fine but one of my changes must
have had a unintented effect but I can't seem to fix it. Also, I've
had the same results on more than one PC.
Another possible clue is that if I hit the enter key instead,
that works 100% of the time in both Firefox and IE, even though all
it does is pass it on to the EventListener function
startChatClickHandler. It's like it's just not "hearing" the mouse
clicks most of the time.
The instance of the button is called startChatButton and
userNameInput is a instance of a TextInput. The code for this
section is below.
I've struggled with this for 12 hours straight and I am at my
wits end. Anyone who can help with this will have my undying
gratitude.
import mx.controls.Alert;
var mainpicpath:String;
var loadit_lv:LoadVars = new LoadVars();
var userdata_so:SharedObject =
SharedObject.getLocal("user_data");
var tempName:String;
//var buttonlistenerObject:Object = new Object();
profileText.text = "Still loading...";
userNameInput.text = chatName;
tempName = userdata_so.data.chatname;
if (tempName.length > 0)
userNameInput.text = tempName;
profileText.text = "Profile text failed to load.";
function startChatClickHandler (evt:Object):Void // <-----
HERES THE PART THAT ONLY SOMETIMES GETS TRIGGERED, MUCH WORST IN
FIREFOX
Alert.show("function click triggered","Info");
_global.userName = userNameInput.text;
if (_global.userName.length > 0)
userdata_so.data.chatname = userNameInput.text;
userdata_so.flush();
else
_global.userName = "Guest";
nc.connect("rtmp://my flash media server);
startChatButton.addEventListener("click",
startChatClickHandler);
function enter(ev)
Alert.show("function enter triggered","Info");
startChatClickHandler(ev);
userNameInput.addEventListener("enter", this); //<----
THIS ALWAYS WORKS
function onConnect(ev)
//Alert.show("You are connected to: " + nc.uri,
"Information");
gotoAndPlay("Main");
mainpicpath = "
http://www.mywebsite.com/site_images/profiles/mainpic-"
+ channel + ".jpg";
loadMovie(mainpicpath, "loginpic");
loadit_lv.onData = function(src:String)
if (src != undefined)
profileText.text = src;
else
profileText.text = "Error loading profile text.";
loadit_lv.load("
http://www.mywebsite.com/profiletext/"
+ channel + ".txt");
And this is how the flash movie is called from Perl:
print qq{<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="720" height="500" id="customer_v16b" align="middle">};
print qq{<param name="allowScriptAccess"
value="sameDomain" />};
print qq{<param name="movie" value="
http://www.mywebsite.com/flash/customer_v16b.swf?dummyVar=$dummy"
/>};
print qq{<param name="FlashVars"
value="channel=$host_page&hostName=$profile_info{'
name'}&chatName=$chat_name">};
print qq{<param name="quality" value="high" />};
print qq{<param name="bgcolor" value="#FFFFFF" />};
print qq{<embed src="
http://www.mywebsite.com/flash/customer_v16b.swf?dummyVar=$dummy"
FlashVars="channel=$host_page&hostName=$profile_in
fo{'name'}&chatName=$chat_name" quality="high"
bgcolor="#FFFFFF" width="720" height="500" name="customer_v16b"
align="middle" allowScriptAccess="sameDomain"
type="application/x-shockwave-flash" pluginspage="
http://www.macromedia.com/go/getflashplayer"
/>};
print qq{</object>};
I stripped almost all the code out and verified I could click
on the button and that it was working correctly.
Then I started adding things back in till it broke again.
Heres as much of the original code that I could put back
without breaking it:
import mx.controls.Alert;
var mainpicpath:String;
var loadit_lv:LoadVars = new LoadVars();
var userdata_so:SharedObject =
SharedObject.getLocal("user_data");
var tempName:String;
//var buttonlistenerObject:Object = new Object();
profileText.text = "Still loading...";
userNameInput.text = chatName;
tempName = userdata_so.data.chatname;
if (tempName.length > 0)
userNameInput.text = tempName;
profileText.text = "Profile text failed to load.";
function startChatClickHandler (evt:Object):Void
Alert.show("function click triggered","Info");
_global.userName = userNameInput.text;
if (_global.userName.length > 0)
userdata_so.data.chatname = userNameInput.text;
userdata_so.flush();
else
_global.userName = "Guest";
//nc.connect('rtmp:/GPL_chat_alpha/chat',
_global.userName,"customer",hostName);
nc.connect("rtmp://myflashmediaserver",
_global.userName,"customer",hostName,channel);
startChatButton.addEventListener("click",
startChatClickHandler);
function onConnect(ev)
//Alert.show("You are connected to: " + nc.uri,
"Information");
gotoAndPlay("Main");
The following sections of code will break it (in that
clicking on the button no longer does anything), either together or
one at a time:
function enter(ev)
Alert.show("function enter triggered","Info");
startChatClickHandler(ev);
userNameInput.addEventListener("enter", this);
mainpicpath = "
http://www.girlsplaylive.com/site_images/profiles/mainpic-"
+ channel + ".jpg";
loadMovie(mainpicpath, "loginpic");
loadit_lv.onData = function(src:String)
if (src != undefined)
profileText.text = src;
else
profileText.text = "Error loading profile text.";
loadit_lv.load("
http://www.girlsplaylive.com/profiletext/"
+ channel + ".txt");
So the question is why does this happen and whats the best
way to fix it?
Similar Messages
-
Hi there, I am trying to connect to my server at work from home using a vpn connection. It connects fine and the time ticks along, but when i click go - connect to server, it comes up with connection failed. Please help!
... when i click go - connect to server, it comes up with connection failed.
If you're trying to connect to a Bonjour server on the remote network, that won't work over a layer 3 VPN. Use something like Hamachi or one of the SSH-tunnelling Bonjour proxy apps for that. -
I had my iphone 5 replaced at the apple store as of a broken sleep button and i was wondering if they would replace again as i think it may of happend again as it works most of the time but theres an odd click where it wont work.
Yes.
-
As a novice computer user, I wonder why I'm often getting "white-out" (program/app/site I'm working in goes totally blank onscreen). This is when I'm Internet online. If it makes a difference, I'm working 99% of the time on battery, not AC, power. Some of the possibilities I'm guessing are: glitches in my Verizon FiOS Wi-Fi providership?; staying too long on a site that's waiting for me to finish and "Submit"?; computer hardware prob (yikes, I hope not! It's brand new). Any ideas out there?
When this 'white-out' occurs, is the display 100% white with no error message and no menu bar?
Does this occur when you are using Wi Fi or connected to the Internet via the Ethernet cable?
Ciao. -
one headphone does not work or works 50% of the time. What is best way to resolve?
First of all, I'd recomend resetting the iPod. Do this by pressing the 'Menu' and 'Center" buttons for 10 seconds or until the Apple logo appears.
If this doesn't work, then it sounds like a hardware fault.
To identify the issue, if you have one, try plugging the iPod into a speaker through the dock. If this works, then the issue is with the headphone jack. If not then the logic board is dead. If the iPod is less than a year old, then it can be repaired by Apple for free. Just book an appointment for the Genius bar.
If not then, you could see about sending it to an iPod Repair Company, such as my own. A replacement headphone jack would cost £30.00 in the UK, including next day delivery. Other companies you could try would beUKiPodRepairs, but we guarantee to beat any quote that you get.
Hope that this helps,
Mark Sweeney
Dr Pod Founder -
When I try to Home-Share It works most of the time. It will always show up, but sometimes I tap on the icon of my library then it wont load, I restart my computer, IOS Divice and my router It still wont load my library. I even went and tried to reinstall Itunes and everything nothing works.
Hi,
/Users/sarahschadek/Desktop/Safari.app/Contents/MacOS/Safari
Move the Safari app from the Desktop to the Applications folder.
Restart your Mac.
That's why you see this:
When I try to do the updates my computer says it has ready it goes through like it is downloading them then at the end it says some of the files could not be saved to "/" files.
After your restart your Mac, click the Apple menu (top left in your screen) then click: Software Update ...
Carolyn -
My iPod touch 4th generation's on/off button is not responding most of the time. My home button will work 100% of the time. What should I do? PLEASE HELP!
Restore your iPod touch in iTunes.
-
Why does my Safari Auto-Fill only work part of the time?
First of all, why isn't there a link on the Apple website to provide Feedback? Secondly, I'd love to know why my Safari Auto-Fill only works some of the time, like when entering Sweepstakes information. I realize some websites don't allow Auto-Fill, but on the ones that do, I can't get the second window to open up when I click "Auto-Fill".
Safari 6.1.1 and yes all web forms are checked under Preferences Auto-Fill. I am daily entering sweepstakes for the HGTV dream home, and even though the initial bubble shows up "Auto-Fill your contact information" shows up, when I click on it, the second bubble that lets you confirm the info doesn't always open. I tried it just now in a separate tab, and it opened; then I came back here to write some of the message. Then I went back to try again and it won't open. It drives me crazy. I keep trying with each new data field and sometimes the second bubble will open further down the page.
-
I downloaded ios7 to my iphone and now my volume control does not work 99% of the time. Is there something I need to do to correct this?
Adjust the Volume Control in Control Center, or try a RESET.............
-
Spotlight search (search iphone) does note work half of the time.
When searching my iphone4s nothing show up half the time. (spotlight search) Sometimes it works fine and other times I type and it does not search or show anything. Powering down the phone did not fix. Just odd it works for a minute then seems to stop completly. No other problems besides this one.
OK, well at least it works 50% of the time.
-
CS 4 Dynamic Link to Encore doesn't work most of the time. Encore stops operating after opening and periodically Premier Pro stops working. I'm told that there has been a problem with CS4 when using Dynamic Link to go to Encore and build CD's. Is there a way around this? Is there a patch to correct it?
To build CD's???
What problem does Encore have with DL?
If DL is not working properly for you the way around this is to export from Premiere to either mpeg2-dvd for DVD or BluRay H.264 for BD-disks and import the files in Encore. -
After update flash player doesn't work most of the time
Hi Folks!
Windows XP
IE 6
About 2 weeks ago I installed a flash player security update and ever since then flash player doesn't work most of the time. On most websites with embeded video all I see is an empty placeholder where the video is supposed to be.
If I go to a site like Youtube all is fine. However, if I go to a site that has embeded a Youtube video all I see is the empty placeholder where the video is supposed to be.
Some folks have recommended I uninstall and download and reinstall. The problem with this is that there isn't *anything* related to Abobe flash player in Add/Remove programs.
Not sure what to do about this (read: I'm totally lost!).
Here's a screencap of the empty placeholder:
http://i27.tinypic.com/2wrdttf.jpgThe standard warranty is for 12 months from the date of purchase, unless you bough AppleCare which would have extended it to 2 years.
If it's out of warranty, then you pay for repairs, and it's expensive. There are 3rd party repairers who are cheaper.
Did you try these?
The Five Rs.
As the previous poster said, it's more than likely a hardware issue, but there's no harm in trying the software fixes before you decide it needs repair. -
Microfone and speaker is not working most of the times
Microfone and speaker is not working most of the times. But after restarting it sometimes it works and again everything gets mute
Hello there, Paras1111.
The following Knowledge Base article offers up some great information for troubleshooting issues with microphone and speaker. Feel free to review the links under "Acoustic-speaker/microphone/receiver:"
iPhone: Hardware troubleshooting
http://support.apple.com/kb/ts2802
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
I try to save or delete photos from some SD cards that I use in trail cameras. The cards are unlocked, but only allow me to read files. Also, is it unusual for ad tabs to pop up in Safari every time I click on the tab I am using?
I try to save or delete photos from some SD cards that I use in trail cameras. The cards are unlocked, but only allow me to read files. Also, is it unusual for ad tabs to pop up in Safari every time I click on the tab I am using?
-
Calculate the working days having the start and end dates only
Hi,
Can BIP be able to calculate the working days having the start and end dates only? It is like the NETWORKDAYS function in Excel. (i.e. excluding weekends and holidays).
Thanks.Not out of the box.
But You could extend your BIP functions
Look at here:
http://blogs.oracle.com/xmlpublisher/2009/05/bip_by_extension.html
Based on that what you need is similar to the following Java code:
http://objectlabkit.sourceforge.net/
regards
Jorge A.
Maybe you are looking for
-
Oracle Query failing for multiple rows:
Hey Guys, I have been given a task to produce an ad-hoc report based on the following conditions (I will give you the structure of the table and details in the table below the requirements) Requirements: Adhoc Report for Audit on CIT Income Allocatio
-
Final Cut Express HD transfer from Intel to new Retina MacBook Pro
Final cut express HD will not open on new macbook retina using my intel version serial number. Do I have to purchase it again!!?
-
Hi All, Good Day,at the moment we having XI2.0 system and client want to upgrade to PI 7.0 .first of all is this upgrading is going to work with old interfaces.if yes what are the steps we have to take to upgrade from 2.0 to 7.0 and what t
-
PRT Rounting prob for counter updation for Repetitive manufacturing
Hi Experts, Is it possible to do update measuring counter thr production specially in case of Repetitive manufacturing scenario .If we try the same counter thr discrete then it will update the counter . Pl guide ,is there any customization for these
-
Can't connect to iCloud after mountain lion install
After installing mountain lion I can use iCloud. I keep getting this pope up that this mac can't connect to icloud due to a problem with my e-mail account and suggest to open icloud preference to fix it. Then I get asked my passward which it does't a