Link to home
Create AccountLog in
Avatar of jeffkee1985
jeffkee1985

asked on

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

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.

http://www.tedkwon.com/main.php

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 :

http://www.lesliemiletich.com/soldlistings.html

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>
<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'];?>");
      </script>



Or is this something that has to be changed within the flash files? Thanks.
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

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(_root.bg, "_alpha", mx.transitions.easing.Strong.easeOut, _root.bg._alpha, 100, 1, true);
};
mouseover.onRollOut = function ()
{
      new mx.transitions.Tween(_root.bg, "_alpha", mx.transitions.easing.Strong.easeOut, _root.bg._alpha, 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.__set__target(_root.bg);
    _loc2.push({alpha: _root.mouseover_check, time: 0.5});
    _loc2.push({func: frameLoop});
    _loc2.start();
};
frameLoop();
---------------------


-------------------
Aneesh Chopra
-------------------
Avatar of jeffkee1985
jeffkee1985

ASKER

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..
ASKER CERTIFIED SOLUTION
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Forced accept.

Computer101
EE Admin