Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
learner_7n

Please help me with this error: 1048: Method cannot be used as a constructor.

Recommended Posts

Hi,

 

I am getting the following error:

 

1048: Method cannot be used as a constructor.

 

The following is the code:

 

var timeline1:TimelineMax = new TimelineMax();

timeline1.append(new TweenMax.fromTo(HLineTop1, 2, {x:10, y:10, alpha:.5}, {x:10, y:10, alpha:1, delay:1, ease:Strong.easeOut}));

 

Thanks.

Link to comment
Share on other sites

You can't do this part:

 

new TweenMax.fromTo

 

You can't create an instance of a method. That just doesn't work.

Link to comment
Share on other sites

thanks Dieter.

 

just to clarify for learner_7n, remove the word new

Link to comment
Share on other sites

Thanks for your kind reply.

 

Regards.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×