Hey Charlie,

Fx.Tween was not available with MooTools 1.11.

I dug up the documentation for MooTools 1.11 on the website, I think those are the ones you're looking for:

http://docs111.mootools.net/Effects/Fx-Slide.js
http://docs111.mootools.net/Effects/Fx-Base.js#Fx.Base

[code]new Fx.Slide(this.bg_div, { unit: '%', duration: 650, transition: Fx.Transitions.Quad.easeOut, onComplete: this.bgEffectComplete.bind(this) });[/code]

Sadly, there was no property parameter, you should use mode: 'horizontal' instead and set the width of the bg_div element via css, otherwise you cannot use Fx.Slide, you'd have to use Fx.Styles for this. The syntax is about the same, look here for the documentation: http://docs111.mootools.net/Effects/Fx-Styles.js

Then you could use 'width' like so:

[code]
var bgDivEffects = new Fx.Styles(this.bg_div, { unit: '%', duration: 650, transition: Fx.Transitions.Quad.easeOut, onComplete: this.bgEffectComplete.bind(this) });

bgDivEffects.start({
        'width': '80%'
});
[/code]

What is this.bg_div? Is this an element already? Try giving the div an id so you can pass it as a string to Fx.Slide like so:

new Fx.Slide('bg_div_id', { ... });

I hope I could be helpful, post back here if something's not working, I have stopped working with 1.11 a long time ago.

And inheriting old/aged/dated projects is not fun, you have my sympathy for that. :)


Cheers, Daniel

On 2009-10-17, at 17/October, 6:16 PM, charlie-imac wrote:


I've inherited a project that is using MooTools 1.11 and need help
writing a FX.tween from version 1.2.3 to work with 1.11.  Here is the
code that I need help with.  I've read the documentation and seen the
examples for MooTools 1.11 (fx.base, fx.transitions, and fx.styles)
but I still get syntax errors.  Note, I program in PHP and MySql not
ajax.  The effect is suppose to horizontally slide in a div that
covers 80% of the browsers window.  Any help would be appreciated.


new Fx.Tween(this.bg_div, {
        unit : "%", property : "width", duration : 650, transition :
a.easeOut, onComplete : this.bgEffectComplete.bind(this)}
     );


Reply via email to