?
Solved

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

Posted on 2007-09-28
5
Medium Priority
?
272 Views
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.

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.
0
Comment
Question by:jeffkee1985
  • 2
4 Comments
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 19977097
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
-------------------
0
 
LVL 4

Author Comment

by:jeffkee1985
ID: 19982441
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..
0
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 2000 total points
ID: 19982897
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(_root.bg, "_alpha", mx.transitions.easing.Strong.easeOut, _root.bg._alpha, 100, 0.5, true);
};
mouseover.onRollOut = function ()
{
      new mx.transitions.Tween(_root.bg, "_alpha", mx.transitions.easing.Strong.easeOut, _root.bg._alpha, 0, 0.5, true);
};
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20212405
Forced accept.

Computer101
EE Admin
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

571 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