MP3 - getStreamLength - using a virtual path help needed !

Hi to all,
I am trying to get the Stream.length of an MP3 file type but
using also a virtual path that is assigned to the Vhost.XML.
After many tries i only manage to make it work only if the
MP3`s are sitting inside the
FMS_root_directory_applications_myMusicApp into a folder with the
name "streams" wherever else i use the code that i am writing below
it returns "0 seconds" as the Stream.length of every MP3.
In the main.asc i use this code :
application.onConnect = function(newClient, userObject,
name){
if(userObject.userType == "Test_Music"){
newClient.virtualKey = "Music";
newClient.name = name;
newClient.getTheLength = function(streamName) {
trace("The "+streamName+" Total Time is
"+Stream.length(streamName)+" : seconds");
return Stream.length(streamName);
application.acceptConnection(newClient);
In the Fla. file i use this to get the length:
var V_Path:String = "Music/";
var TheSound:String = "MyMp3";
var streamName:String = "mp3:"+V_Path+TheSound;
nc.call("getTheLength", { onResult: Delegate.create(this,
setDuration) }, streamName);
function setDuration(nLength:Number):Void {
trace(nLength + " seconds");
Everything is streaming, everything works well, but i can`t
get the StreamLength thou i can stream the MP3 from a virtual path
Any help would be appreciated, i have tried many times with
diferent ways and nothing returns me what i need !
Thanx in advance

umm...
first understand me.. because I'm not use english language..
my language is korea language I'm Korean.. so my english is very
poor..i'm sorry..
I think .. your code is as2 . right?
I make the sample file for kaziris_.
sample code is as3
first you make the application folder in applications (ex.
applications\c)
if you test this sample code that you need
You_call_it_love.mp3 file in vod\media
I hope your success! ([email protected])
//flash code(*.fla)
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://localhost/vod");
nc.addEventListener(NetStatusEvent.NET_STATUS,
statusHandler);
nc.client = this;
var ns:NetStream;
function statusHandler(e:NetStatusEvent):void
trace("e.info.code = "+e.info.code);
if (e.info.code=="NetConnection.Connect.Success")
ns = new NetStream(nc);
var songName:String = "mp3:You_call_it_love";
ns.play(songName);
var responder = new Responder(resultHandler);
nc.call("getStreamLength", responder, songName);
function resultHandler(songTotalTimeLine):void
trace("songTotalTimeLine : "+songTotalTimeLine);
// asc code(main.asc)
application.onConnect = function(client)
client.getStreamLength = function( streamName ) {
trace("length is " + Stream.length( streamName ));
return Stream.length( streamName );
application.acceptConnection(client);

Similar Messages

  • Grouping tracks or using a stereo bus - help needed?

    Hi,
    Situation:
    I am mixing a 4 song EP with each song made up of around around 50 tracks.
    Aim:
    I want to be able to automate the level of groups of tracks across the mix. For example; I want to bring the drums (comprising about 6 tracks) as a submix up a few db for the Chorus.
    I also want to be able to apply effects to a whole group, like say compression to the whole drum mix as well as to each track - e.g. a little comp on the snare.
    Problem:
    I can't figure out how to do this in STP. There doesn't seem to be a mechanism to group tracks together or to create a submix.
    I have tried using a bus but this doesn't really work so well because the pan positions of each of my individual drum stracks are not preserved when they come through the bus. Using this approach I seem to need to set the pan on each send, effectively setting it twice (once in say the kick drum track and again in the send from the kick drum track to the drum submix bus). The problem being that if I change the pan for a particular instrument in the main track area, I would need to change it in the send pan which is buried away.
    Have I missed something here or would I need to move across to Logic to get this kind of functionality.
    Any help greatly appreciated.
    Thanks.
    Matt.

    Matt,
    Even if I had money to spend I would not use anything else to master with. STPro has it all. I've never understood people who mix at one studio and master at another. The two are so interrelated. STPro lets you mix (EQ tracks, set effects like delay, reverb, etc., and balance the volumes and pans of all the tracks in the mix) and then master (set the compression and limiting, adjust the spacial reverb, adjust the comparative volume of all the songs in a project) with the ability to go back and fix the mix and remaster quickly.
    You are VERY wise to stick with engineers who know your kind of music. Having said that, I can tell you what I use for mastering, but I do singer/songwriter acoustic guitar, vocal and harmonica primarily. Not even close to an indie band.
    Mastering plugins:
    Compressor - I tried other compression plugins and settled on this one. I use it on individual tracks because it affects the mix so much and I have to put more compression on some tracks (harp) than on others. This is SO important. This keeps the subtleties of the recording from dropping out when your listener is driving and playing the CD in the car.
    Space Designer - This reverb works best for me. It doesn't add blank time at the end of the song like some reverb plugins. This takes a huge amount of time to learn, so find someone who does rock and get their suggestions of which IR (impulse response or "space") to use. I use Music Club and Vocals-Short for my stuff. The key on this is the wet/dry setting which is mysteriously called "Output" on the far right side. You set "direct" to 0 and back off "reverb" to a range of -20 to -5 to go from dry to wet reverb sounds.
    Limiter - This is probably the most important. This not only sets the top level to make sure everything put together doesn't clip, it lets you pull up the volume on the "out" track to bring the total sound to 0 Db for a hot sound file. This means your listener doesn't have to turn the knob up very far on their cheap system to get good level, thus there is less system hiss. It is the other part of compression. Both are needed to master.
    Comparing Volumes in Waveform Editor - This is indispensable. There is no easy way to compare the volume levels of different songs in a CD project without a quick way to go back and forth. So after mastering each song, export the mix to an .aif file. Then open all the .aif files in the waveform editor. Now you can compare levels by clicking back and forth. For my music, I can also SEE the comparitive levels in the waveforms. (Indie rock may look pretty solid.)
    Sharing Mastering Presets - This is possible now with Macs for both plugin settings and GB software instruments. IE I can actually send you the presets I like and tell you which folder to put them in on your Mac. (I wish I could quit my job and do this full time. A website where people could post and download presets and software instrument settings would save our music and film community so much time.)
    This is a beginning. Hope it helps.
    David

  • MP3 player is not an iPod- help needed

    I've got an iTunes gift card and would just like to get a few tunes and use my existing setup. I like Windows Media Player and I have a Sansa mp3 player. I can't play my iTunes music with Windows Media Player and I can't sync my mp3 player with iTunes. Can anyone provide help?

    You can't use iTunes purchases on anything other than an iPod or an iTunes compatible phone or convert them to another format because of the DRM (Digital Rights Management) copy protection. However if you burn it to an audio CD you can import it back as MP3. You'll be able to use this version of the track on other devices or software.

  • Making a music video using Adobe flash - big help needed !!

    am trying to make a music video for a uni project, one of the things I'm trying to do in the video is to fade in a word at a time in whilst keeping them all aligned properly as a sentence - is there an easy way to do this?
    Any other hints or tips on how to make a video but one especially for music would be much appreciated !! I'm just using Adobe Flash and NOT Adobe Premier, thank you !!

    dolly1011 wrote:
    I'm just using Adobe Flash and NOT Adobe Premier, thank you !!
    Then ask here:
    Flash Professional

  • Servlet Virtual Path Question

    When specifying a servlet that is mapped using the servlet virtual path option in iws4.1, the authorization information is not sent in the request header. If the same servlet is specified in the url using the complete package name, it is sent. Is there a way to get the authorization sent to a servlet that is mapped using the virtual path translation

    When specifying a servlet that is mapped using the servlet virtual path option in iws4.1, the authorization information is not sent in the request header. If the same servlet is specified in the url using the complete package name, it is sent. Is there a way to get the authorization sent to a servlet that is mapped using the virtual path translation

  • I need help using the target path tool

    Hi all,
    I realise that I need to keep all my code on the main timeline, so now I need some serious help with targeting movieclips and buttons, when I use the target path tool (the little gun sight in the action script panel) it lets me navigate to the thing I want, but when I use it's suggestion it very often doesn't work, and I am left using trial and error to work it out.  Ican get stuff to work, but I really have no idea why or how I am doing it, Sorry to be such a N00B, but I really think if I can work this out I am going to get somwhere.
    Cheers
    sub

    subtlefly72 wrote:
    Thanks kglad,
    OK that is basically what I have been doing, but its been a bit hit and miss, but maybe now I see why, your last sentence
    of course, all those objects have to exist at the time your code executes.
    So if I am referencing something inside a mc and it doesnt exist on the first frame there will be an error?
    exactly.
    also what is the       this.  Object() and Object(parent)  ??
    Do I need to be using these?
    not when using code on the main timeline.  "this" refers to the current scope which for code on the main timeline, is the main timeline.  the following are the same:
    this.mc and mc
    this.var1 and var1
    And still I want to know why the target tool gives me a path that doesn't work?
    i can't tell you much about the target tool.  i've never used it.  but i tried testing it just now and it seemed to work correctly to target a nested movieclip.  again, you must sure that object exists when your code executes so if you target something on frame 2 (or greater) of a movieclip using code on frame 1 of the main timeline, the reference may be correct but the object won't exist when your code executes.  there are a number of ways to handle that if it's your main problem.

  • Help Needed: Backup iTunes Using Virtual DVD Media (Image)

    Hi,
    My iTunes library is stored on external drive and managed by my G4 Mac mini.
    I'd like to backup my library using the internal backup functionality in iTunes so I can do incremental backup. The problem is that I only have CD-R drive inside the Mac mini and not DVD-R so it will take me dozens of CDs to backup the whole library. I do have a DVD-R drive on another PC so I wondered if there is a way to use a virtual DVD-R media (like DVD image file) to perform the iTunes backup and then copy that virtual media to the other PC and burn it. I already tried it using Disk Utility and Toast but iTunes didn't recognize the DVD image that were created using these applications.
    Does anyone know if there is a solution for my problem besides installing a DVD-R drive on my Mac mini (which of course is a bad investment on such an old machine).
    Thanks,
    Tal

    Hi Tyler,
    You'll really need to use rsync for this I reckon, rsync should already be part of the Mac OS.
    I found this post on LifeHacker which is an extract from this MacRumours forum post, which works perfectly for me to keep an exact copy of my iTunes Music folder on my network drive, which is now accessible for any computer on my network.

  • Help needed for using BASIC authentication through JDBCRealm

    Help needed.
    Hello,
    I am doing a degree project, so far it works fine in my local machine, I need to try it on my virtual hosting (as it is a live server).
    My project requires JDBCRealm, that is BASIC authentication loading access data from mysql database. Normally this setup can be done in Server.xml file, because my Tomcat hosting is a virtual one, I only have permission to access the web.xml file.
    My question is: is it possible to get it done in an alternative way? In web.xml? Some properties file maybe?
    Thank you very much.

    You can set this up for your context using META-INF/context.xml instead of working with server.xml.
    Make a directory called META-INF under your webapp ( it'll be at the same level as WEB-INF ). Under this, add a context.xml with all your context specific configuration including the realm. A sample is below
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/myApp" reloadable="true">
        <Realm
            className="org.apache.catalina.realm.JDBCRealm"            
            driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"         
            connectionURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=myDB;SelectMethod=Cursor;"
            connectionName="username" connectionPassword="password"
            digest="MD5" userTable="users" userNameCol="userid" userCredCol="userpassword"
            userRoleTable="user_roles" roleNameCol="rolename"
        />
    </Context>Hope this helps.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • Help Needed on Web Report60 using Cartridge

    Dear All,
    I have a simple question and possibly stupid one
    I want to use cartridge to deploy report. After that I do not
    knowhow to set the URL. In the Form Cartridge, there is a base
    HTML,do I need a template HTML to carry the report?
    Any hint will be highly apprecaited!
    Ming
    null

    Following is my rwows60.html file that I use to run reports
    under reports cartridge. I stored it in a directory pointed to
    by virtual path /webhtml/ . The URL to launch it is
    http://ntserver1/webhtml/rwows60.html
    Hope this helps.
    <HTML>
    <!--Form Action is RWCGI60 URL-->
    <FORM
    ACTION="http://ntserver1/developerreports/report60cart?"
    METHOD="POST">
    <!--Parameters not exposed to user are hidden-->
    <INPUT name=server type=hidden value="ReportsServer">
    <INPUT name=paramform type=hidden value="yes">
    <CENTER><H1>Set Reports Multi-tier Server Parameters </H1>
    Report Name: <INPUT name=report type=text value="c:
    \orant\webdemo\deptemp.rdf">
    Database Connection: <INPUT name=userid type=text
    value="scott/tiger@orcl81">
    <INPUT name=destype type=hidden value="cache">
    Output Format: <SELECT name=desformat> <OPTION value=HTMLCSS
    selected> HTMLCSS <OPTION
    alue=PDF> PDF </SELECT>
    <HR><INPUT type=submit value="Run Report!">
    </CENTER> </FORM> </HTML>
    Ming Liu (guest) wrote:
    : Dear All,
    : I have a simple question and possibly stupid one
    : I want to use cartridge to deploy report. After that I do not
    : knowhow to set the URL. In the Form Cartridge, there is a base
    : HTML,do I need a template HTML to carry the report?
    : Any hint will be highly apprecaited!
    : Ming
    null

  • How can I use a relative path in a Virtual Directory tag?

    That is probably a bit vague, so I will explain in more detail. We are using BEA
    WL Portal 7.0 and our team is developing multiple portal applications. We have
    a core set of portlets (consist of JSPs) that we need to reuse in multiple portals
    (Web Apps), however from a version control perspective they need to reside in
    one common location. So, the solution I came up with is to use a virtual directory
    for the the common directory and add this to weblogic.xml for each web app. This
    works fine. However, each developer has different directory names for their project...ClearCase
    view names to be specific... plus we have integration views, QA views, etc...
    so we can't have any "C:\mystuff\mydomain" absolute paths anywhere in the portal
    configuration. Does anyone know of a way to use a relative path for a virtual
    directory? I have tried various versions of ../../ for example to try to backup
    and then recurse down to the directory, but this is not working. Any ideas?
    By the way this is basially just a hack for development, when we package the WAR
    for QA, Prod, etc... we copy needed files and there are no virtual directories.
    In other words, I don't care how "creative" solution is :)
    This is what I have right now, which I need to replace with a relative directory
    name:
    <virtual-directory-mapping>
    <local-path>C:/Projects/TouchPoint_v1.0_Fix/tp_portal/bipiportals/beaApps/portalApp/tp-shared</local-path>
    <url-pattern>*</url-pattern>
    </virtual-directory-mapping>

    Well, in fact you can in a special case :
    - The file you want to access is in the same directory than the applet (or in a sub-directory)
    If this condition is OK, you can open the file using :
    java.io.InputStream MyInputStream = <YourAppletClassName>.class.getResourceAsStream("sidira_interactif2.svg")
    With this stream, its easy to read the file content.

  • Help needed in using the DocCheck utility

    Hi
    Can somebody help me to use the DocCheck utility.I need to check that all the java files have the required javadoc tags and they are correct.
    I have downloaded the zip file and I have been giving the following commands
    c:\javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck -docletpath c:\svk\jdk1.2.2\bin\doccheck1.2b1\lib\doccheck.jar -sourcepath<full path with the file name>
    But I get the following error message : No package or class specified.
    I also tried giving the following command:
    D:\SegaSource\sega\src\com\sega\account>javadoc -doclet com.sun.tools.doclets.do
    ccheck.DocCheck -docletpath d:\jdk1.3\doccheck1.2b1\lib\doccheck.jar User.java
    But I get the following message:
    Loading source file User.java...
    Constructing Javadoc information...
    javadoc: warning - Import not found: com.sega.account.address.Address - ignoring
    javadoc: warning - Import not found: com.sega.account.icon.Icon - ignoring!
    javadoc: warning - Import not found: com.sega.common.DateUtil - ignoring!
    javadoc: warning - Import not found: atg.nucleus.GenericService - ignoring!
    javadoc: warning - Cannot find class com.sega.account.icon.Icon
    javadoc: warning - Cannot find class com.sega.account.address.Address
    javadoc: warning - Cannot find class com.sega.account.MasterManager
    7 warnings
    please help
    Thanks
    SVK

    I have never ran the DocCheck from the command prompt, so I really don't know how to do it, but I do run it succesfully using ant (build tool from apache - jakarta, if you use tomcat you already have it installed).
    So.. if you do use ant.. this will help:
    <target name="doccheck" depends="prepare">
         <javadoc
              packagenames="${packages}"
                    destdir="${doccheck.home}"
              doclet="com.sun.tools.doclets.doccheck.DocCheck"
              docletpath="${doccheck.path}" >
              <classpath refid="project.classpath"/>
              <sourcepath refid="project.classpath"/>
         </javadoc>
    </target>If you don't use it.. I guess I was of no help, sorry.
    Ylan

  • Want to use Logic 8 Pro for Podcasting, help needed

    I have a few problems. I just switched over to Logic after using ProTools for 4 years so I'm a newbie. I'm about to start a podcast soon and I want to use Logic 8 Pro to do so. Is there a book that someone can recommend me for getting familiar with Logic?
    Here are the things I need to get done:
    I have a mixer and I need to know how to record the sounds playing through my computer to end up in Logic. I basically want to be able to capture the audio playing on my computer and have that be on the podcast. How do I do this?
    Secondly, I'm confused about what Input 1 and Input 2 are. What is the difference?
    I'd appreciate anyone who could IM me to help me further with Logic if I have a quick question or anything. My AIM screen name is DirtyVibes. Any help would be appreciated.
    Thank you,
    -RandomSkater

    Is there a book that someone can recommend me for getting familiar with Logic?
    Yes, the Getting Started manual, you can download it from Apple.
    I have a mixer and I need to know how to record the sounds playing through my
    computer to end up in Logic. I basically want to be able to capture the audio
    playing on my computer and have that be on the podcast. How do I do this?
    I'm not sure what you are asking here. If you want to record the whole output of your computer, I recommend using a virtual audio driver like Soundflower or Jack.
    Secondly, I'm confused about what Input 1 and Input 2 are. What is the difference?
    Input 1 is the input marked "1" on your audio interface (or the left channel on a stereo pair).
    Input 2 is the input marked "2".
    If your audio interface has more than 2 inputs, they will all show up, so you can record different inputs to different tracks if required.
    You might be better off using Garageband to record your podcasts, it's simpler and has dedicated podcast functions (like adding iTunes artwork and so on).

  • Help needed  while exporting crystal reports to HTML file format using java

    Help needed  while exporting crystal reports to HTML file format using java api(not using crystalviewer).i want to download the
    html file of the report
    thanks

    the ReportExportFormat class does not have HTML format, it has got to be XML. Export to HTML is available from CR Designer only.
    Edited by: Aasavari Bhave on Jan 24, 2012 11:37 AM

  • Help needed. I have a 3TB external hard drive partitioned into 1TB's. I used one partition as backup for the main computer hard drive. But now it is greyed out as shown in the disk utility and its name changed, i dont know how that happened, i tried verif

    Help needed. I have a 3TB external hard drive partitioned into 1TB's. I used one partition as backup for the main computer hard drive. But now it is greyed out as shown in the disk utility and its name changed, i dont know how that happened, i tried verifying and repairing it but had no luck. I also tried mounting and unmounting it but still no solution. Anyone to help please?

    Looks bad. I would strongly advise backing up the stuff on the other two partitions as soon as possible in case the rest of the drive goes wrong.
    Beyond that, Disk Utility has limited abilities to repair disks, DiskWarrior uses a different approach and might, emphasis might be more successful. It has certainly done the job for me in the past when Disk Utility could not.
    See http://www.alsoft.com/diskwarrior/

  • Help needed please.. how do I remove my credit card from itunes? just discovered over $450 of charges when I looked at my email... Kids had no clue they were using our money and not their gift cards

    Help needed please.... I just discovered over $450 charges to my credit card from Itunes. The kids had no idea they were using our credit card and not their itunes gift cards and 4 year old just clicks on anything! I didnt save my credit card details so am a bit miffed at this... I cant find anywhere in itunes to remove it. Edit.. but not remove. Editing does not remove it.. HELP

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Accepted forms of payment  >  http://support.apple.com/kb/HT5552
    Changing Account Information  >  http://support.apple.com/kb/HT1918

Maybe you are looking for

  • How to load the google map into an empty movieclip

    how to load the google map into an empty movieclip ?  Thank you

  • I am trying desparately to make Revel work for me.

    I purchased Adobe Creative Cloud to see if that would help me with the things I was losing when I lost PhotoShop Elements 9 (which was perfect for me). Adobe CC was way over my head. I have watched some tutorials and it is for so many creative projec

  • Xfce4-screenshooter-plugin has no icons

    Hi, I installed xfce4-screenshooter-plugin and there are no icon(s) in the package. I looked at the filelists of some other xfce4-panel-plugin packages and they have icons. I also looked at the homepage, but the screenshooter-plugin is not listed Any

  • Contacts on work and personal phone, need to take them off each other??

    Hi, I have 2 iPhone's ( iPhone 4S & iPhone 5S) 1 for work and 1 for personal, initially I used my apple ID & iCloud ID to set them both up but since I have taken both apple & iCloud ID off my work phone however my contacts from personal phone are sti

  • SEM-BCS authorization or Security Guide

    Hello, Last year We went Live with SEM-BCS Project.Now We need to restrict all the t-Code's in SEM-BCS. During the Go-Live We have provided  Full authorization's to everyone.Now Auditor's are bugging us to restrict the access in the SEM-BCS system.If