| View previous topic :: View next topic |
| Author |
Message |
koltasi AFC Space Explorer
Joined: 26 Jul 2007 Posts: 11
|
Posted: Thu Jul 26, 2007 4:35 pm Post subject: Placing an ad infront of movie |
|
|
| I would like to play an ad before the main movie like how cnn does where you can't skip the commercial and don't have the play bar until the second movie loads. I was going to try to create 2 scenes and load the ad.flv then have it load scen 2 with the the video player to play after the ad is done. I can't figure out how to get scene 2 to play after the first flv is finished. Any ideas? |
|
| Back to top |
|
 |
wigz AFC Team

Joined: 27 Mar 2007 Posts: 570
|
Posted: Thu Jul 26, 2007 8:00 pm Post subject: |
|
|
You could use the FLV Player's complete event to see when the first video is done playing:
| Code: | function playerCompleteHandler(evnt:Object) {
// go to the next scene
}
myPlayer.addEventListener("complete", playerCompleteHandler); |
Thanks!
~Wigz |
|
| Back to top |
|
 |
koltasi AFC Space Explorer
Joined: 26 Jul 2007 Posts: 11
|
Posted: Thu Jul 26, 2007 8:05 pm Post subject: |
|
|
I am not an action script guru. where would I put this code?
Thanks!
| wigz wrote: | You could use the FLV Player's complete event to see when the first video is done playing:
| Code: | function playerCompleteHandler(evnt:Object) {
// go to the next scene
}
myPlayer.addEventListener("complete", playerCompleteHandler); |
Thanks!
~Wigz |
|
|
| Back to top |
|
 |
wigz AFC Team

Joined: 27 Mar 2007 Posts: 570
|
Posted: Thu Jul 26, 2007 10:01 pm Post subject: |
|
|
Make sure your player in scene one has a instance name "myPlayer" then place this code on the timeline in it's own layer on the same frame as your first player instance. Thanks!
~Wigz |
|
| Back to top |
|
 |
koltasi AFC Space Explorer
Joined: 26 Jul 2007 Posts: 11
|
Posted: Thu Jul 26, 2007 10:32 pm Post subject: |
|
|
YOU ROCK!!!!!!!!!
Is there a way to make it work like your Embeddable FLV Player that you just released a few days ago? I like the image and play button feature as well as being able to embed files easier. Is this possible?
Thanks for all your help!
| wigz wrote: | Make sure your player in scene one has a instance name "myPlayer" then place this code on the timeline in it's own layer on the same frame as your first player instance. Thanks!
~Wigz |
|
|
| Back to top |
|
 |
wigz AFC Team

Joined: 27 Mar 2007 Posts: 570
|
Posted: Fri Jul 27, 2007 7:30 pm Post subject: |
|
|
koltasi,
That's a version of the player that we customized specifically for the plugin.
The code that we used is posted here: http://www.afcomponents.com/forum/viewtopic.php?t=940
If you want to try to customize your player, let me know if you have any specific questions. Thanks!
~Wigz |
|
| Back to top |
|
 |
firewire AFC Member
Joined: 02 Aug 2007 Posts: 5
|
Posted: Thu Aug 02, 2007 11:03 am Post subject: help |
|
|
i tried using this method and i cant seem to get it to work, the text on scene two just flashes when i preview.
any ideas? |
|
| Back to top |
|
 |
wigz AFC Team

Joined: 27 Mar 2007 Posts: 570
|
Posted: Thu Aug 02, 2007 5:11 pm Post subject: |
|
|
Do you have a call to the stop(); function on the first frame of both scenes? You could just use one instance of the player with out scenes and do it like this:
| Code: | function playerCompleteHandler(evnt:Object) {
evnt.target.content = {path:"new_video.flv", title:"My New Video"}
}
myPlayer.addEventListener("complete", playerCompleteHandler); |
Thanks!
~Wigz |
|
| Back to top |
|
 |
|