Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Having trouble with scriptaculous effect
Old 07-14-2010, 08:08 AM Having trouble with scriptaculous effect
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
Here is my scriptlet:

Code:
new Effect.Parallel ([ new Effect.Tween($("TickTach"), 1200, 120, "height", {sync: true}), new Effect.Tween($("TickTach"), 1600, 160, "width", {sync: true})], {duration: 1}
);
It throws an object is null error in the Tween function in scriptaculous

Code:
Effect.Tween = Class.create(Effect.Base, {
 initialize: function(object, from, to) {
 object = Object.isString(object) ? $(object) : object;    
 var args = $A(arguments), method = args.last(),
 options = args.length == 5 ? args[3] : null;
 this.method = Object.isFunction(method) ? method.bind(object) :
 Object.isFunction(object[method]) ? object[method].bind(object) :
 function(value) { object[method] = value };
 this.start(Object.extend({ from: from, to: to }, options || { }));  },
 update: function(position) {
 this.method(position);
 }
});
I did run across a "try it yourself" in a tutorial, it did not work either...Anybody aware of a problem?
__________________
Sleeping Troll, EMUSE, Mind Expansion...Truly serendipity!

Last edited by Sleeping Troll; 07-14-2010 at 08:10 AM.. Reason: Clarity
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-14-2010, 09:27 AM Re: Having trouble with scriptaculous effect
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
OK, my bad I had defined the div element as "TickTack", but I am still having problems. I will just cross my fingers that someone can help...

I have a <div> with an <img> the image is large (1600,1200) I want to use scriptaculous to tween it down to 160,120 I can set width and height of <div> to 160 x 120 and <img> to 100%,100% and all is well, but tween will not work...

Please help if you can
__________________
Sleeping Troll, EMUSE, Mind Expansion...Truly serendipity!
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Having trouble with scriptaculous effect
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15758 seconds with 12 queries