Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 12:28 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: hide data path
PostPosted: May 16th, 2008, 4:57 pm 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
I made an online audioplayer and it's working very well but...
is there a way or a script or someting to show just the name of the MP3 file i've load into the player instead of the whole path.
It looks a bit unprofessional and sometimes it's a lot of text for a short title.



Kind regards,

Ad Mulders


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 16th, 2008, 5:39 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Yes,

use this function:

function fname(p)
{
var r = p.split("\\")
return r[r.length-1].substring(0,r[r.length-1].length-4)
}


I've posted the zip on our site because the forum won't let me upload :-(

www.interaktiv.co.uk/temp/fname.zip

Mack


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 16th, 2008, 5:57 pm 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
:roll: Oops... How can i implement it in my script to let it work in my variables?
I put a small piece of the program as a zipfile on my site. Would you look at it?

Kind regards,

Ad Mulders

www.freeacademy.nl/player.zip


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 16th, 2008, 10:21 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
OMG - that's a lot of actions for a non-scripted solution!

Because of the way you have built this, the i1..9 variables need to maintain the path to pass the video object. Therefore, the easiest solution is to add a script object to a page and include the function I wrote.

Then in those bright red text boxes where you have insert the "i" variables do the following:

1. double click the variable to display the "insert variable or expression box"

2. Switch to expression and enter fname(i1)

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 17th, 2008, 7:20 am 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
Thanks for you reaction,
That works great !! http://www.freeacademy.nl/eventplayer.htm

I made this 'thing' in 2004 with Opus Pro XE and was a test for me to see how far i could come with an app like this.
I made it as a TV director not as a software expert.
Maybe i am gonne set up a new (complete script based) one... with less actions.

Kind regards,

Ad


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 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