Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 8:59 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: MP3 Player with errors
PostPosted: October 27th, 2007, 12:42 pm 
Offline

Joined: February 12th, 2005, 5:27 pm
Posts: 177
Location: Canada
Opus: Pro
OS: Win7
Hi Gals/Guys

I made a MP3 player pub that gets this error " can't play <MP3_1>" now the funny thing is that it works perfect when i test it threw OPUS 6 but when i try and publish it i get that error and then it doesn't work .

1 - i use library search to get mp3 file

2 - i save the search as a vaiable <MP3_1>

3 i have a button with an action to PLAY <MP3_1>

Did i do somehting wrong here ?

Thank for having a look

Al

_________________
-------------------------------------------------------
Win7 AMD +5000 Dual Core with 4 gig ram Geforce 9600 OPUS V7.05 Novice to Scripts/willing to learn , Mp3 Files must be 128kb


Top
 Profile Visit website  
 
 Post subject:
PostPosted: October 27th, 2007, 2:33 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I believe you probably get an error when you publish, because it can't find the file referenced by variable MP3_1??

here is one way which works:-

attach a script to the button which calls a function PlayIt()

and the function is

Code:
function PlayIt()
{
   var MP_2=OpenSound(MP_1)
   MP_2.Play()
}





or you could simply attach the bit in the function to the button script

Code:
var MP_2=OpenSound(MP_1)
   MP_2.Play()


but I always think functions are better, because they are re-usable---personal choice.

Sandy

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: October 27th, 2007, 3:22 pm 
Offline

Joined: February 12th, 2005, 5:27 pm
Posts: 177
Location: Canada
Opus: Pro
OS: Win7
Thanks for the response ,

So does that mean i need to rename my variable ? I must appoligise as i dont understand coding/script .....let me explain more

I have a Pub that runs a dual mp3 players Player 1 = <mp3_1>
Player 2 = <mp3_2>

So i click play and have the script as shown blelow call <mp_2> ??


Al Thanks for your help





sandyn wrote:
I believe you probably get an error when you publish, because it can't find the file referenced by variable MP3_1??

here is one way which works:-

attach a script to the button which calls a function PlayIt()

and the function is

Code:
function PlayIt()
{
   var MP_2=OpenSound(MP_1)
   MP_2.Play()
}





or you could simply attach the bit in the function to the button script

Code:
var MP_2=OpenSound(MP_1)
   MP_2.Play()


but I always think functions are better, because they are re-usable---personal choice.

Sandy

_________________
-------------------------------------------------------
Win7 AMD +5000 Dual Core with 4 gig ram Geforce 9600 OPUS V7.05 Novice to Scripts/willing to learn , Mp3 Files must be 128kb


Top
 Profile Visit website  
 
 Post subject:
PostPosted: October 27th, 2007, 5:05 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Hi,
Sorry if I have confused you.....
You don't need to rename your variables.. when I tried it, I meant to type MP3_1, but mis-typed and my variable was MP_1 :-).

I have attached a pub with two buttons and a text box--the GET button opens the file browse and saves the file name to the MP3_1 variable, the second button PLAY has a two line script attached,

Code:
var MyMP3=OpenSound(MP3_1)
   MyMP3.Play()


the first line creates a variable called MyMP3 and this holds the command to open the file MP3_1

the second line then plays the file.

I'm not sure how you are configuring your dual player?? can you attach what you are trying to do, then I could have a look


You do not have the required permissions to view the files attached to this post.

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 28 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group