View Full Version : pulsing/animate a bunch of objects
martin
1 Feb 2007, 11:56 AM
I'm looking for help with animations. I've looked through the docs on actors and automators, but I don't understand how to use which one and when.
I have a button that should visually draw attention to one or more items on the page.
When user clicks on the button I want to pulse (or flash...) all these items together more or less simultaneous.
Should the button be an automator? Or do I even need an automator for this?
Are the items that should pulse actors?
So far I've got a click event attached to the button and can collect all items with getElementByClassName, but what's the next step.
Thanks in advance..martin
jack.slocum
1 Feb 2007, 4:37 PM
You aren't going to believe how easy it is.
1. Grab the .40 code from SVN.
2. Grab the DomQuery code.
3. Set up selectors to use DomQuery anywhere after you include yui-ext.
Ext.Element.selectorFunction = Ext.DomQuery.select;
This is set up automatically in the next release.
4. Make this call, replacing div.some-class with your selector:
getEls('div.some-class', true).highlight();
That's it. Take a look at the highlight function for more options.
getEls will be replaced in the next release with Ext.select().
martin
1 Feb 2007, 8:04 PM
Is that revsition 121 at http://yui-ext.googlecode.com/svn/?
Or is there a different location for the 0.4 code?
Thanks...martin
tryanDLS
2 Feb 2007, 7:23 AM
SVN is the most current available .40 code. I don't believe DQ is in there. However you can get this from the test page where DQ is compared to jqery and other select methods (from the blog post).
martin
5 Feb 2007, 7:40 PM
Not sure what to do about this problem now.
I pulled the yui-ext 0.40 extension code from the domQuery testing page ( I don't know how to pull the pieces from SVN together into yui-ext.js as well as the domquery wasn't there yet).
Unfortunately it's incompatible with some other script lib that I've been using from before YUI. (Tim Taylor's ToolMan--tool-man.org) However, I can't figure out where this is happening as the error I get in FireBug is inside the obfuscated yui-ext code.
It runs afoul on the third line in here:
if(!Array.prototype.remove){
Array.prototype.remove=function(o){
var _7f=this.indexOf(o); //<-------------------- Why it even get's to this point?
if(_7f!=-1){
this.splice(_7f,1);
}
};
Why it even get's to this point is the question. The js used doesn't include any of the yui-ext code.
Any idea how to track this one down?
Thanks...martin
brian.moeskau
5 Feb 2007, 9:15 PM
This might be one of those things where your time might be better spent on something else until Jack does a proper commit to SVN of all his newest stuff. He's mentioned that a full check-in is imminent (within the next week or so hopefully), after which getting this to work should be pretty simple. Can you wait a few days?
martin
6 Feb 2007, 4:28 AM
Certainly. Thanks for the heads up, looking forward to it...martin
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.