Greetings, all. I've been working on an interactive quiz for a while now,
and it's working correctly, except that some parts of it break after making
a call to any JavaScript function. I've been trying fruitlessly to debug
this for a small eternity now, and I've finally run out of ideas.
Could someone try to reproduce this effect? I've been able to reproduce the
bug (?) with the following setup:
The components are a button symbol and three movie clips. One movie clip has
three frames with a static graphic on each frame; each frame has a stop()
statement on it, and nothing else. Attached to it at the root level is
onClipEvent(enterFrame){
this._x=_root._xmouse;
this._y=_root._ymouse;
}
This clip should be named 'pointer', and reside alone on the top layer.
The second movie clip has the following code attached to it:
onClipEvent(load){
onRollOver=function(){
Mouse.hide();
_root.pointer.gotoAndPlay(2);
}
onRollOut=function(){
Mouse.show();
_root.pointer.gotoAndPlay(1);
}
}
The third and final movie clip has the same code attached to it, save that
its onRollOver send the pointer clip to frame 3, rather than frame 2.
The button has the following code attached to it:
on(release){
flash.external.ExternalInterface.call("alert", "alert called");
}
After clicking the button and thereby making the JS call, the pointer clip
stops following the system mouse movements. I've seen this behavior using
both fscommand and ExternalInterface, exporting for Flash Player 6 and 8.
The consistency makes me believe either that it's a bug in the way that
Flash handles calls to JavaScript, or that it's a really really basic error
in my AS.
Many Thanks,
Chris Akins
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com