Jump to content
Search Community

Stumped on gotoAndPlay issue

SarasotaSam test
Moderator Tag

Recommended Posts

First, thank you for TweenLite/Max. It has helped me put together a very polished slide show.

 

My issue is this: All of my slides are bitmap images except one video that is a few seconds long (solomon_two_mc). When the script for the video is called, it has already played when it appears. As I said it is only a few seconds long. For the life of me I have not been able to figure out how to have it play after it appears on the stage.

 

Here is the script beginning with the slide before the video (solomon_two_mc).

 

animateArtistsExpandEleven ()
function animateArtistsExpandEleven ()
{
TweenMax.to(freeman_mc, 1, {autoAlpha:1, x:302, y:240, scale:1, repeat:1, yoyo:true, repeatDelay:4,
								onComplete:animateArtistsExpandTwelve});
}
function animateArtistsExpandTwelve ()
{
TweenMax.to(solomon_two_mc, 3, {autoAlpha:1, x:302, y:240});
}

 

Thanks in advance for your help - Sam

Link to comment
Share on other sites

Your video is embedded in a MovieClip? Or are yous streaming it in as a NetStream?

 

If it's just embedded in a MovieClip, you could add a stop() on the first frame and then a gotoAndPlay(2) call just before your alpha tween:

 

function animateArtistsExpandTwelve ():void  {
   solomon_two_mc.gotoAndPlay(2);
   TweenMax.to(solomon_two_mc, 3, {autoAlpha:1, x:302, y:240});
}

 

If you're still having trouble, please post a simple FLA that demonstrates the issue in as simple a manner as possible (a lot depends on how you've set things up in your FLA, so it's tough to troubleshoot without seeing it)

Link to comment
Share on other sites

Thanks for your quick response.

 

The structure of the Flash is I have an image on each layer, so only Frame one is being used.

If I run the script you gave me and just show the short movie, the movie plays:

function animateArtistsExpandTwelve ():void 
{
solomon_two_mc.gotoAndPlay("solomon_video");
TweenMax.to(solomon_two_mc, 3, {autoAlpha:1, x:302, y:240});
}

 

When I run a script with the bitmap image before the movie, the movie appears, but looks like it has already played and stopped:

animateArtistsExpandEleven ()

function animateArtistsExpandEleven ()
{
TweenMax.to(freeman_mc, 1, {autoAlpha:1, x:302, y:240, scale:1, repeat:1, yoyo:true, repeatDelay:4,
								onComplete:animateArtistsExpandTwelve});
}
function animateArtistsExpandTwelve ():void 
{
solomon_two_mc.gotoAndPlay("solomon_video");
TweenMax.to(solomon_two_mc, 3, {autoAlpha:1, x:302, y:240});
}

 

I am uploading the solomon_movie.flv as you requested.

 

After this issues is solved, how would I loop the video or have it repeat a few times?

 

Again, thanks so much for your help - Sam

Link to comment
Share on other sites

It's very difficult to troubleshoot without seeing how exactly you set up your FLA. If you still need help, please isolate the issue in a separate FLA and post it here so we can just download it, publish it and see exactly what's going on. (please don't just post your .flv video - we need to see your FLA)

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