Added: 1 year ago
From: LearnToProgramDotTV
Views: 7,394
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (30)

Sign In or Sign Up now to post a comment!
  • Comment removed

  • i am using flash cs4 and the code is correct:

    function getsonglength(evt:Event):void { lblSongTotalTime.text=convertT­ime(myMusic.length).toString()­; lblSongTitle.text=myMusic.id3.­songName; lblSongArtist.text=myMusic.id3­.artist; lblSongYear.text=myMusic.id3.y­ear; lblSongAlbum.text=myMusic.id3.­album;

    }

    But the information wont appear in those label components. Please help i don't know what to do to fix this!

  • I keep getting: "Scene 1, Layer 'action', Frame 1, Line 51 Warning: 3596: Duplicate variable definition." twice for" var displayMinutes:String = Math.floor(Minutes).toString()­;" and for the seconds. What code am I missing to fix that so I can upload the mp3 players to a website?

  • I have a question. On the time part (Minutes+Seconds), can you send me a code. My Flash 5 can't convert it to time. It just stays like a decimal. Can you please elp me? Help!!!!!!!!!!

  • Hey Mark, Thanks for these. I hope these videos have helped your personal business, etc... I think the total likes:dislikes ratio (24:0) says a lot. This video has helped me a lot on a personal project which has given me a lot of personal gratification and has opened my mind to what's possible with actionscript/flash.

  • Forget it, I typed "Floor" instead of "floor". lol

  • I'm getting a 1061: Call to a possibly undefined method Floor through a reference with static type Class. PLEASE HELP?

  • In case anyone is wondering, to fix error #1009, you have to have the code IN THIS ORDER:

    Objects/Variables/Declarations­ first, then your Functions, THEN your listeners.

  • Comment removed

  • i try to put a " : " (colon) to my time in the return part of the code....but mine turns green and doesnt appear when i test my movie

  • This is a copy of my actions list:

    function currentTime(evt:TimerEvent):vo­id

    { var cTime:String = convertTime(channel.position);

    }

    function songLength(evt:Event):void

    { labelTime.text = currentTime + "/" + convertTime(myMusic.length);

    }

    Everything else is equal the tutorial.

  • I wonder if someone can help me with this...

    I'm trying to combine the current and total time values into a single label, but i keep getting an post-build error when i preview the file.

    Everything works except the current time field, which says "function FUNCTION {} ()".

  • Excellent tutorials! Following along and Learning a bunch. Thank you!

  • I keep getting an output error while doing the id3's. It's irritating because in comparison to everything else, they're simple. What I'm getting is

    TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set text() at fl.controls::Label/set text() at practiceMP3_fla::MainTimeline/­getSongLength()

    Any ideas? :( It's probably something simple that I'm overlooking.

  • @Kraven8888 are you sure that the MP3 you are using has id3 tags embedded? It looks like you're trying to put a null value in the text box...

  • @ the 7:27 min mark (after the equation that creates the minutes and seconds timer) There is a piece of code - "return (Minutes+ + Seconds) that seems to automatically appear without being written. I admit i was using the (%) percentage sign in place of the modulus sign but I found nothing else that came close. I am getting an error msg and I would like to know how that piece of code came to be. Please HELP!

  • @LiquidRadio1 Can you tell me the specific error you are getting?

  • @LearnToProgramDotTV the error code I am getting is:

    LOCATION: Scene 1, Layer 'Layer 1', Frame 1, Line 24

    SOURCE: return (Minutes+ +Seconds)

    As i said before, after typing the equation as shown on the video, the line of code right underneath it is my obstacle. And this may be a silly question but I don't know the answer... how do i type/insert a modulus sign for the equation itself? Thanks for your response and assistance...!

  • Ohh and I am using version CS4

  • fixed it lol

  • I get no total song length?

  • when i try to play the song more than once i get an error? why?

    Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful. at flash.media::Sound/_load() at flash.media::Sound/load() at funky_player_fla::MainTimeline­/playMusic()

  • @moogbeatz99 I found the mistake. You need to put the "myMusic.load(soundFile);" line outside the function PLAYMUSIC. Lets say up, after you defined your "myMusic" variable and all.

    2037 error did had something to do with the LOAD method. Im not shure. But it worked for me.

  • my song length keeps getting displayed as 0:0 why? my code is the same as in the video.

  • how do you make skip buttons used to skip to the next song if you have a list of songs

  • You did not explain how you changed the getSongLength method from

    function getSongLength(evt:Event):void

    { lblTotalSongTime.text = (myMusic.length/1000).toString­;

    }

    to

    function getSongLength(evt:Event):void

    { lblTotalSongTime.text = convertTime(myMusic.length);

    }

  • @HallCaptures Thanks, was confused why my time was still in seconds. Saw your comment and changed it!

  • Comment removed

  • I have successfully created flash mp3 player with the help of your 5 series video. But I want to discuss a problem with you. If one presses the "PLAY" button twice in succession the music file starts playing twice - the second in the background also! Please tell me about how to inactivate the "PLAY" button after it is pressed once. Please clarify the problem with the other buttons also...

  • Thanks for this video! Just a slightly simpler way to convert time:

    var minutes:Number = millis / 1000 / 60;

    var seconds:Number = (millis / 1000) % 60;

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more