How to stop AS2 carousel from spinning when not moused over...

Hello Adobe forums,
I've had a challenge that I cannot seem to figure out for the life of me right now.
I have set up a mockup spinning carousel on this page here using Actionscript 2:
http://iongeo.com/ru_innovation_test_dev/
What I would like however, is for the annimation to only be available when moused over on the .swf.   When the mouse is not placed inside the flash file, the animation would then stop.  Is this possible??
Any help would be greatly appreciated.
Thanks!
Here is the AS2 code that I have used for it:
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 75;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 130;
var home:MovieClip = this;
theText._alpha = 0;
theHeader._alpha = 0;
var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
        var t = home.attachMovie("item","item"+i,i+1);
        t.angle = i * ((Math.PI*2)/numOfItems);
        t.onEnterFrame = mover;
        t.toolText = nodes[i].attributes.tooltip;
        t.content = nodes[i].attributes.content;
        t.header = nodes[i].attributes.header;
        t.icon.inner.loadMovie(nodes[i].attributes.image);
        t.r.inner.loadMovie(nodes[i].attributes.image);
        t.icon.onRollOver = over;
        t.icon.onRollOut = out;
        t.icon.onRelease = released;
function over()
    //BONUS Section
    home.tooltip.tipText.text = this._parent.toolText;
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
    home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
    home.tooltip._alpha = 100;
function out()
    delete home.tooltip.onEnterFrame;
    home.tooltip._alpha = 0;
function released()
    //BONUS Section
    home.tooltip._alpha = 100;
    for(var i=0;i<numOfItems;i++)
        var t:MovieClip = home["item"+i];
        t.xPos = t._x;
        t.yPos = t._y;
        t.theScale = t._xscale;
        delete t.icon.onRollOver;
        delete t.icon.onRollOut;
        delete t.icon.onRelease;
        delete t.onEnterFrame;
        if(t != this._parent)
            var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
            var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
            var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
        else
            var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
            var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
            var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,150,1,true);
            var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,250,1,true);
            var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
            var tw5:Tween = new Tween(theHeader,"_alpha",Strong.easeOut,0,100,1,true);
            theText.text = t.content;
            theHeader.header = t.header;
            var s:Object = this;
            tw.onMotionStopped = function()
                s.onRelease = unReleased;
function unReleased()
    //BONUS Section
    var sou:Sound = new Sound();
    sou.attachSound("sdown");
    sou.start();
    delete this.onRelease;
    var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
    var tw:Tween = new Tween(theHeader,"_alpha",Strong.easeOut,100,0,0.5,true);
    for(var i=0;i<numOfItems;i++)
        var t:MovieClip = home["item"+i];
        if(t != this._parent)
            var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
            var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
            var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
        else
            var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
            var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
            var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
            var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
            tw.onMotionStopped = function()
                for(var i=0;i<numOfItems;i++)
                    var t:MovieClip = home["item"+i];
                    t.icon.onRollOver = Delegate.create(t.icon,over);
                    t.icon.onRollOut = Delegate.create(t.icon,out);
                    t.icon.onRelease = Delegate.create(t.icon,released);
                    t.onEnterFrame = mover;
function moveTip()
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
xml.load("icons.xml");
function mover()
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s = (this._y - perspective) /(centerY+radiusY-perspective);
    this._xscale = this._yscale = s*100;
    this.angle += this._parent.speed;
    this.swapDepths(Math.round(this._xscale) + 100);
this.onMouseMove = function()
    speed = (this._xmouse-centerX)/8000;

it's possible.  but, the main problem is detecting when the mouse is over your swf.
as2 doesn't have a good way to detect that.  there are many work-arounds but no matter which work-around you use, you'll set a boolean (say, mouseOverBool) to true when you detect the mouse is over your swf and set it to false when the mouse is not over your swf.  you can then use:
function mover()
if(mouseOverBool){
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s = (this._y - perspective) /(centerY+radiusY-perspective);
    this._xscale = this._yscale = s*100;
    this.angle += this._parent.speed;
    this.swapDepths(Math.round(this._xscale) + 100);
// or to make this nicer, you can start a loop that decrements speed to 0 when the mouse is not over your swf.  and, as long as you're doing that, you may as well start a loop when you detect no mouse movement for some period of time that decrements speed to 0.  that will eliminate the need to check if the mouse is over your swf.

Similar Messages

  • How to stop the executable from starting when opened

    Hi Guys,
    I am building an exe with the application builder. I am not able to find a way to stop the exe from running when opened. I dont need the exe to run. I know I m missing a very basic step here but I m not able to do that.
    Could anyone explain me how to do this.
    Regards,
    Nitin

    Hello,
    This is Dominic L. from Applications Engineering at National Instruments. This was reported to R&D (CAR#41DAPUQU) and was fixed in LabVIEW 8.2.1. Here is a link to the current evaluation software download for LabVIEW:
    http://digital.ni.com/demo.nsf/websearch/14f9ce475127ade786256ac60070926c?opendocument
    This particular bug actually renders all the build options for source file settings unusable. While the other options can be set manually in the source VI properties, the start-up VI will always run when an executable is opened.
    Here are three different workarounds to this:
    Option 1 - Upgrade to 8.2.1. 
    Option 2 - Check "Enable debugging" and "Wait for debugger on launch" in the Advanced page of the build specification. One side effect is this will include the block diagrams of the VIs and extra code for debug tool support. Note that if you don't protect the source code (block diagram), it kind of defeats the purpose of creating an executable.
    Option 3 - Use a dummy startup VI to launch the desired startup VI.
    For the third workaround, the attached "Dummy Startup VI.vi" uses VI server to open the desired startup VI's front panel and then closes.  To use the Dummy Startup VI follow these steps:
    Add the Dummy Startup VI to the project.
    Open the Dummy Startup VI and change "Main VI.vi" to the VI you would like to open but not run in the project and save.
    In the source files page of the build, select the Dummy Startup VI as a startup VI and the VI you would like to open but not run as a support VI.
    Build and run.
    I hope this helps.
    Have a great evening!
    Best Regards,
    Dominic L.
    Attachments:
    Dummy Startup VI.vi ‏12 KB

  • How do i toggle off camera info when i mouse over a photo?

    I have spent 1/2 hour trying to find a way to toggle off photo information that shows when I mouse over a photo in browser, split view or viewer.

    control-T   see

  • How can I add popup help messages when I mouse over a button

    Hi there,
    I haev Acrobat x 10 pro.
    I'm new to acrobat and would like to set up a friendly form for people to fill in online.  I'd like them to have some interactive help so that for example when they mouse over or click a button, some help text appears.  I've played around with adding a text field that is hidden and then adding action items to a button to show it.  This works, but my text field is shaded like a normal text field and I'd like it to look different.
    Is there a better way to to this popup effect or is there a way t omake the popup look like a popup and not a text field?
    All help gratefully received,
    Thanks in advance.

    I'mnot sure what you mean by shading exactly, but you can set up a text field so that it doesn't have an inset border. An alternative is to use a button to display the text. Buttons are more flexible since you can set a button icon to be anything that can appear on a PDF page (text, images, vector graphics). For a sample, see: https://acrobat.com/#d=aP-2xL45pM57xVkT6d6fSg
    Also, if you use a text field, set it's default value to the text you want to display so that the field won't get blanked if the form is reset. You don't have to worry about this when using buttons.

  • How to stop instrument library from opening when i double click a track?

    is there a way to do this.

    On rare occasions... I have received emails from the Dev team in the past about issues/suggestions i have made via the feedback form....
    However for actual bugs rather than suggestions I use the Developer Bug Report System as then you can see if/when bugs are being addressed....
    How to effectively report a bug in Logic Pro

  • How to stop my iPad from freezing when sending photos?

    My iPad is frozen. 
    This is the third time it's has happened in four days. The first two times were accidents; the third time was induced.
    What happens is when I attach three images from iPhoto to an email and hit send,  Mail freezes.
    The only way I've discovered to get out of this is to hold the Home button and the Off button until it re-starts and tells you to plug it back into another computer and re-load everything.
    I have a 1 on 1 at the Apple Store in the AM but wondered if anyone else had similar experience, and if so how did you fix the problem?
    I bought the iPad as a light weight alternative to take to Italy this summer.  I can't have this happen there, for I'll have no way to re-load everything because I'll only have the 'dead' iPad.
    thanks,
    Hal

    Try here. http://kb.mozillazine.org/Firefox_hangs

  • How to stop web background from resizing when zooming in an out?

    Iv added a background fill (tried on master page and the actual page) but still when i view it in browser  and try zoom in an out the background scales with the content?
    Iv done it before, but can't figure out how to do it again ?
    Cheers

    Sorry, just realised how to do it ...But I'm faced with another problem...the size of the background varies per page? its fine on all the other pages except two pages where it shrinks a bit

  • How to stop the keyboard from showing when checkbox is selected

    Whenever a user checks off a checkbox, the keyboard appears.
    How do I turn off this feature?

    This is likely a web-site-specific issue.  Can you share a link to the web page that behaves this way?

  • How to Stop the preview from jumping when  using .avi's??

    Hi
    Ive been having aproblem where the .avi file I have imported will just jump forward , making it impossible to edit.. I have try reconverting th.avi's to lower bitrate, and still it jumps ,, the avi files iam using having been converted from SUPER to .avi with h.264/AVC Video Codec, at 1280 * 720 and 29.97 Fps -> Bitrate 2208 kbs,, if anyone has any suggestions,,??

    DV won't handle John's frame size. He may be better off using Desktop mode with something like the Lagarith codec, though Premiere may not edit perfectly smooth with that one either.

  • How do i stop two windows from openning when i clicon an email link, the home page and the link both open. i just want the link to open

    how do i stop two windows from openning when i click on an email link, the home page and the link both open. i just want the link to open

    That is a bug, so you need to wait until this get fixed.
    See https://bugzilla.mozilla.org/show_bug.cgi?id=531552 - Firefox 3.6b opens two windows when opening external links
    (please do not comment in bug reports)

  • How to stop the dock from showing all hidden images when hiding then showing applications

    How to stop the dock from showing all hidden images when hiding then showing applications

    It's not really something to snap a screen shot of. I believe it would need to be a video clip. For instance, when I am working on multiple images in Photoshop, I often need many images open at the same time, but I only have one image viewable and active. The hero image is active on screen while I hide the other images in the dock by hitting the yellow - button on the images. Then I "Hide" Photoshop to do something in the Finder. When I go back to Photoshop, every image that is hidden in the dock will pop open again in the active window, not just the image I was currently working on. I want these images to stay in the dock until I need them, no matter how many times I Hide the Show Photoshop.

  • Any one know how to stop iTunes movies from playing menu music when movie is paused?

    Anyone know how to stop iTunes movies from playing menu music when the movie has been paused?

    JourneyMan24 wrote:
    Anyone know how to stop iTunes movies from playing menu music when the movie has been paused?
    Can't. This is done for the individual movie, not by iTunes.
    Some have it, most don't.

  • How can i stop my picture from flipping when I take it on the front camera?

    How can i stop my picture from flipping when I take it on the front camera? Need help as it's frustrating me:(

    Hmm...Double click on the Home button and try to delete the camera app then launch it again that should fix it. You can also turn off your phone and turn it back on again.

  • How to stop an app from auto starting when signing on?

    how to stop an app from auto starting when signing on?

    Several point :
    1st : do you select "auto relaunch" application when you close ML last time? don't do that next time
    2nd : in system preferences/Users and Groups look at applications that are selected for automatic opening. You can remove application. Tab called "Open At Login"
    3rd : have a look at /Library/LaunchDeamons/
    4th : buy Lingon
    Hope it can help

  • Every time I restart my mac air some applications like calendar and Microsoft word automatically starts, how can I stop such applications from starting when ever I restart my mac

    Every time I restart my mac air some applications like calendar and Microsoft word automatically starts, how can I stop such applications from starting when ever I restart my mac?

    One thing to check:  when shutting down or restarting, there is a checkbox in the shutdown/restart dialog which asks whether you want currently open applications to open at startup.
    charlie

Maybe you are looking for

  • Replacing a power supply on a 20" PPC iMac (iSight) - easy?

    I'm pretty sure this is the problem - iMac is dead - nothing happening at all, apart from a VERY feint clicking deep inside somewhere, only heard with ear pressed up against the case. I can see lots of info on how to inside an Intel iMac, but scant d

  • Problem in Installing SAP GUI 6.2 Patch 57

    Hi friends,      Currently we have SAP GUI 6.2 version for Windows with Patch level 32. We need to update with Patch level 57. But, we are ending with an error saying SAP GUI front end needs to be installed. Could anyone please help in resolving this

  • Need help with distcc

    Can someone point me in the right direction on getting a working distcc setup for this layout? (I've used the terms daemon and server from the wikipage: http://wiki.archlinux.org/index.php/Distcc) Server Daemon Server x86_64 i686 Mac Mini (Intel) ubu

  • Exclusion Condition not working properly

    Hi Friends, I have created 2 condition for price and have done the relevant configuration for exclusion. However when i delete one of the condition system does not consider the other. The scenario is as below: Condition1 - A Base Price maintained in

  • Does anyone know if you can unzip a .cab file in mac osx 10.5.8? The file in question is an Excel spreedsheet template. Thank you...

    Does anyone know if you can unzip a .cab file in Mac OSX 10.5.8? I am trying to open an Excel spreed sheet template that was downloaded as a .cab file from office for mac website... thank you