Jump to content
GreenSock

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

TweenMax not working in nested loaded SWFs

Recommended Posts

Hi,

 

I am making a small tool to save pngs from AS2 banners at intervals that are determined by the loaded clip.

 

Since AS2 can not save a PNG and also not communicate with AS3 directly. I made a simple shim file that uses GSkinners SWFBridge. This file is loaded into my AS3 file loads the AS2 swf and manages the communication. Unfortunately I can't load the bridge into my AS2 file directly due to file size constraints.

 

AS3 File

   -AS2 Shim

      -AS2 Banner

 

My problem is that the AS2 files that are loaded by my shim run except for TweenMax. 

 

Is anyone aware of any constraints that could cause this problem.

Link to comment
Share on other sites

Hi,

 

I'm really not exactly sure (as I'm not at all familiar with this type of usage), but before pursuing it further with the team it would help to know:

 

Is the AS3 File using GreenSock code?

 

Are the Shim and Banner both using GreenSock code? And if so are they both compiled using the same version?

 

Are you getting any errors?

 

This type of usage is not something the platform was designed support (running 2 language versions in the same player dependent on third-party shim) but if there is anything that comes to mind as far as tips to get around it, we will do what we can to help.

Link to comment
Share on other sites

The only file that needs to use greensock code is the second as2 swf. And that's the one where it just gets ignored. No errors and other AS code in this swf runs fine.

 

I can post a simple example on Monday.

Link to comment
Share on other sites

Hi I opened up your package of many files

  • I opened SWF2Fallback.html
  • I clicked the load banner button
  • I chose BannerAS2.swf
  • It ran fine
  • I clicked the make screenshot button
  • I then saved the screenshot as a png

Everything appeared to work fine. Is there another file I'm supposed to be looking at?

Link to comment
Share on other sites

The red dot in the middle should move to the left side.

 

The green and blue are just normal tweens to see if the timeliness is playing.

 

There are also some traces on the loaded clips timeline to test if code will be executed.

 

If you have a look at the BannerAS3.swf you can see this red dot move to the side.

 

It does work when the BannerAS2.swf directly into the swf2fallback.swf but them I have no way to communicate with the loaded file.

Link to comment
Share on other sites

The only other thing I could suggest is to call TweenNano._jumpStart(); after it loads. There are some very funky things in the way Flash AS2 things load and initialize, and the _jumpStart() method can cut through some of that. Other than that, Carl is right - this is using a 3rd party tool from 2007 in a technology that Adobe itself ditched years ago, so I'm not surprised things are a bit flaky. I wish I had an easy answer for you. 

  • Like 1
Link to comment
Share on other sites

Hi,

 

I would love to ditch this code myself but the banners we are working on are for a very broad international market and some countries in southern Europe and asia never updated their ad servers for AS3. I also don't think that they ever will and within the next 2 years everything will convert to HTML.

 

Thanks a lot for the support! Your tip with TweenNano._jumpStart(this); did the trick with the addition of this.

  • Like 2
Link to comment
Share on other sites

As I said this works great when with the v12 of the classes but is there also a way to do this with v1.06. It would be nice to use the older classes because they are ca. 1kb smaller. 

Link to comment
Share on other sites

Not that I know of, no. Sorry. Feel free to implement the same sort of jump-start technique that we added in v12 if you'd like (literally edit the v1 TweenNano file). But that'd add kb of course :)

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