Tween not a constructor

345 views
Skip to first unread message

cogear

unread,
Jul 8, 2009, 3:39:12 PM7/8/09
to MooTools Users
Everytime I try to use mootools I have trouble. Please help! I am
obviously missing something. Trying to keep it simple here is my code
so far.

<script type="text/javascript">
window.addEvent('domready',function() {
var otherEl = $('dropdown');
console.log(otherEl);
var myEffect = new Fx.Tween(otherEl, {transition:
Fx.Transitions.Quint.easeInOut});
});
</script>

This throws the error:
Fx.Tween is not a constructor

Can anyone please tell me what I am doing wrong?

Thanks

Fábio M. Costa

unread,
Jul 8, 2009, 3:57:46 PM7/8/09
to mootool...@googlegroups.com
What version are you using?


Fábio Miranda Costa
Solucione Sistemas
Front-End Engineer
http://meiocodigo.com

cogear

unread,
Jul 8, 2009, 4:35:50 PM7/8/09
to MooTools Users
version:'1.11'

On Jul 8, 1:57 pm, Fábio M. Costa <fabiomco...@gmail.com> wrote:
> What version are you using?
>
> Fábio Miranda Costa
> Solucione Sistemas
> Front-End Engineerhttp://meiocodigo.com

anutron

unread,
Jul 8, 2009, 4:39:37 PM7/8/09
to mootool...@googlegroups.com
Fx.Tween was called Fx.Style in MooTools 1.11 (if I remember correctly).

On Wed, Jul 8, 2009 at 1:36 PM, cogear (via Nabble) <ml-user%2B245297-1849975313@...> wrote:

version:'1.11'

The MooTools Tutorial: www.mootorial.com Clientcide: www.clientcide.com


View this message in context: Re: [Moo] Re: Tween not a constructor
Sent from the MooTools Users mailing list archive at Nabble.com.

cogear

unread,
Jul 8, 2009, 5:14:42 PM7/8/09
to MooTools Users
Thank you for your help. I guess I was just being dense, I don't know
why I didn't check the version. This solved my problem, but... has
now created more. :-)

Thanks again for you help.

On Jul 8, 2:39 pm, anutron <aa...@iminta.com> wrote:
> Fx.Tween was called Fx.Style in MooTools 1.11 (if I remember correctly).
>
> On Wed, Jul 8, 2009 at 1:36 PM, cogear (via Nabble) <
> ml-user+245297-1849975...@n2.nabble.com<ml-user%2B245297-1849975...@n2.nabble.com>
>
>
>
> > wrote:
>
> > version:'1.11'
>
> > On Jul 8, 1:57 pm, Fábio M. Costa <fabiomco...@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3227867&i=0>>
> > wrote:
>
> > > What version are you using?
>
> > > Fábio Miranda Costa
> > > Solucione Sistemas
> > > Front-End Engineerhttp://meiocodigo.com
>
> > > On Wed, Jul 8, 2009 at 4:39 PM, cogear <cog...@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3227867&i=1>>
> > wrote:
>
> > > > Everytime I try to use mootools I have trouble. Please help! I am
> > > > obviously missing something. Trying to keep it simple here is my code
> > > > so far.
>
> > > > <script type="text/javascript">
> > > > window.addEvent('domready',function() {
> > > >        var otherEl = $('dropdown');
> > > >        console.log(otherEl);
> > > >        var myEffect = new Fx.Tween(otherEl, {transition:
> > > > Fx.Transitions.Quint.easeInOut});
> > > >        });
> > > >  </script>
>
> > > > This throws the error:
> > > > Fx.Tween is not a constructor
>
> > > > Can anyone please tell me what I am doing wrong?
>
> > > > Thanks
>
> > ------------------------------
> >  View message @
> >http://n2.nabble.com/-Moo--Tween-not-a-constructor-tp3227534p3227867....
> > To start a new topic under MooTools Users, email
> > ml-node+660466-1583815...@n2.nabble.com<ml-node%2B660466-1583815...@n2.nabble.com>
> > To unsubscribe from MooTools Users, click here< (link removed) >.
>
> -----
> The MooTools Tutorial:  http://www.mootorial.comwww.mootorial.com
> Clientcide:  http://www.clientcide.comwww.clientcide.com
> --
> View this message in context:http://n2.nabble.com/-Moo--Tween-not-a-constructor-tp3227534p3227885....

moonoob

unread,
Aug 3, 2009, 1:36:56 PM8/3/09
to MooTools Users
I'm having this exact error with MooTools 1.23.

here's my code:

window.addEvent('load', function() {
var slideFx = new Fx.Tween('slider');
slideFx.start('top', 0, '50px');

});

moonoob

unread,
Aug 3, 2009, 1:37:06 PM8/3/09
to MooTools Users

moonoob

unread,
Aug 3, 2009, 1:37:27 PM8/3/09
to MooTools Users

moonoob

unread,
Aug 3, 2009, 1:37:59 PM8/3/09
to MooTools Users
rather, MooTools release 1.2.3

moonoob

unread,
Aug 3, 2009, 1:38:49 PM8/3/09
to MooTools Users
When executing the above code, Firebug invariably tells me " Fx.Tween
is not a constructor"

Aaron Newton

unread,
Aug 3, 2009, 2:50:00 PM8/3/09
to mootool...@googlegroups.com
Can you provide a link?

moonoob

unread,
Aug 3, 2009, 3:23:08 PM8/3/09
to MooTools Users
unfortunately it's all within a private sandbox, but i threw this
together:

http://webization.com/fx/



On Aug 3, 11:50 am, Aaron Newton <aa...@iminta.com> wrote:
> Can you provide a link?
>

moonoob

unread,
Aug 3, 2009, 3:56:09 PM8/3/09
to MooTools Users

Problem solved!

I discovered that the issue was with my copy of moo.fx.js

I'm not quite sure why I have all of these extra-granular moo.*.js
files, when everything I need seems to be in the mootools.js core!

I removed these two lines, and the test works fine =)

<script type="text/javascript" charset="utf-8" src="3p.moo.fx.js"></
script>
<script type="text/javascript" charset="utf-8"
src="3p.moo.fx.transitions.js"></script>

Fábio M. Costa

unread,
Aug 3, 2009, 4:44:02 PM8/3/09
to mootool...@googlegroups.com
You dont need moo.fx.js
You just need this: http://webization.com/fx/3p.mootools.js
remove the others, they are overwriting your Fx object.


--

Fábio Miranda Costa
Solucione Sistemas
Front-End Engineer
http://meiocodigo.com


Fábio M. Costa

unread,
Aug 3, 2009, 7:00:57 PM8/3/09
to mootool...@googlegroups.com
you discovered it yourself? cool...


--

Fábio Miranda Costa
Solucione Sistemas
Front-End Engineer
http://meiocodigo.com


Reply all
Reply to author
Forward
0 new messages