Jump to content

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

go to next scene? [RESOLVED]

Recommended Posts



I tried searching the forum and modifying something that was already there, but it doesn't appear to be working.


At the end of a series of Tweens, I want this to to to the next scene:

TweenMax.to(stateOutline, .5, {alpha:0, delay:14.5, onComplete:stateOutline.gotoAndPlay(1, "Nav01intro")});


but it doesn't go and throws an error? Maybe this can't be done?


I tried doing all this using timelineMax, but for some odd reason the animation wouldn't work. I'm just hammering this out line by line for now.




Link to comment
Share on other sites

try this:


TweenMax.to(stateOutline, .5, {alpha:0, delay:14.5, onComplete:goNextScene});

function goNextScene(){
     stateOutline.gotoAndPlay(1, "Nav01intro")


for the onComplete property it is best to pass in the name of a function and not try to define a function there.



Link to comment
Share on other sites

Thanks Carl-I think however the greensock code may not understand this? Check out this screenshot attached. I'm getting a bunch of atcom errors, and it's telling me my scene was not found, but clearly you can see it's therepost-6318-133152001646_thumb.jpg:



ArgumentError: Error #2108: Scene Nav01intro was not found.









Link to comment
Share on other sites

ok, so just to note, I was able to get this resolved by using TimelineMax, although I'm curious if there is in fact a way to do it without that.


There must have been a bug in my last timelinemax because it's working now... no errors thrown and didn't work is interesting though.

Link to comment
Share on other sites

i'm glad you got this resolved and updated the post, although it is puzzling that TimelineMax somehow fixed it.

I also don't see how the screenshot proved the existence of a scene that was supposedly missing and causing an error.

very strange. I wonder, is stateOutline something that is even capable of having a "scene"?


i'm happy that you got it working!

Link to comment
Share on other sites

Hi Carl,


if you scroll to the right, you will see that there is in fact the scene there. gotoAndPlay works fine with timeline, but that code for some reason didn't work just using TweenMax. Not sure why, but I also don't know enough about the interaction of the actionscript with the scene.

Link to comment
Share on other sites

doh. i thought the scroller was part of the image :o

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.