Jump to content
GreenSock

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

TweenPlugin plugins not working

Recommended Posts

I appreciate the flash versions are now unsupported, but where can I ask a question about plugins for TweenLite not working in some instances?

 

Feel free to delete this if no support is available, otherwise let me know and I'll post further details.

 

Thanks.

Link to comment
Share on other sites

We don't actively support the ActionScript versions, but I don't mind reading your question and if I know the answer I'd be happy to share. 

Link to comment
Share on other sites

Excellent, thanks Jack.  It's probably a more general question anyway given the circumstance.  I am creating a complex HUD widget mod for Skyrim, which (and I must have done something very bad in a past life...) uses AS2/Scaleform.  I am importing TweenLite, TimelineLite, Easing, FramePlugin and DirectionalRotationPlugin for use in various animations.  In testing on a load order with relatively few other mods absolutely everything works perfectly, so I know there isn't an issue with the code anywhere or with the plugins.  However, on certain heavy load orders the functions which rely specifically on FramePlugin or DirectionalRotationPlugin fail, the animations just don't happen.  At the same time tweens which do not use them continue to work flawlessly.  I am logging the correct arguments being passed, the tweens just don't run.  So I am just after an understanding as to why, in very specific circumstances, those plugins would fail.  I didn't think it was possible for the contents of my swf to be affected by the contents of any other loaded by the game?  Is it possible if another unrelated swf which uses GSAP is loaded by the game there could potentially be a conflict?

 

As an aside question as well, what is the maximum duration I can pass for a tween?  By that I mean is it possible to tween to over say 1800 seconds for an incredibly slow animation?

Link to comment
Share on other sites

Hm, I'm not sure what to say for that first issue. I wonder if it's maybe an overwriting thing(?). Have you tried setting overwrite:false on those tweens? I'm totally guessing. It's super difficult to troubleshoot blind like this, but I can't think of anything that's specific to those plugins that'd be causing issues.

 

I'd also be curious to see what happens if you make sure you're loading/embedding DirectionalRotationPlugin and FramePlugin in ALL sub-loaded swfs. Like, perhaps sub-loaded ones are hijacking the com.greensock.* namespace. I think there are ActionScript settings you can toggle to ensure that each SWF is sandboxed to avoid anything like that, though I can't quite remember the details. 

 

2 hours ago, dunc001 said:

As an aside question as well, what is the maximum duration I can pass for a tween?  By that I mean is it possible to tween to over say 1800 seconds for an incredibly slow animation?

 

Nah, there's no limit on durations. 1800 should be fine. 

 

Happy tweening!

Link to comment
Share on other sites

Thanks for taking the time to reply. I'll do some more testing and look into the overwrite and sandbox options.

Link to comment
Share on other sites

OK, so further testing confirms that if any other widget which also imports greensock loads ahead of mine that's when the fail happens.  So your theory about the namespace being hijacked seems to hold true.  I had a look in the Publish Settings and the only two settings I can see are the Local Playback Security (currently set to 'Access Local Files Only', other option is 'Access Network Only'), and Protect From Import (currently unchecked) which then asks me to input a password.

 

Other than that is there anything else I can do to force my classes to use a specific version of greensock to make sure the TweenPlugin plugins load and function correctly?  I don't have access to the source files for the other widgets so I can't alter them in any way.

Link to comment
Share on other sites

Yeah, that's more of a Flash Player question, not so much GSAP. A few random guesses to try (if possible): 

  • Use a crossdomain.xml file - See Adobe's docs for details, but here is an example that grants full access (put this in a crossdomain.xml file that is at the root of the remote domain): <?xml version="1.0" encoding="utf-8"?> <cross-domain-policy> <allow-access-from domain="*" /> </cross-domain-policy>
  • In the embed code of any HTML wrapper, set AllowScriptAccess to "always"
  • If possible, in the remote swf make sure you explicitly allow script access using something like flash.system.Security.allowDomain("*");

Not sure LoaderMax will help you at all, but it has a SWFLoader that you could try: http://greensock.com/asdocs/com/greensock/loading/SWFLoader.html

 

Good luck!

Link to comment
Share on other sites

Also, maybe look into the LoaderContext stuff. I remember that being related to this in the Flash Player. 

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.
×