Advanced Flash Components
Search!
Search!
Home >  Forum
  SearchSearch   
Placing an ad infront of movie

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> FLV Player
View previous topic :: View next topic  
Author Message
koltasi
AFC Space Explorer


Joined: 26 Jul 2007
Posts: 11

PostPosted: Thu Jul 26, 2007 4:35 pm    Post subject: Placing an ad infront of movie Reply with quote

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
View user's profile Send private message
wigz
AFC Team


Joined: 27 Mar 2007
Posts: 570

PostPosted: Thu Jul 26, 2007 8:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
koltasi
AFC Space Explorer


Joined: 26 Jul 2007
Posts: 11

PostPosted: Thu Jul 26, 2007 8:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
wigz
AFC Team


Joined: 27 Mar 2007
Posts: 570

PostPosted: Thu Jul 26, 2007 10:01 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
koltasi
AFC Space Explorer


Joined: 26 Jul 2007
Posts: 11

PostPosted: Thu Jul 26, 2007 10:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
wigz
AFC Team


Joined: 27 Mar 2007
Posts: 570

PostPosted: Fri Jul 27, 2007 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
firewire
AFC Member


Joined: 02 Aug 2007
Posts: 5

PostPosted: Thu Aug 02, 2007 11:03 am    Post subject: help Reply with quote

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
View user's profile Send private message
wigz
AFC Team


Joined: 27 Mar 2007
Posts: 570

PostPosted: Thu Aug 02, 2007 5:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> FLV Player All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group