Skip navigation
nholmes322
Currently Being Moderated

CS5 Video Clip no longer auto plays

Jul 18, 2012 5:54 AM

Hi,

 

 

I have a video player that I'm creating in Flash -- my video clips are on different scenes and I wanted a "menu" bar to allow the viewer to pick which scene they wanted. I found tutorials for various scrolling thumbnail menu bars and I eventually found a code which allowed me to click from scene to scene.

 

 

However, now that the menu bar works, the video clips do not automatically play anymore and I'm not sure why.

 

 

This is the link to my file: http://www.mediafire.com/?y7oofbwg444lnp8

 

 

I only have one action script on the scene, which is the top layer that has [AS]stop();[/AS]

 

 

I have two buttons on either side of the video clip:

[AS]on (press) {

          nextScene(); play();

}[/AS]

 

 

[AS]

on (press) {

          gotoAndPlay("SI", 1);

 

 

}

[/AS]

 

 

This is the coding for the scrolling menu bar:

 

 

Frame 1:

[AS]// Photoscroller 2.0

// Original Author: Barry Driessen

// E-mail: barry@e-factory.

// Upgraded by: Rob Gungor

// Email: robgungor@mac.com

// I don't care if u use this thingy, you don't have to

// give me credit for it. Just knock yourself out with it!!

//

// If you like it or have suggestions, just drop me an e-mail!

//

// **stupid people tip**

// to use this scroller as is --

//copy all the frames in the timeline (by right/(control //for mac) click, copy frames)

//then right click on your timeline  and paste frames

//

//sorry if that is insulting, but when I first started this stuff, I was dumb too :-)

//

// Okay... First let's set some variables......

//

// Xphoto = startposition of the scoll image

xphoto = 258;

//

// Widthmovie = This variable hase to be set to the

// same amount of the moviewidth

widthmovie = 325;

//

// Scrollspeed = The scollspeed of the image (high numbers result in slow scrolls 10=average)

scrollspeed = 25;

//

// widthphoto = the width of your scrollable image in pixels

widthphoto = 2116;[/AS]

 

 

Frame 2:

[AS]// Setting the xmouse to 0 in the centre of the movie:

xmouse = _xmouse - (widthmovie / 2);

// Setting the speed:

speed = (xmouse) / scrollspeed;

// If the speed is negative, the speed will be made positive here:

if (speed < 0) {

          speed = -(speed);

}

 

 

//new function courtesy of Rob

//basically says that if the mouse isn't betwen these two y points it won't work

//**stupid people tip**

//make sure that you figure out the top and bottom y points of your "photo" and insert them accordingly!

mouseposition = getProperty("/myself", _y);

if (_ymouse < 330) {

          speed=0;

}

 

 

if (_ymouse > 390) {

          speed=0;

 

 

}

 

 

// If the mouse moves to left, the photo will scroll to the right:

// (That makes sense.... Doesn't it!! ;-)

if (xmouse < 258) {

          xphoto = xphoto + speed;

}

// If the mouse moves to the right, the photo will scroll to the left:

if (xmouse > 258) {

          xphoto = xphoto - speed;

}

 

 

 

 

// Checking for the left end of the image:

if (xphoto > 258) {

          xphoto = 258;

}

// Checking for the right end of the image:

if (xphoto < -(widthphoto - widthmovie)) {

          xphoto = -(widthphoto - widthmovie);

}

// Placing the moviclip (photo) on it's new postition:

setProperty("photo", _x, xphoto);

[/AS]

 

 

[AS]gotoAndPlay (2)

 

 

 

 

 

 

// make sure this clip this in your movie when you copy it. 

//

//**last stupid people tip**

// if you copy these frames into any other frames other than 1, make sure you change the frame that it repeats (ie. if you copy these 3 action frames into 5,6,7 "gotoAndPlay (6)")--

///ok duh-i know. :-)

//

//

// The mouseovers are quite simple. Just open the Movieclip "MouseOver"

// to see how it works...

//

//

//                                       Have fun!!!!!

//**i realized that it's more fun when drinking beer.

//-rg

[/AS]

 

 

Then inside the thumbnail, to make it serve as a button:

[AS]on (rollOver) {

          button2.gotoAndPlay(2);

}

 

 

on (rollOut) {

          button2.gotoAndPlay(16);

}

 

 

on (release) {

          // You can assign an actionscript to each Button in here:

          _level0.gotoAndPlay("my_target1");

 

 

}[/AS]

 

 

Thanks!

 
Replies
  • kglad
    61,994 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2012 6:24 AM   in reply to nholmes322

    you have a lot of coding problems.

     

    do any of your goto's work correctly?

     
    |
    Mark as:
  • kglad
    61,994 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2012 7:04 AM   in reply to nholmes322

    what are you calling video clips?  flv's that are played in flvplayback components?

     
    |
    Mark as:
  • kglad
    61,994 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2012 8:24 AM   in reply to nholmes322

    have your enabled the autoPlay property of your components?

     
    |
    Mark as:
  • kglad
    61,994 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2012 11:05 AM   in reply to nholmes322

    go to the keyframe where you have one of your non-playing flvplayback instances, click to select the component and in the components parameter panel there is a checkbox for autoPlay.  check it and retest.

     
    |
    Mark as:
  • kglad
    61,994 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2012 12:40 PM   in reply to nholmes322

    then don't use nextScene() or prevScene.  use gotoAndPlay().

     
    |
    Mark as:
  • kglad
    61,994 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2012 1:51 PM   in reply to nholmes322

    you need to remove:

     

    gotoAndPlay (2)

     

    so your video can play.  you've embedded your flv into your timeline so it only plays when the timeline plays and that goto is preventing the timeline from playing.

     

    of course, if you remove that the thumbnail code won't work.

     

    bottomline:  your project code is a mess and using an flv in a timeline is not what you should be doing.

     

    you should have no code attached to objects, no frame loops and no flvs embedded in a timeline.  you should attach your code to a timeline, user an enterframe loop and use an flvplayback component to play your flv(s).

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points