A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: embed html mp3 links?

  1. #1
    Member
    Join Date
    Mar 2011
    Posts
    68

    embed html mp3 links?

    hi guys,

    im using flash mx 2004, and i would like to know if its possible to create an app thats goes get the mp3 files from a storage website and playing it in mine?
    like..i have an acount in an website that lets me keep there my mp3 and other files and they give links for embeding and even have mp3 palyer in their site, but i would like to pull those mp3 into my site cause i only have 5 gb storage...is there anyway to do this?

    Thanks!

    Duarte V.

  2. #2
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    Sure, you can put the player on your site and then use an absolute web address in the player to load the external file from another site or Web address.
    The address could be... for example:
    must be complete with the "http://www.yoursite.com" part.
    Use that as the path in your player to the .mp3 file.
    Best of luck,
    Video Man

  3. #3
    Member
    Join Date
    Mar 2011
    Posts
    68
    Quote Originally Posted by Video Man View Post
    Sure, you can put the player on your site and then use an absolute web address in the player to load the external file from another site or Web address.
    The address could be... for example:

    must be complete with the "http://www.yoursite.com" part.
    Use that as the path in your player to the .mp3 file.
    Best of luck,
    Video Man
    hi, thanks... but i gottta use the GetURL function right?...when i do it, it just redirects me to the page where is the file and does not plays in my flash app... what am i doing wrong?

    im trying to use this code
    Code:
    track = new Sound();
    som = GetURL("the url for the file")
    track.loadSound(som, true)
    som.start(0,0)
    when i clcik the play button just redirects me to the website where i have the mp3 stored
    any idea?

    Thanks!

    Duarte V.

  4. #4
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Nope, getURL is just used to redirect to another page. The method/function loadSound accepts the first parameter (URL) as a String (no need to use getURL or something else), so you just type the URL in there:

    Actionscript Code:
    track = new Sound();
    track.loadSound("url to mp3", true)
    som.start(0,0)

    Maybe you were confused from AS3, because there you have to use URLRequest
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  5. #5
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    Yes, as Nig 13 says:
    stop();
    track = new Sound();
    track.loadSound("http://www.uncledoodad.com/02_05_11/a_Congo_Square_02_05_11.mp3", true)
    start(0,0)
    Copy and paste into a new Flash doc to test.
    Best wishes,
    Video Man

  6. #6
    Member
    Join Date
    Mar 2011
    Posts
    68
    thanks guys, im gonna try it soon...now im on a "resting" mood..well..im just choosing some tracks from compilations to insert in my mixsets...i will check it later on...much thanks!

    Duarte V.

  7. #7
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    choosing some tracks
    If you plan on using multiple mp3s, then you might want to consider using an audio player with uses a playlist. Then you can use an .xml file to populate the playlist.
    And the use of an absolute address for each mp3 will work just as well there.
    Best wishes,
    Video Man

  8. #8
    Member
    Join Date
    Mar 2011
    Posts
    68
    yes..im using a playlist in my website "radio"...feel free to visit http://www.thebeastpost.com
    but i already have there more than 24 hours of mixsets (only mixsets because of copyrights) and i only have a 5gb storage there....so basicaly what i want to do is to move my mixsets to jumbofiles.com wich lets me store till 500gb data but access the sets there from my webpage... btw..i even have a hall of fame for mixsets of high producers and djs..this ones are redirected to jumbofiles.com but they are made in order to open jumbofiles.com page...with this tip you guys gave me is much more easy....
    Last edited by Alienoiz; 05-27-2012 at 07:26 PM.

  9. #9
    Member
    Join Date
    Mar 2011
    Posts
    68
    im seeing here something in the code you guys gave me..it ends ".mp3" but the links i have from jumbofiles.com end ".html.mp3" or theres some tiny links as they call that dont even end in .mp3 nor .html ... they just end in a "code" of letters...do you think it will result anyway?...well...im gonna find out soon anyway eheheheh.....my compilation is ending...thanks!!

    Duarte V.

  10. #10
    Member
    Join Date
    Mar 2011
    Posts
    68
    ok..i tried it and does not work i believe?!!!...the links end ".mp3.html" and not like i said before (".html.mp3") ... should this work anyway?.. maybe im not doing it right :s

  11. #11
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    This link is to an html file:
    ".mp3.html"
    which is NOT an mp3 file... and it will not work.
    If you are storing your mp3s on a sever... then that is NOT the address. It may be a Web page that contains the .mp3, but that is not the absolute address to the actual mp3 on the server.
    You really need the actual location on the server of the .mp3 file.
    How are you uploading the mp3 files to that server? Are you using FTP software?
    VM

  12. #12
    Member
    Join Date
    Mar 2011
    Posts
    68
    Quote Originally Posted by Video Man View Post
    This link is to an html file:

    which is NOT an mp3 file... and it will not work.
    If you are storing your mp3s on a sever... then that is NOT the address. It may be a Web page that contains the .mp3, but that is not the absolute address to the actual mp3 on the server.
    You really need the actual location on the server of the .mp3 file.
    How are you uploading the mp3 files to that server? Are you using FTP software?
    VM
    no the site is Jumbofiles.com .. go check if you want..i just create a free account and lets me store my mp3 there or any other data till 500gb of storage.... you can even listen the mp3 from there..heres an eg: http://jumbofiles.com/2k4l4ph329p8/S...02006.mp3.html .... click free download

  13. #13
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    The link you provided is just a link to the Web site, not your mp3.
    Can you provide an actual link to an mp3 stored on the site?
    VM

  14. #14
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    Looking more into Jumbofiles... I don't think that they are providing a Web server service, they seem to just be providing a "storage" place where you can download files.
    That type of sevice will not work for playing you mp3s, since they are not interacting with Web pages like a Web server does.
    I could be wrong but I just don't see they they are providing what you need.
    Not sure where you are hosting your Web site now or how much you are paying, but there are plenty of good, cheap hosting companies out there.
    www.lunarpages.com is one I can recommend. Even the most basic package comes with unlimited storage and unlimted bandwidth.
    Check it out!
    Best wishes,
    Video Man

  15. #15
    Member
    Join Date
    Mar 2011
    Posts
    68
    thanks..ill check it out

    Regards:

    Duarte V.

  16. #16
    Member
    Join Date
    Mar 2011
    Posts
    68
    hey..ive been checking and the site that i say where i can keep my files offers this code to embed mp3

    <IFRAME SRC="http://jumbofiles.com/embedmp3-o8dtgmklcygc/Ed Rush and Optical - Out Of The Box.mp3.html" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=270 HEIGHT=24></IFRAME>

    i believe this is something to insert in html pages right?
    is there anyway to modify it to suite my needs????

    Thanks!

    Duarte V.

  17. #17
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    Yes an iframe is HTML and can be inserted into another HTML page.
    But it has nothing to do with Flash and cannot be used inside a .fla as part of a Flash application.
    There is very little you can do to modify an iframe and I don't see how it would fit into your original project.
    But yes, you can use that iframe on an HTML page. Just remember that you are not accessing the actual .mp3 file but rather loading a separate HTML page into an iframe which is then embedded into your own Web page.
    Best wishes,
    Video Man

  18. #18
    Member
    Join Date
    Mar 2011
    Posts
    68
    Quote Originally Posted by Video Man View Post
    Yes an iframe is HTML and can be inserted into another HTML page.
    But it has nothing to do with Flash and cannot be used inside a .fla as part of a Flash application.
    There is very little you can do to modify an iframe and I don't see how it would fit into your original project.
    But yes, you can use that iframe on an HTML page. Just remember that you are not accessing the actual .mp3 file but rather loading a separate HTML page into an iframe which is then embedded into your own Web page.
    Best wishes,
    Video Man
    Much Thanks!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center