473,594 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

function doesnt work without an alert()

Hello

I have this code in actionscript that calls javascript:

actionscript:

zoom_in = function () {
var tw1:Tween = new Tween(mc_1, "_width", Regular.easeOut ,
mc_1._width, 0, 1, false); //OK
var tw2:Tween = new Tween(mc_1, "_height", Regular.easeOut ,
mc_1._height, 0, 1, false); //OK
ExternalInterfa ce.call("zoom") ;
}

javascript:

function zoom()
{
top.resizeTo(10 24, 768);
self.moveTo(0,0 );
}

Everything works perfectly on Firefox 1.5 but not on IE 6+

in IE the "zoom" function doesn't work, but if I add an alert it DOES work:

function zoom()
{
alert('this works');
top.resizeTo(10 24, 768);
self.moveTo(0,0 );
}

Does anyone knows what can be wrong with the code? it doesn't make any
sense, any help will be appreciated.

thanks and regards.
Apr 25 '06 #1
1 4743
VK

Hugo Flores wrote:
Hello

I have this code in actionscript that calls javascript:

actionscript:

zoom_in = function () {
var tw1:Tween = new Tween(mc_1, "_width", Regular.easeOut ,
mc_1._width, 0, 1, false); //OK
var tw2:Tween = new Tween(mc_1, "_height", Regular.easeOut ,
mc_1._height, 0, 1, false); //OK
ExternalInterfa ce.call("zoom") ;
}

javascript:

function zoom()
{
top.resizeTo(10 24, 768);
self.moveTo(0,0 );
}

Everything works perfectly on Firefox 1.5 but not on IE 6+

in IE the "zoom" function doesn't work, but if I add an alert it DOES work:

function zoom()
{
alert('this works');
top.resizeTo(10 24, 768);
self.moveTo(0,0 );
}

Does anyone knows what can be wrong with the code? it doesn't make any
sense, any help will be appreciated.


See explanation and demo sample at:
<http://groups.google.c om/group/comp.lang.javas cript/msg/e02fd02952dd0d2 4>

Browser graphics context is not updated until you exit from the current
execution thread. This is the same for all UA's, so I'm not sure what
do you call "works perfectly in Firefox".

Apr 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2351
by: Sharon | last post by:
Hi! I have this function to add some parameters to my XSL and then retransform my XML with it, resulting in a neatly filtered table. It works great, but as soon as I take out the alert, it doesn't do anything anymore, seemingly. This is the function: function renderData(filterField, filterValue, mode) { try {
2
2817
by: effendi | last post by:
Hi I tested the following function in Safari and it doesnt work. This is tested fine in IE. function processOutcome(){ mainDatabase=document.forms.AssessDatabase.value var oCheckboxs=document.forms.TeamID if (oCheckboxs=="undefined" )
4
2112
by: alex | last post by:
I am so confused with these three concept,who can explained it?thanks so much? e.g. var f= new Function("x", "y", "return x * y"); function f(x,y){ return x*y } var f=function(x,y){
7
3205
by: VK | last post by:
I was getting this effect N times but each time I was in rush to just make it work, and later I coudn't recall anymore what was the original state I was working around. This time I nailed the bastard so posting it before I forgot again... By taking this minimum code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head>
8
2820
by: optimistx | last post by:
In excellent YAHOO user interface programs I see often extra parenthesis like this (foo=function(){ alert('I am foo'); })(); instead of bar=function(){
5
1473
by: ceejee | last post by:
hello there! i had spent lots of time searching and thinking what is the reason why in onClick event like the one below, when a certain space between words is existed, it doesnt function well. can anybody know here the reason. or is there something wrong with my coding. kindly enlighten me if you have some information. sample 1(just a simple alert message display) <input type = 'button' Name = 'test1' value='CLICK ME' onclick = alert('this...
53
8359
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script language="javascript" type="text/javascript">
0
7876
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8251
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...
1
8003
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
8234
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
5408
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3859
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
3897
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2385
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
1
1478
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.