ExternalInterface.call a little too good
June 25, 2009 12:00 AM
Flowers:
Right you are, seemed to work after the fix
After staring at it for what seemed like hours I missed that :-(
Thank you
rellis09 said:So here is the issue, I have created an image gallery that is scrollable left to right, normally on pressing on any one image will cause a larger resolution picture to appear, click on the high res Pict and it disappears and goes back to a scrolling gallery. I am attempting to adapt the gallery that when the user presses on the thumb it will go to a specific branching scenario within my Lectora projects. I have included the code used at the bottom, The issue is this when I publish and run as soon as the page with the galley comes up it immediately executes the ExternalInterface.call without a mouse being anywhere near the galley let alone onPress :-( Any Suggestions? import mx.transitions.Tween; import mx.transitions.easing.*; import flash.external.*; this.createEmptyMovieClip("container",1); var imagesNumber:Number = 9; var scrolling:Boolean = true; for (i=1; i<=imagesNumber; i++) { container.attachMovie("thumb"+i,"thumb"+i+"_mc",i); myThumb_mc = container["thumb"+i+"_mc"]; myThumb_mc._x = (i-1)*myThumb_mc._width; myThumb_mc._y = (Stage.height-myThumb_mc._height)/1.5; myThumb_mc.onPress = ExternalInterface.call("trivExitPage('branch1.html', true)"); }; container.onEnterFrame = function() { if (scrolling){ this._x += Math.cos((-_root._xmouse/Stage.width)*Math.PI)*15; if (this._x>0) { this._x = 0; } if (-this._x>(this._width-Stage.width)) { this._x = -(this._width-Stage.width); } } }; Thank you RE
Discussions have been disabled for this post