473,503 Members | 241 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
ExternalInterface.call("zoom");
}

javascript:

function zoom()
{
top.resizeTo(1024, 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(1024, 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 4735
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
ExternalInterface.call("zoom");
}

javascript:

function zoom()
{
top.resizeTo(1024, 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(1024, 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.com/group/comp.lang.javascript/msg/e02fd02952dd0d24>

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
2345
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...
2
2806
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...
4
2102
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
3183
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...
8
2809
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
1470
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...
53
8315
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...
0
7203
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,...
0
7089
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...
0
7282
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,...
0
7339
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...
1
6995
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...
1
5017
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
4678
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
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
738
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.