Jump to content
Search Community

TimelineMax Error #1034

pbohny test
Moderator Tag

Recommended Posts

For Flex I have created the following simple tween which I use as a preloader animation.swf.

import com.greensock.*; 
import com.greensock.easing.*;
var timeline:TimelineLite = new TimelineLite();
timeline.append(new TweenMax(mc, 8, {rotation:1440,  ease:Bounce.easeInOut}));
timeline.play();
function onCompleteHandler():void{
timeline.gotoAndPlay(1);
}

 

Suddenly I do get the following error in debugging mode:

 

TypeError: Error #1034: Type Coercion failed: cannot convert com.greensock::TweenMax@-7e2fbfbf to com.greensock.core.TweenCore.

at com.greensock::TimelineLite/forceChildrenToEnd()

at com.greensock::TimelineLite/renderTime()

at com.greensock.core::SimpleTimeline/renderTime()

at com.greensock::TweenLite$/updateAll()

 

Most likly caused by the gotoAndPlay command.

 

I think it used to work (maybe it started with SDK 3.4, I am not sure), where lies the problem. Is it a Flex or a TimelineMax issue?

Link to comment
Share on other sites

  • 11 months later...

Hi,

Maybe this can help cause I think you are overwriting classes :

 

import gs.*;

import gs.plugins.*;

import gs.easing.*;

 

import com.greensock.*;

import com.greensock.easing.*;

 

Try to change the lines of code above and import only:

 

import com.greensock.*;

import com.greensock.easing.*;

 

I had the same error and was for this cause.

 

I hope you can understand, my English is not very good :)

Link to comment
Share on other sites

  • 2 years later...

I'm getting this same error, but with a TimelineMax and TweenCore.

 

I've narrowed it down to loading an external SWF (with a TimelineMax instance) from a different domain/URL. When I load that external SWF locally, it works fine.

 

Is there some cross-domain/casting/conversion thing that's going on?

Link to comment
Share on other sites

Maybe you've got conflicting versions of the tweening engine (like the parent swf has v12 and the child uses v11). Even if that's the case, you should be able to prevent conflicts by defining a different ApplicationDomain in your LoaderContext. Ideally, though, I'd recommend republishing your swfs so that they use the same version of the platform if possible. 

Link to comment
Share on other sites

I don't understand what's going on. I've got 

 

Security.allowDomain("*");

Security.allowInsecureDomain("*");

 

in both SWFs.

 

I tried using this:

 

new LoaderContext( true, new ApplicationDomain( ApplicationDomain.currentDomain), SecurityDomain.currentDomain )

 

as the SWFLoader's "context" init object in the main SWF that's doing the loading

 

Nothing's working. I keep getting the error: "TypeError: Error #1034: Type Coercion failed: cannot convert com.greensock::TimelineMax@3c96cf41 to com.greensock.core.TweenCore."

 

This is driving me crazy and I'm under deadline. :/

Link to comment
Share on other sites

I've discovered something strange....

 

Here's the link where I need it to work:

 

http://dev.option5.net/CNCT/CNCT13009_new/index.html

(Click the play button. This is supposed to load a SlideshowApplication.swf, which is then loading a variety of SWFs, like a BarBannerWidget, which is then loading 3 different banner SWFs. If you have the debug player installed, you'll see 3 errors come up, one for each of the banner SWFs. See the link below to see what it's supposed to look like.)

 

When I throw the SlideshowApplication.swf and all accompanying SWFs on a separate page, it works:

 

http://dev.option5.net/CNCT/slideshow/

 

I even tried moving the SlideshowApplication.swf to another domain of mine to see if it would still work as a standalone cross domain, loading the SWFs from the dev.option5.net domain, and it does:

 

http://www.johnbandy.net/stuff/slideshow/

 

So something about getting loaded into the BannerTimelineApplication.swf is throwing it off somewhere. 

Link to comment
Share on other sites

Have you tried creating a new ApplicationDomain altogether, like:

new LoaderContext(true, new ApplicationDomain())

And passing that as the context? 

 

And do you have a crossdomain.xml file in place that explicitly grants permission? 

 

It's tough to troubleshoot your stuff without having a simple example FLA (or two) and publishing on our end to see what's happening, but it sure sounds like at least one of your SWFs isn't using the same version of GSAP as the other(s). Are you absolutely sure that you republished all swfs involved using the same greensock files? 

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.
×
×
  • Create New...