onmouseover effect is very slow, with delays, and sometimes doesn't work until I click

Posted on 2007-09-28
Last Modified: 2008-01-09
I am using swfobject.js to embed swf files in rows and rows. i have it programmed so that it glows on mouse over, but the glow is often very slow and unresponsive. Sometimes it doesn't turn off after the mouse leaves the area. Sometimes if i quickly move to the next tile, both tiles light up. Sometimes it doesn't glow unless I click it.

I'm using swfobject, and these symptoms are universal on FF and IE, so it's not about the "Click to Activate this control" issue at all.

is the problem page. I tried limiting the # of .swf files repeated in the loop to 8 only, but it still does that. I compared to another site that has similar swf files repeated based on parameter inputs :

That site has no slowdowns, and it works just fine even though it has more listings repeated.

Is this an issue with the way I'm embedding my flash??

<div id="listing_<? echo $home['id'];?>" class="listing">
<div class="hr"></div>
<script type="text/javascript">
      var listing = new SWFObject("listing_fla.swf", "listingswf<? echo $home['id']?>", "847", "248", "8");
      listing.addParam("quality", "high");
      listing.addParam("wmode", "transparent");
      listing.addParam("play", "true");
      listing.addVariable("the_text", "<br/>JUST<br/>LISTED");
      listing.addVariable("headline", "<? echo htmlspecialchars($home['heading'])?>");
      listing.addVariable("desc", "<? echo htmlspecialchars($descvar);?>");
      listing.addVariable("btn_2_url", "#");
      listing.addVariable("btn_3_url", "#");
      listing.addVariable("img_src", "<? echo $settings['sitepath']."homes/".$home['id']."/main.jpg"?>");
      listing.write("listing_<? echo $home['id'];?>");

Or is this something that has to be changed within the flash files? Thanks.
Question by:jeffkee1985
    LVL 34

    Expert Comment

    by:Aneesh Chopra
    problem is the "Fuse" engine implementation for rollover rollout effect..

    just replace following rollover and rollout functions with the folllwoing, all will be working now.
    these code update using Flash default "tween" class for "rollover rollout" effect
    mouseover.onRollOver = function ()
          new mx.transitions.Tween(, "_alpha", mx.transitions.easing.Strong.easeOut,, 100, 1, true);
    mouseover.onRollOut = function ()
          new mx.transitions.Tween(, "_alpha", mx.transitions.easing.Strong.easeOut,, 0, 1, true);

    after this change, you can simply, remove following code also, as following code is not being used anymore..l
    _root.mouseover_check = 0;
    frameLoop = function ()
        var _loc2 = new com.mosesSupposes.fuse.Fuse();
        _loc2.push({alpha: _root.mouseover_check, time: 0.5});
        _loc2.push({func: frameLoop});

    Aneesh Chopra
    LVL 4

    Author Comment

    We made several changes including the above..

    still finicky on scrolls - the old glows will stay on above. And even as the mouse enters, it seems delayed at all times. I keep comparing it to the second link i put up but it still seems like ours is a bit slower..
    LVL 34

    Accepted Solution

    To make it faster and smoother,
    first of all you need to increase the FPS (frame per second) of the FLA, current it is default 12 fps, change it to 30 fps.

    secondly, second last parameter in the Tween class instance is to set the time duration for the animation, currently it is set to 1 second, you may experiment with it to reduce it to 0.5 seconds or less..
    below is the update code with 0.5 seconds duration:

    mouseover.onRollOver = function ()
          new mx.transitions.Tween(, "_alpha", mx.transitions.easing.Strong.easeOut,, 100, 0.5, true);
    mouseover.onRollOut = function ()
          new mx.transitions.Tween(, "_alpha", mx.transitions.easing.Strong.easeOut,, 0, 0.5, true);
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
    This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now