Will the FLVPlayback component play MP3's without FMS?

Will the FLVPlayback Component (version 2.5.0.15) play an MP3 file without it having to be streamed through a Flash Media Server? All I'm looking for is to place a player into my Flash that plays an MP3 file that's in the same directory as the SWF.
Here's my code... it's pretty simple:
import fl.video.FLVPlayback;
var myMusic:FLVPlayback = new FLVPlayback();
myMusic.source = "mySong.mp3";
myMusic.skin = "SkinOverPlayMute.swf";
myMusic.skinBackgroundColor = 0xCCCCCC;
addChild(myMusic);

So the answer is no, correct?  FLVPlayback will not handle MP3 files?
My new script, in case anyone is interested:
import flash.media.Sound;
import flash.net.URLRequest;
var songTitle:String = "Shake Your Rump"
var fileName:String = "shakeYourRump.mp3"
var myMusic:Sound = new Sound(new URLRequest(fileName));
var soundChannel:SoundChannel;
var isPlaying:Boolean = false;
var currentPosition:Number = 0;
btn_Rewind.addEventListener(MouseEvent.CLICK,rewindMusic);
btn_Play.addEventListener(MouseEvent.CLICK,playMusic);
btn_Pause.addEventListener(MouseEvent.CLICK,pauseMusic);
txt_Status.text = 'Click play to hear "' + songTitle + '"';
function rewindMusic(myEvent:Event): void {
currentPosition = 0;
txt_Status.text = 'Rewinding "' + songTitle + '"  Click play to restart.';
if (isPlaying) {
soundChannel.stop();
soundChannel = myMusic.play(currentPosition);
txt_Status.text = 'Playing "' + songTitle + '"';
function playMusic(myEvent:Event): void {
if (!isPlaying) {
soundChannel = myMusic.play(currentPosition);
isPlaying = true;
txt_Status.text = 'Playing "' + songTitle + '"';
function pauseMusic(myEvent:Event):void {
if (isPlaying) {
currentPosition = soundChannel.position;
soundChannel.stop();
isPlaying = false;
txt_Status.text = '"' + songTitle + '" is paused. Click play to resume.';
stop();

Similar Messages

  • A better way to determine the current state of the FLVPlayback component?

    Below is the AS3 code I have used to display images (MCs) over an instance of the FLVPlayback component.  These images (one for loading, one for the title) are to appear – or disappear – according to the current state of the FLVPlayback component. 
    It “works,” but when testing, I have noticed that it can be rather finicky.  The most common issue that arises is that many times the loadPoster movieclip will still be visible even though the video has entered the playing state.
    Also, I wanted a title placeholder image to appear whenever the user stops the video or if the video completes.  However, I had to add the conditional statement to the “stoppedStateEntered” case to make everything appear when expected.  When the video is first viewed (and has completed buffering), it seems that the FLVPlayback component enters the stopped state before entering the playing state.  Thus, the titlePoster would flash on the screen right before it and the loadPoster “should” disappear when the video begins playing.
    Even in my limited testing, these issues were very easily re-created.  I am definitely looking for a more reliable solution.  Is there a better (or more correct) way to go about all this?  If possible, I would like to stick with the FLVPlayback component, just for the simple fact of not having to code my own.
    Where am I going wrong?
    function updateMoviePoster(event:VideoEvent):void
                    switch (event.type)
                                    case "playingStateEntered":
                                                    loadPoster.visible = false;
                                                    titlePoster.visible = false;
                                    break;
                                    case "stoppedStateEntered":
                                                    if (loadPoster.visible == false)
                                                                    titlePoster.visible = true;
                                    break;
                                    case "complete":
                                                    titlePoster.visible = true;
                                    break;
    myFLVPlayback.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, updateMoviePoster);
    myFLVPlayback.addEventListener(VideoEvent.STOPPED_STATE_ENTERED, updateMoviePoster);
    myFLVPlayback.addEventListener(VideoEvent.COMPLETE, updateMoviePoster);

    Any suggestions?  I would truly appreciate the help.

  • Adding time to the FLVplayback component

    Hi everyone, Im using the FLVplayback component for a project im doing. I want to add the time elapsed and time left on the controls. I dont really want to create my own controls, as im happy with the flv playback component. The FLVs playing in the component are external and are loaded into it via as3
    Is there a quick and easy way of doing this?
    Cheers
    Dan

    I have managed to find some code for this component, but im getting some errors which im having trouble to de-bug;
    1118: Implicit coercion of a value with static type Object to a possibly unrelated type Function. vidPlayer.addEventListener("metadataReceived", listenerObject);
    1118: Implicit coercion of a value with static type Object to a possibly unrelated type Function. vidPlayer.addEventListener("playheadUpdate", listenerObject);
    Please would someone take a look and let me know what im doing wrong?
    Thanks
    code:
    var listenerObject:Object = new Object();
    var fullDuration = null;
    listenerObject.metadataReceived = function(eventObject:Object):void {
        fullDuration = prettyTime(vidPlayer.metadata.duration);
    listenerObject.playheadUpdate = function(eventObject:Object):void {
        var paTime = vidPlayer.playheadTime;
        if(fullDuration != null){
    //updates the text box with the instance name timeCode_txt on the root timeline.
    //best to use a monospace typeface like calibri for the textbox font.
            time_txt.text = prettyTime(vidPlayer.playheadTime) + " / " + fullDuration;
    vidPlayer.addEventListener("metadataReceived", listenerObject);
    vidPlayer.addEventListener("playheadUpdate", listenerObject);
    function prettyTime(timeinSeconds):String{
        var seconds:Number = Math.floor(timeinSeconds);
        var minutes:Number = Math.floor(seconds / 60);
        var hours:Number = Math.floor(minutes / 60);
        //Storing the remainder of this division problem
        seconds %= 60;
        minutes %= 60;
        hours %= 24;
        //Converting numerical values into strings so that
        //we string all of these numbers together for the display
        var sec:String = seconds.toString();
        var min:String = minutes.toString();
        var hrs:String = hours.toString();
        //Setting up a few restrictions for when the current time reaches a single digit
        if (sec.length < 2) {
            sec = "0" + sec;
        if (min.length < 2) {
            min = "0" + min;
        if (hrs.length < 2) {
            hrs = "0" + hrs;
        //Stringing all of the numbers together for the display
        var time:String = hrs + ":" + min + ":" + sec;
        //Setting the string to the display
        return time;

  • Will the USB SuperDrive play blu ray discs?

    Will the USB SuperDrive play blu ray discs?  Is there another way to play them on my iMac?

    The product informationhttp://store.apple.com/us/product/MD564ZM/A/apple-usb-superdrive?fnode=5f does not say anything about Blue Ray, a proprietary Sony format.  You can buy a Blue Ray compatible drive from sources like Amazon, Best Buy or computer stores.

  • Will the ipad mini play HD videos from amazon prime instant video?

    Will the ipad mini play HD videos from amazon prime instant video?  I know there is an app for amazon instant video, but I dont know if it will play the HD versions of the movies online.

    ON the iPad it will only play SD

  • Controlling the FLVplayback component Volume

    Hi there,
    I have a FLVPlayback component which I have modified to the
    core.There is one problem with the volume slider. Im using Flash
    Professional 8 with XP, and the skin Im using is
    "steelExternalAll". Suppose I load some file into the contentPath,
    it plays, and I drag the volume slider up (100%) and down(0%) for a
    couple of time I get a bug. The bug is that when Im finally in the
    down state, with 0% I still hear the sound which was in the
    previous status, say 38 or 50%. And it happens in the reverse too.
    Why is this happening? Can i resolve it?
    I tried doing this using a fresh FLASH file, still the result
    is the same. It happens once in a 10 times, but this surely is a
    defect i need to handle. I dont think I have enough API's to do
    something serious. Can anyone help me out?

    Hi kglad,
    Greetings. Felt so glad when I saw your reply saying that the
    problem was with the skinning, because I did one hell of a
    skinning. But I had a crosscheck. I tool a sample
    "steelExternalAll" skin, just like it is in the component panel,
    and just added a contentPath. Simple. I checked for the volume
    slider problem, and there it was.
    I can find the problem in the normal unmodified skin. This is
    the same problem I face. Can this be solved. There is no other code
    piece Im using other than the one given below.
    Thanks a lot for your kind patience.

  • How can I save a video's position using the FLVPlayback component

    I've got a video I'd like people to be able to navigate away from in my project, but resume where it left off if they come back to it.  I would think I could do this by just saving its current position when they exit that frame as a variable and then using .seek() to go back to that spot if/when they return.
    The only problem is that I can't find any script to capture the current position.  I tried .time, but it gives me an error.

    This is what I ended up doing.  I put the FLVPlayback inside a movieclip and put this on the first frame:
    stop();
    var vidTime:Number=0;
    on the frame that the video plays on I have the video and a close button (which is a movieclip) and I put the following script:
    if(vidTime>0)
        htMeasVid.seek(vidTime);
    close_btn.addEventListener(Event.ENTER_FRAME, seekCount);
    close_btn.addEventListener(MouseEvent.MOUSE_UP, closeBtnUp);
    function seekCount(e:Event):void
         vidTime=htMeasVid.playheadTime;
    function closeBtnUp(e:MouseEvent):void
        e.currentTarget.parent.play();
    on the following frame I have this code:
    close_btn.removeEventListener(Event.ENTER_FRAME, seekCount);
    htMeasVid.stop();
    and then on the last frame I have this:
    gotoAndStop(2);
    so that it doesn't reset the vidTime variable to 0.
    Thanks again for the help.

  • When will the Blackberry os systems be avaliable without values being lost

    Windows 8 phone os helping with the free trial of Azure for servers but what about developer mode not being lost
    Is AMD responsible , will the steam network prove to be most valuable for floppy search solutions or are all media programs for a short trial not reaching any events.
    Apparently all data lost

    Mr. Jones,
    You are a real lifesaver!!!
    It worked on the Mac.  Will have to do some searches to find the same on the PC since the same is happening.
    Do you happen to know why Adobe is saying they are not compatible with Office 2011 now?  I found a link on the Adobe webite along those lines yesterday, but was not able to find it this morning to insert into this post.
    Our CEO had a real meltdown at about 2am the other morning when trying to pdf something for a meeting the next day.  Was not very pretty.
    THANK YOU!!!

  • HT5188 Free VPP app - Cannot load VPP Codes into Configurator because app is Free.  Sister company developed the app for us at no cost and we are installing on our devices.  Will the app expire after a year without VPP codes?  Devices will not have connec

    This is strange Case!
    We have been authorized to download 40 copies of a VPP app.  The price tier is free.  We download the app through itunes and load it into configurator.  Because the App is free we are not given the option to load the codes which we rightfully own. 
    The devices we wish to configure will not have internet connectivity in the future and I need to know that the app on them will not expire!
    If I load the app with configurator (unsupervised!) will the app expire in a year and be disabled?  I cannot have that happen!
    Please advise!
    Best,
    Nelson

    This is strange Case!
    We have been authorized to download 40 copies of a VPP app.  The price tier is free.  We download the app through itunes and load it into configurator.  Because the App is free we are not given the option to load the codes which we rightfully own. 
    The devices we wish to configure will not have internet connectivity in the future and I need to know that the app on them will not expire!
    If I load the app with configurator (unsupervised!) will the app expire in a year and be disabled?  I cannot have that happen!
    Please advise!
    Best,
    Nelson

  • My story is working in dvd studio pro but how do I get the track to play with and without the story?

    Hi there,
    I've targetted my first button to play all and I've targetted my second button to play all: story 1. The play all option is still playing the same as the play all:story 1 option.
    Can someone please help me figure out what I'm missing here. It should be straightforward but something isn't working.
    Many thanks
    Oonagh

    Not sure if I explained my problem well at the start.
    I have a 1 track dvd and I want two play options. 1 is the play all option, the other is an interactive option where the track will stop at certain points in the dvd. I have created 2 stories for each task. However, I can't alter 1 story without it altering the other story. Therefore for the play all option, when I want to take out the property whereby it stops at certain points in the interactive play option, it takes it out of both stories. If I target the play all button to just the track without any story, it still is linked to the interactive story.
    The way I've made the story markers interactive is by putting the playback option to infinite.
    I thought I had solved the problem by  deleting the interactive story markers  in the play all story  but now when it plays through, it's not seamless where I removed these chapters and seems to jump a bit at these points.
    If anyone can shed some light it would be much appreciated

  • Will The Sims 2 Play ?

    I wanna buy The Sims 2 Mac Version i looked up the specs for it here they are, will it play on my newish Macbook ?
    System Requirements
    This game runs on the Mac mini, iMac G5 or any Mac that meets the requirements below
    # Mac OS X 10.3.8 or later
    # PowerPC G4/G5, 1.2GHz or faster
    # 256MB RAM
    # 3 GB free disk space
    # ATI Radeon 9000/nVidia GeForce FX5200 or better
    # 32MB of VRAM
    # DVD drive required to install and play
    Recommended System Requirements
    # 512MB Memory / 64 MB Video RAM

    Take a look here.

  • How will the applet tag behave for users without Java?

    I am considering using an applet I have created as a splash screen for my website. But I am worried that by doing this I will loose all the visitors that don't have Java. Is there a way I can have the splash screen detect whether or not the user has Java? If so, is there a way I can have the splash screen automatically forward the non-java users to the main page? Maybe I could put something between the <applet></applet> tags?
    �Caleb�

    That doesn't help. Had you read my post more carefully you would have better understood what I wanted. In any case, I have already figured out how to automatically forward the non-Java users to the main page. The only thing I worry about now is about the people who's computers crash whenever they try to run a Java applet.
    �Caleb�

  • How much will the iPhone 4S now with and without the contract and will it receive the iOS 7 update?

    I am willing to a 4s so yeah...

    The pricing is on Apple's web site provided byTJBUSMC1973. Note that the monthly charge will be the same if you pay a subsidied price or you get one unlocked directly from Apple, EXCEPT with T-Mobile. They are the only carrier to "unbundle" and charge you a lower monthly rate if you buy the phone outright.

  • Presenting on ipad: will the video sound play through external speakers?

    I'm giving a presentation on my iPad, using Keynote. I have always had problems connecting the iPad to the podium in our classrooms (using the connector)--the screen mirrors beautifully, but the sound doesn't get transmitted. There is a speaker jack on the podium that always works with my MacBook, but when I plug it into the iPad2, no sound (except for the iPad's own speakers). Can anyone help? I don't want to have to take my MacBook--but I need sound! Thanks.

    see if this links helps
    http://discussions.apple.com/thread/2420374?start=0&tstart=0

  • Loading a swf with FLVPlayback component, and the flv restarts playing by itself......

    Hi.
    i have an fla file with 5 keyframes. Each keyframe navigates forward to the following keyframe. On the fifth keyframe, a Loader loads an external swf. The external swf has an flv playback component with sound.
    The fifth keyframe, other than having a button to click to load the swf, has a movie clip that navigates you back to the first keyframe.
    The loaded swf, once loaded, may be removed using removeThis function which has removeChild code as well as a  _flv.stop(); which makes the flv stop when the swf is removed. So u're back on keyframe 5, no sound - good!.
    ASo, all is well and the user can navigate back to the first keyframe (from keyframe 5), and from there continue on to the 2nd, 3rd, 4th and 5th keyframes again,  problems start though, when you get to that 5th keyframe again: that keyframe has an FLVPlayback component playing an flv, which at that point becomes very sluggish as all the mc animations on that 5th frame. And worse, i realize, the flv in the external swf that was previously loaded, starts playing by itself, which i know, because i hear its sound track.
    I tried putting a conditional statement to tell the _flv to stop on keyframes 1 and 5, but that causes errors, considering that the flv is an undefined property from the perspective of those keyframes.
    Any help would be very appreciated:)
    thanks.

    var loader:Loader = new Loader();
    loader.load(new URLRequest("_.swf"));
    house.addEventListener(MouseEvent.CLICK, loadswf1);
    function loadswf1(event:MouseEvent):void
        addChild(loader);
    this is how i'm loading the swf. I tried using   Loader.unloadAndStop() inside that loadswf function but get an error -
    Scene 1, Layer 'a', Frame 75, Line 83
    1061: Call to a possibly undefined method unloadAndStop through a reference with static type Class.

Maybe you are looking for

  • Tab delimited file not getting loaded properly in OWB

    Hi, I have create a flat file module and liked it to an external table in OWB, but out of 5000 records only 3000 are getting loaded into external table for tab delimited flat file. Could any body has any idea how this is happening. Thanks Ram

  • Imposing selection fields into a screen field

    Hello Frnds, I have a FM in which I am calling a report. That report doesn't have any selection screen but it calls a user defined screen in which i have an input field PARTNER (KNA1-KUNNR).            In my FM i have import parameter as partner same

  • Material master data

    Experts! M working in MM Extraction, i 've to extarct Inventory data,before that , i need to extract material master data , like 0material_attr,text so can anyone give me the step by step procedure  to load master data pls.. Thanks Srujan

  • Technical objects into Debit memo request

    Hello all, we want to link the Debit memo request to the equipments. We sell configurable materials with serial number (equipment). Afterwards, we make debit memo request for some components of this equipment and we want to have the complete history

  • Gateways can't be restarted from the Admin Console

    Hi, We have two gateways and two servers setup. We have changed the names of the gateways after we completed the installation. everything works fine except that the gateways can't be restarted from the admin console. The administration guide says tha