Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 ASP ActiveX Objects
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Philnguyen44
Junior Member

164 Posts

Posted - 30 December 2004 :  19:44:29  Show Profile  Visit Philnguyen44's Homepage  Send Philnguyen44 an AOL message
Hi, I am having a problem with an ActiveX DLL I'm making in Visual Basic. I am trying to make the server play music. The Problem is that I cannot get the music to start playing. Here is my code:

Public SongName As Variant
Function Play(SongName) As String
Form1.MP.openPlayer ("M:\" & SongName)
End Function

and the asp Code is this:
create.serverobject("PlayMusic.PlaySong")
MPlay.Play("test.mp3")

I put the WIndowsMedia Player Object into a Form but it doesn't play the music when I load the asp page. What am I doing wrong?

http://www.coasterfuel.com

Doug G
Support Moderator

USA
6493 Posts

Posted - 30 December 2004 :  22:51:17  Show Profile
Any errors?

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

Philnguyen44
Junior Member

164 Posts

Posted - 30 December 2004 :  22:58:52  Show Profile  Visit Philnguyen44's Homepage  Send Philnguyen44 an AOL message
The Error I get is:

SongServer (0x800A01A8)
Object required
/Music.asp, line 3

Line 3 is:
MPlay.Play("test.mp3")

http://www.coasterfuel.com
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 31 December 2004 :  01:58:20  Show Profile  Visit muzishun's Homepage
I'm not an expert, but it looks like you might need to change this:
create.serverobject("PlayMusic.PlaySong")
MPlay.Play("test.mp3")

to this:
Set MPlay = Server.CreateObject("PlayMusic.PlaySong")
MPlay.Play("test.mp3")

I think that's something along the lines of creating the object, though I have no idea about getting the media to work with it, so I can't help ya there.

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

Philnguyen44
Junior Member

164 Posts

Posted - 31 December 2004 :  10:17:39  Show Profile  Visit Philnguyen44's Homepage  Send Philnguyen44 an AOL message
yea, its been like that I just forgot to put that in while I was typeing. I just noticed also.

http://www.coasterfuel.com
Go to Top of Page

Philnguyen44
Junior Member

164 Posts

Posted - 31 December 2004 :  10:25:18  Show Profile  Visit Philnguyen44's Homepage  Send Philnguyen44 an AOL message
Now I don't get any errors, it just doesn't play.

http://www.coasterfuel.com
Go to Top of Page

Philnguyen44
Junior Member

164 Posts

Posted - 31 December 2004 :  15:25:27  Show Profile  Visit Philnguyen44's Homepage  Send Philnguyen44 an AOL message
Does anyone have an Idea of how do something like this? I'm using the WMP plugin for Visual Basic, it doesn't give me an error but it won't start playing the song.

http://www.coasterfuel.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07