Flash Movie Videos Keep Playing

Posted on 2011-09-29
Last Modified: 2012-08-13

I am a newbie at Flash.  I am helping a customer add a Flash banner with 3 videos to their website.  Basically, users should be able to click on a button and go to play a specific video.  Now, when I publish it and post it to the site, the skin is missing for the video player AND if you do not wait for the video to finish it will switch videos without killing the sound for the previous video.  

Any help would be greatly appreciated!  Help me, Obi Wans.

Here is the link:
Question by:hydrazi
  • 7
  • 5
LVL 39

Expert Comment

ID: 36815237
hey some info please.
1. you're mentioning a skin so i'm guessing you're using the flv playback component?
2. regarding the skin, make sure the swf file for the skin when published is in the same location as the swf file (the name depends on the options you selected)
3. you're using AS2/AS3?
4. what is the code you're currently using to move to the next video.
5. are you using a new component for each video or simply swapping out the content?


Author Comment

ID: 36815296

1.  Yes, using the FLVplayback component.
2.  I believe that it is, but I will check to be sure!
3.  It is ActionScript 3
4.  Currently, I am just adding a GoToAndPLay.  
5.  Using a new component for each video.  Is that part of the issue?  If so, I am unsure how to use scripting to switch video.

LVL 39

Expert Comment

ID: 36815748
the flvplayback component has a content property.

yourplaybackname.content = "flvfilename.flv";

so instead of gotoAndPlay, simply swapping the  content when you do the switch should do the trick.

Author Comment

ID: 36815782
I am not sure how to select the FLVPlayback component to change the property.  
LVL 39

Expert Comment

ID: 36815866
no just put the playback on the stage (single key frame)

then give it an instance name lets say myFLVPlayer

then I'm assuming you're not using classes etc and putting code directly on the time line so in the frame you can set the first video

myFLVPlayer.content = "firstvideo.flv";

then where you're currently saying gotoAndStop change it to myFLVPlayer.content=  "secondvideo.flv";


Author Comment

ID: 36816031
I believe I am using classes as I cannot seem to select the FLVPlaybackComponent.  I used the "Import Video" wizard.
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

LVL 39

Expert Comment

ID: 36816060
ok dude, if you're not sure what you're doing then you'll need to upload your files.

leave the flv files for now, let's start with the fla and your document class.

Author Comment

ID: 36816126
Many thanks!  I will upload it.  Please be kind, this is my first flash project. :)
I believe it is a little over-encumbered.  I tried uploading it, but it said it was not an allowed extension, so I put it here:
LVL 39

Expert Comment

ID: 36816164
ok its a cs5 file , i'll have to look at it later, don't have cs5 on this machine.
i'm assuming you're following a tutorial of sorts?
it would tell you what steps to follow etc,  - if you are post the link


Author Comment

ID: 36816190
No, I am not following a tutorial.  Just bits and pieces of info from different places.
LVL 39

Accepted Solution

blue-genie earned 500 total points
ID: 36816892
Ok, first of all, you are NOT using classes.
not sure if you're wanting to eventually learn flash development or if you're just wanting to do a once off thing but, first of all, you're NOT using classes.

if you want to understand classes - google Document Class in Flash AS3.
then if you go to frame 440 that's where you stop with the four buttons and the flvplayback.
change your file as follows
give your flvplayback an instance name. an instance name allows you to target it.
(layer 4) - then you don't need all the subsequent frames after this.
you said you were using gotoandPlay code - i can't find that but change your code so that each time they click on of those thumbnails it  changes the content of the flvcomponent.

for that you'll use addEventListener and the Mouse click event.

again if you dont' know how to do that,familiarise yourself with event handlers - there are hundreds of tutorials online.
to make things easier i'd suggest you for now start by creating 4 different functions for each button, when you get that right, you can look at using case statements.

psuedocode ...
buttonname.addEventListener(MouseEvent.Click, functionName);

function functionName(e:MouseEvent):void
    yourflvcomponentinstancename.content = "yourflvfilename";

if you want it to automatically start playing a video when it reaches that frame simply put the code on the frame as well as follows
  yourflvcomponentinstancename.content = "yourflvfilename";

LVL 39

Expert Comment

ID: 36817177
take it you're sorted then? if not please shout.
unlike some other people on this platform, I don't believe in doing the work for someone, i rather try and help with getting someone to understand and learn, that's how I learned,
i'm also terrible at explaining thing (my bf will vouch for that) - so please let me know if you need further assistance.

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
FLV versus SWF 11 263
Action Script commands 5 229
Failed download 57 535
Cannot install Adove Flash player on Windows 2012R2 6 92
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now