|
-
Feb 4th, 2011, 08:37 PM
#1
Thread Starter
New Member
Windows Media Control
Hello,
I'm kinda new to this. Done it a bit a while back, completed a simple conversation program, and started a text game..but decided to take it back up and make a new interaction fiction game with videos..
the thing I'm having a problem with right now is the windows media player control. I make my first intro movie play by placing it's location in the URL property...I'm wondering how you would code it to play the second intro video I have once that one comes to an end..
I may just put the two videos together to make this easier...but in the future I may need to know this information so any help would be greatly appreciated.
thanks,
JB.
-
Feb 4th, 2011, 10:23 PM
#2
Re: Windows Media Control
I don't know the answer to your question but, at a guess, I would say that the WMP control would raise an event when the current media file finishes. If so, you should be able to handle that event and then do for the second file just what you did for the first. I'd suggest that you check out that possibility first.
-
Feb 4th, 2011, 10:31 PM
#3
Re: Windows Media Control
try this:
vb Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim movie1 = AxWindowsMediaPlayer1.newMedia("first_intro_movie.mpg")
Dim movie2 = AxWindowsMediaPlayer1.newMedia("second_intro_movie.mpg")
AxWindowsMediaPlayer1.currentPlaylist.appendItem(movie1)
AxWindowsMediaPlayer1.currentPlaylist.appendItem(movie2)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AxWindowsMediaPlayer1.Ctlcontrols.play()
End Sub
End Class
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Feb 4th, 2011, 10:33 PM
#4
Re: Windows Media Control
Nice one Paul. A playlist makes much more sense.
-
Feb 5th, 2011, 07:23 AM
#5
Thread Starter
New Member
Re: Windows Media Control
Hey, thanks.
I'm gonna see if I can play around with it and figure it out...I'm quite new to this, so I may need some help...I forget most of what I learned last year, lol. I'm sorta like a Jack of all trades, but master of none, lol..everything from rap, to this.
http://www.myspace.com/mystikmusikentertainment
buuut anyway..
this line of code here..
Code:
AxWindowsMediaPlayer1.currentPlaylist.appendItem(movie1)
(movie1) is that replaced with the file path?
-
Feb 5th, 2011, 02:39 PM
#6
Re: Windows Media Control
Dim movie1 = AxWindowsMediaPlayer1.newMedia("filepath")
Dim movie2 = AxWindowsMediaPlayer1.newMedia("filepath")
AxWindowsMediaPlayer1.currentPlaylist.appendItem(movie1)
AxWindowsMediaPlayer1.currentPlaylist.appendItem(movie2)
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Feb 5th, 2011, 07:41 PM
#7
Thread Starter
New Member
Re: Windows Media Control
oh I see movie1 and movie2 are variables...I sorta overlooked the code to quickly, lol..thanks for the help man! I'll report back if I have troubles, lol.
-
Feb 5th, 2011, 07:42 PM
#8
Thread Starter
New Member
Re: Windows Media Control
actually would you call that a variable, or something else?
-
Feb 5th, 2011, 07:45 PM
#9
Re: Windows Media Control
they are variables. they are declared inside a procedure so their scope is limited to use within that procedure. you can also use variables at class or project level if they are declared in the appropriate places.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Feb 5th, 2011, 07:48 PM
#10
Thread Starter
New Member
Re: Windows Media Control
yup, I remember that. I just didn't know where they weren't declaired as integers, floats, or something to that effect what it would be classified as...lol...does it get automatically declaired as something else? lol
-
Feb 5th, 2011, 07:55 PM
#11
Re: Windows Media Control
in vb2008+ you don't need to use As clauses because of Option Infer.
if you want to declare them with As clauses, hover your mouse over the newMedia keyword to get the type
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|