Jump to content
Search Community

TimelineLite.currentProgress in V12??

rob_v_5712 test
Moderator Tag

Recommended Posts

I have been going thru a few tuts on TimelineLite and Max. 

Specifically the Video3_Demo_Source_Files found here :

http://active.tutsplus.com/tutorials/animation/timelinelite-ultimate-starter-guide-advanced-sequencing/

 

I used the v12 of greensock and when I try to publish I get some errors.

 

1119: Access of possibly undefined property currentProgress through a reference with static type com.greensock:TimelineLite.
 
1168: Illegal assignment to function timeScale.
1168: Illegal assignment to function reversed.
1168: Illegal assignment to function paused.
 
Are there any docs that show what those props have changed to in v12?
 
Thanks
 
 
 
 

It looks like in v12 currentProgress is no longer around.  

 

Link to comment
Share on other sites

Check out http://www.greensock.com/v12/ where we provided a detailed list of the things that changed in v12. All the features are still there - it's just that a few got renamed for simplicity (like currentProgress is now progress) and the properties changed to methods for easier chaining and better compatibility with languages like JavaScript. Trust me - these are all positive changes.

 

So timeScale is now timeScale(). reversed is now reversed(). paused is now paused(). currentProgress is progress() and currentTime is time(). The methods can serve as getters or setters. So you can get the progress with progress() and to set it, you just pass a value like myTimeline.progress(0.5). 

 

I think once you spend a little time with v12, you're gonna see how much more refined it is than v11 and you'll love it. 

Link to comment
Share on other sites

I already love some of the new features I have seen in 12.  The timelineLite stuff is just killer.

 

Here is kind of an related question.  Last year I created a swf player, basically a standalone player that would play swfs read from an XML file.

I never had any issues w/ it.

 

That is until right now.  It seems that any of the files that I publish w/ 12 cause the player to break during the loading phase of things.  When I say break - I mean just a hard crash - the swf just goes away.

I will try to put together a small demo so you can see what I mean - but can you think of any reason it would do that?

Link to comment
Share on other sites

My best guess is that you're loading swfs that have old versions of GreenSock classes into the same ApplicationDomain that has newer ones (or visa-versa). Have you tried defining a LoaderContext with a different ApplicationDomain? Of course if it's at all possible, I'd strongly recommend re-compiling your old swfs with the new GreenSock stuff, but I realize that may not be feasible. 

Link to comment
Share on other sites

Thanks for the suggestion of the ApplicationDomain.  Im just having some issues as to how to get it to work, or more specifically where it should live.

 

Most of the examples Im seeing us something along these lines :

 

var appDomain:ApplicationDomain = new ApplicationDomain();
var context:LoaderContext = new LoaderContext(false, appDomain);
var loader:Loader = new Loader();
loader.load(new URLRequest("myButtons.swf"), context);
 
Im using an XML file that has a list of SWFLoaders in it.
 
 
var slideListXmlLoader:XMLLoader = new XMLLoader(slideListXmlLocation, {maxConnections: 5, prependURLs: "assets/swfs/", container: mainSwfContainer, onComplete: slideListCompleteHandler, onChildProgress: slideListChildProgressHandler, onChildOpen: slideListChildOpenHandler, onChildComplete: slideListChildCompleteHandler, onOpen: slideListOpenHandler, onInit: slideListInitHandler});
 
slideListXmlLoader.load();
 
xml file:
 
<?xml version="1.0" encoding="iso-8859-1"?>
<data>
  <SWFLoader name="swf_0" url="163_01.swf" estimatedBytes="800000" load="true" autoPlay="false" width="980" height="555" x="1" y="1" crop="true" />
  <SWFLoader name="swf_1" url="163_02.swf" estimatedBytes="800000" load="true" autoPlay="false" width="980" height="555" x="1" y="1" crop="true" />
  <SWFLoader name="swf_2" url="163_03.swf" estimatedBytes="800000" load="true" autoPlay="false" width="980" height="555" x="1" y="1" crop="true" />
  <SWFLoader name="swf_3" url="163_04.swf" estimatedBytes="800000" load="true" autoPlay="false" width="980" height="555" x="1" y="1" crop="true" />
</data>
 
Any help would be great.
Link to comment
Share on other sites

Normally you'd just create the LoaderContext and pass it directly to the SWFLoader in the vars, like SWFLoader("file.swf", {context:new LoaderContext(...)}) but since you're defining things in XML, that makes it slightly more tricky. However, we thought of that too, so you can use the "context" special property in your XML and define it as "own" or "separate" or "child". See the docs at http://api.greensock.com/as/com/greensock/loading/XMLLoader.html where it says...

XMLLoader recognizes a few additional attributes for dynamically-created loaders that are defined in the XML:

...

context="child | separate | own" - Only valid for <SWFLoader> loaders. It defines the LoaderContext's ApplicationDomain (see Adobe's LoaderContext docs for details). "child" is the default.

  • Like 1
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...