Saying my mp3 player flash for a list of his songs to an xml file

Hello

What should I put in my code to tell my mp3 player to enter his songs to a folder on my server via an xml doc that I issued my sql server? (the mp3 player is also on the server).

Thanks in advance!

Here is my code so far:

Here is my code:

import flash.events.MouseEvent;
import flash.media.Sound;
import flash.net.URLRequest;
import flash.media.SoundChannel;
Import fl.events.SliderEvent;

var myMusic:Sound = new Sound();
var soundFile:URLRequest = new URLRequest ("lpwfte.mp3");
channel: var SoundChannel = new SoundChannel();
var sTransform:SoundTransform = new SoundTransform();
var myTimer:Timer = new Timer (100);
var songPosition:Number = 0;
var myContext:SoundLoaderContext = new SoundLoaderContext (5000);

myMusic.load (sound file, myContext);

myTimer.addEventListener (TimerEvent.TIMER, updateTime);
buttonPlay.addEventListener (MouseEvent.CLICK, playMusic);
btnStop.addEventListener (MouseEvent.CLICK, StopMusic);
sldVolume.addEventListener (SliderEvent.CHANGE, ChangeVolume);
myMusic.addEventListener (Event.COMPLETE, getSongLength);
btnPause.addEventListener (MouseEvent.CLICK, pauseMusic);

function pauseMusic(evt:MouseEvent):void
{
songPosition = channel.position;
Channel.Stop ();
}

function convertTime(millis:Number):String
{
var Minutes: Number = (millis % (1000 * 60 * 60)) / (1000 * 60);
var seconds: Number = ((millis % (1000 * 60 * 60)) % (1000 * 60)) / 1000;
If (< 10 minutes)
{
var displayMinutes:String = '0' + Math.floor (Minutes);
} else
{
var displayMinutes:String = Math.floor (Minutes) m:System.NET.SocketAddress.ToString ();
}
If (second < 10)
{
var displaySeconds:String = '0' + Math.floor (Seconds);
} else
{
var displaySeconds:String is Math.floor (Seconds) m:System.NET.SocketAddress.ToString ();.
}
Return displayMinutes + ":" + displaySeconds;
return (Math.floor (Minutes) + ': ' + Math.floor (Seconds));
}

function updateTime(evt:TimerEvent):void
{
lblSongTime.text = convertTime (channel.position);
}

function getSongLength(evt:Event):void
{
lblSongTotalTime.text = convertTime (myMusic.length);
lblSongName.text = myMusic.id3.songName;
lblSongArtist.text = myMusic.id3.artist;
lblSongYear.text = myMusic.id3.year;
}

function ChangeVolume(evt:SliderEvent):void
{

sTransform.volume = sldVolume.value;
channel.soundTransform = sTransform;
}

function StopMusic(evt:MouseEvent):void
{
Channel.Stop ();
songPosition = 0;
}

function playMusic(evt:MouseEvent):void
{


Channel = myMusic.play (songPosition);
myTimer.start ();
}

Google search for view a tutorial using terms such as "AS3 XML tutorial.  One of them should show you the code you need to parse the xml data in variables, you can use in your code to your mp3 URLRequest value.

Tags: Adobe Animate

Similar Questions

  • How can I make USB mp3 player/flash drive bootable?

    Hello
    I have a big problem. Less than a month ago, I backed up my computer using the latest version of Norton ghost 10.0. I then burned the data on a DVD and I kept it safe. today I encountered a problem, I just couldn't cess internet on my laptop, install/uninstall a program, or access help and support. so I got the DVD in the DVD drive backup, I open Norton ghost clicked recovery and then clicked on restore my computer. I told where to look for the backup and restoration began, but then I came across an error message that says the following:

    Cannot complete the restore point recovery d:\Toshiba ghost image001.v2i

    -EC8F178F error: unable to complete the restoration of recovery point: D:\Toshiba ghost image001.v2i.
    -EC8F03F1 error: could not open the recovery point "D:\Toshiba ghost image001.v2i.
    -EBAB03E9 error: internal error of Application: c0000005 Memory Access Violation: Application attempted to read memory at 034bac3c.

    I have another way to restore the data, that it is thanks to an mp3 player or flash bootable disk, the computer, but on the flash disk, the operating system there. is it possible to do the flash drive bootable.
    I would like to know this, because if it starts the flash or mp3 disc I can then delete the contents of the hard drive and restore data.

    and also when you try to restore, he said a file or program using the sound trying to restore.

    can someone help,
    concerning

    Hello kamal

    The best way to start the device in DOS mode is to use the external floppy drive. This disc is not expensive and if your data is so important, you can invest a few dollars to buy it. Using the startup disk that you'll be able to boot into DOS mode and do what you want to do.

    I also recommend you to contact Norton and see if they have a solution just how to install the created image.

    With mp3 player, you will not be able to start.

  • Restore player flash for android devices

    iRequest you guys to restore Flash on the android device. I am unable to navigate flash allows Web sites on my android devices Please guys restore flash on android devices

    Hi Pragathesh,

    Flash Player for Android is no longer available. For more information, see here:

    http://blogs.Adobe.com/flashplayer/2012/06/Flash-Player-and-Android-up date.html

    Android users can always download and install Flash Player from Flash Player Versions archived page on the Adobe Web site.

    Please visit: http://forums.adobe.com/thread/1061194

    Please visit this page for a list of all certified devices:Flash Player certified devices

    You can check this link for Flash player versions archived: html http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.

  • That would REALLY APPRECIATE HELP: Mp3 player Flash integrating Web site

    Hello all - would really appreciate some help with this problem as it did my headache for the last two weeks.

    I bought a mp3 active Den flash player which I'm hoping to incorporate into my site (tumblr). The mp3 player has been done 2 years ago and I am not offered a support beyond the help file, which in itself is pretty useless!

    Mp3 with all necessary files folder is here;

    http://www.mediafire.com/?jdwuuex8k9h4o71

    And the code for my site is here;

    http://www.mediafire.com/?dptrtg9pdisp6rr

    I'm hoping to add a transparent background too so it overlay the site itself when activated, to help with this would go this far.

    I would really appreciate anyone who can offer support here, because I feel short changed by the designer and lost to the implementation of my purchase.

    Thank you very much.

    James

    You want to watch the position: fixed in your CSS:

    http://www.w3schools.com/cssref/pr_class_position.asp

    If you found my useful answers or an answer to your question, I would be grateful if you selected my messages as well.

    Good luck in the final part of your project!

    Adninjastrator

  • End of AIR MP3 Player Flash

    Hello

    I thought I had it down, but doesn't seem to work...


    I want to create a Flash AIR application using the code below.  I used this code in the past and it works very well.  I keep 4 audio files (in a folder called "audio") and an XML file on my server so I can pass the names of the music and the railroad once distributed.

    It works FINE when I run it as a Flash file.  When I publish it as an AIR application, install it... the text works fine, BUT I don't hear any music.

    Any suggestions?


    Code:

    var my_songs:XMLList;

    var my_total:Number;

    var my_sound:Sound;

    var my_channel:SoundChannel;

    var current_song:Number = 0;

    var song_position:Number;

    var song_paused:Boolean;

    var myXMLLoader:URLLoader = new URLLoader();

    myXMLLoader.load (new URLRequest ("http://myurl/playlist.xml"));

    myXMLLoader.addEventListener (Event.COMPLETE, processXML);

    function processXML(e:Event):void {}

    var myXML:XML = new XML (e.target.data);

    my_songs = myXML.SONG;

    my_total = my_songs.length ();

    / / playSong (0);

    myXMLLoader.removeEventListener (Event.COMPLETE, processXML);

    myXMLLoader = null;

    }

    function playSong(mySong:Number):void {}

    myTitle var = my_songs[mySong].@TITLE;

    var myArtist = my_songs[mySong].@ARTIST;

    var myURL = my_songs[mySong].@URL;

    title_txt.text = myTitle.

    artist_txt.text = myArtist;

    if {(my_channel)

    my_channel.stop ();

    my_channel.removeEventListener (Event.SOUND_COMPLETE, onNext);

    }

    my_sound = new Sound();

    my_sound.load (new URLRequest (myURL));

    my_channel = my_sound.play ();

    my_channel.addEventListener (Event.SOUND_COMPLETE, onNext);

    }

    next_btn.addEventListener (MouseEvent.CLICK, onNext);

    function onNext(e:Event):void {}

    current_song ++;

    if (current_song > = my_total) {}

    current_song = 0;

    }

    playSong (current_song);

    }

    prev_btn.addEventListener (MouseEvent.CLICK, onPrev);

    function onPrev(e:MouseEvent):void {}

    current_song -;

    if (current_song < 0) {}

    current_song = my_total-1;

    }

    playSong (current_song);

    }

    pause_btn.addEventListener (MouseEvent.CLICK, onPause);

    function onPause(e:MouseEvent):void {}

    if {(my_channel)

    song_position = my_channel.position;

    my_channel.stop ();

    song_paused = true;

    }

    }

    play_btn.addEventListener (MouseEvent.CLICK, onPlay);

    function onPlay(e:MouseEvent):void {}

    if {(song_paused)

    my_channel = my_sound.play (song_position);

    song_paused = false;

    { } else if (! my_channel) {}

    playSong (current_song);

    }

    }

    Well here is the first problem,

    It works as a flash on your Web site application, because the SWF file is operating within the domain, so that she can access directories and files limited only world. Your audio directory is limited in this sense, go ahead and click this button:

    http://www.stickybangbang.com/audio/

    Then when AIR makes the request, we get deny the same way you use the browser.

    Second thing you have drawn your attributes XML to make sure they are read correctly?

    Third thing:

    I don't see where you add the names that you get in the XML list to the URLRequest song. Also your URLRequest does not include /audio/ because it already exists in your XML.

    must be:

    var songRequest:URLRequest = new URLRequest();

    songRequest.url = "http://www.stickybangbang.com/" + my_songs [song number] .attribute ('URL');

    my_sound = new Sound();

    my_sound.addEventListener (Event.COMPLETE, playLoadedSong);

    my_sound. Load (songRequest);

    If you want to restrict your stuff and seem to play, you'll need to do some PHP and hide your songs in a data base or maybe leave it in the folder and put the script php on the main URL like stickybangbang.com/getSong.php.

    The php script would be to select the blob to the database and return or select the file at your request. So if you have used a URLLoader and fixed a number of song to it, you might have PHP get that number and logic by MAIL.

    Like this:

    <>

    $theSongNumber = $_POST ['varFromFlash'];

    if($theSongNumber == 0) {}

    Return file_get_contents() (file (.. / title.MP3));

    }

    ?>

    or something like that you'd have to google or I need to examine the issue more. You should of course always include a search of the database of modules because then - could someone just ping this script and retrieve your files.

    Anyway maybe to keep things simple for now try remove restrictions folder and tests. Let me know,

    Jesse

  • I'm on a mac trying to download install ff player flash for a friend with windows - its browser is inoperable, so he needs to install ff to access the net.

    internet connection Wi - Fi friends is OK, but after update explorer 8 browser has been cut. Now, he has a good wireless connection to act as a browser interface. If I could download the installer of firefox to a flash drive and copy in his work the problem would be solved.

    My problem is; Mozilla download page see my mac and only allows me to download a mac version. A choice before you download a version might be nice. How it can access the net without the browser.

    You can download Firefox for any operating system and the language of http://www.mozilla.org/en-US/firefox/all/

  • list - restrictive entry visibility and external xml file in the drop-down list

    The question applies to the OPA 10.1, but if a solution requires a version more recent OPA (e.g., 12.1) we can update so please let me know what version your answer applies to.

    I have a series of tabs of a spreadsheet Excel that map different categories on each other and I want to implement this OPA so that there are six screens with drop-down lists and visible elements two on-screen menu will depend on the selected item in the display 1. list to display 3 items will depend on the selected item in the screen 2, which depends on the item selected on the screen 1, etc..

    For example,.

    1 screen can be States:

    Maryland

    Virginia

    New York City

    Georgia

    ...

    2 screen could then be counties: assuming that Virginia has been selected...

    Accomack

    Albemarle

    Alleghany

    ...

    3 screen could be cities: assuming that Accomack is selected...

    Exmore

    Parksley

    ...

    Basically I have large spreadsheet list of lists with items (one list a 2040 pieces) and so I can't manually enter easily list items.  I would like to 'specify the name of the list' and have the OPA to use an xml list (easily created my spreadsheet), but the OPA Help menu says "NOTE: this implementation of the xml list does not support default values or visibility...» "So it seems that I won't be able to make invisible inapplicable list items.  So, to use the fictitious example above, if I chose the State of Maryland, I will not applicable to Virginia or any other State counties, but Maryland is visible; Yet, all counties in the country should be included in the list in the first place.

    If someone knows a solution or another solution to this problem (other than creating custom functions) so please let me know.

    "Out of the box' for 10.1 you can try the following:

    Have simply a separate list for each of the sub-components. He can do even a little painful, but you have not at least custom functions or custom controls.

    On the first screen you have the attribute collection the State using the list of States (provided via xml).

    On the second screen you have the County collection attribute - but repeated 50 times - and then use visibility to show/hide the template you want (which then has the correct xml for the counties in the State).

    On the third screen you have your attribute for the city (once again the same attribute for each list) but isn't there it gets a little mean to 50 times counties in the State.

    In terms of writing that required visibility rules that you can probably leverage Excel to do much of the building of the rule for you to lists (remembering that the compiler takes that you as the user see in Excel, not the function that sees Excel)- so there is not a lot of extra work in the perspective of rules.

    The sticking point will simply put all of these attributes and binds the attribute visibility for the right control (and right xml).

    Proceed with caution (extreme!), but... If you're already Automation to create the XML lists from Excel, then you might want to automate the creation of xml screen. But be very careful. I've seen some projects that have used automatically generated screens and they did the job of the ok - but certainly a warning any time major health you do not use OPM to generate a component of OPM.

    Then... it is possible to do it manually - but you probably want to get involved some automation.

  • Do not click then that would start in a player flash for a clean installation of El Capitan.

    Bootable media created on a flash drive to do a clean installation of El Capitan on my MBP to Mid 2009. Once I'm booted up in the newly created disk, I can't click on anything in the public services. Chaotic strikes me disk utility, but clicking on does not. I can arrow up to my HD, but unable to select erase. To be clear, I CAN click around in disk utility when I'm booted up 'normally' in my HD. But when I restart, press the alt/option key and select the flash drive, I created for the new facility, click on in order to continue this process is not an option.

    First aid post ever. Hope that plays by the rules. Thank you very much!

    It's very strange behavier. Have you tried to clean your trackpad? Have you tried a wired mouse?

    Before you click to install flash player, the mouse was sensitive to other options?

  • I use Windows Media Player 11 for Vista. When I try to play WMV files, the video is low and dark gray.

    This has only started recently.  Also the same thing is happening now with my Skype video.

    Hi norightbrainleft,

    1. you remember to make changes to the computer, after which the issue started?

    I suggest updating the graphics card driver and check if it helps:

    Updated a hardware driver that is not working properly

    Also, take a look at the following links in the article:

    Get the best display on your monitor

    Adjust the brightness and contrast of your monitor

    I hope this helps.

  • Getting error #1009 in my mp3 player

    Hello

    I am new to AS3 and flash. I'm making a mp3 player that plays multiple pieces through a playlist in an XML file. I get this when I try to test it.

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at mp3player_fla::MainTimeline/frame1() [mp3player_fla. MainTimeline::frame1:35]

    TypeError: Error #1090: XML parser failure: element is incorrect.

    at mp3player_fla::MainTimeline/processXML() [mp3player_fla. MainTimeline::frame1:42]

    at flash.events::EventDispatcher/dispatchEventFunction()

    at flash.events::EventDispatcher/dispatchEvent()

    at flash.net::URLLoader/onComplete()

    Is happening here? The following XML code thus:

    <? XML version = "1.0" encoding = "utf-8"? >

    < songs >

    < = song name "Glow in the Dark" file = " " https://files.NYU.edu/gal287/public/audiofortheweb/glow-in-the-dark.MP3 " />

    < = song name "Kick" file = " " https://files.NYU.edu/gal287/public/audiofortheweb/kickstarter.MP3 ″ />

    < = song name "Lovers Walk" file = " " https://files.NYU.edu/gal287/public/audiofortheweb/lovers-walk.MP3 ″ />

    < = song name "Power Juice" file = " " https://files.NYU.edu/gal287/public/audiofortheweb/power-juice.MP3 " />

    < = 'Time to go' song name file = " " https://files.NYU.edu/gal287/public/audiofortheweb/time-to-go.MP3 " />

    < / songs >

    Thanks in advance!

    :

    function loadSong(mySong:Number): void {}

    var myFile = my_songs[mySong].@file;

    Song.Load (new URLRequest (myFile));

    myTitle var = my_songs[mySong].@name;

    songStatus_lbl.text = "play";

    nowPlaying_lbl.text = "Now Playing:";

    songTitle_lbl.text = "myTitle".

    If {(channel)

    Channel.Stop ();

    channel.removeEventListener (Event.SOUND_COMPLETE, nextSong);

    }

    song = new Sound();

    Song.Load (new URLRequest (myFile));

    Channel = song.play ();

    channel.addEventListener (Event.SOUND_COMPLETE, nextSong);

    play_btn.mouseEnabled = false;

    pause_btn.mouseEnabled = true;

    myTimer.start ();

    }

  • I try to install my mp3 player, but it comes out with an error code 10

    I used to be able to connect my mp3 player (Sandisk Sansa Clip +) and sync my songs to it.  Now, he does not and says it has an error code 10 when I try and troubleshoot it and update.  What continues?

    Hello

    Thank you to contact Microsoft Community and we will be happy to help you with your concern.

    According to the description, MP3 player is not being recognized.

    The problem may occur due to corrupted drivers.

    Perform the steps from the link below and see if it helps.

    http://KB.SanDisk.com/app/answers/detail/A_ID/42/~/Sansa-player-not-recognized-by-the-computer

    Hope this information helps.

    Answer to us if you are having problems with MP3 player not getting not recognized or any other issue of Windows and we'd be happy to help you.

    Good day!

  • Impossible to download files from the mp3 player to windows media player

    Original title: GPX ML648B MP3 Player 2 GB

    Hello

    I'm trying to download files from the mention of the above mp3 player for windows media player with Windows 7 on the laptop?

    Any suggestions or solutions.

    Thank you

    Roslyn

    Hello

    (1) if it works much earlier?

    (2) you get an error message?

    When you connect the MP3 player to the laptop, it appears in the computer as a removable disk?

    If the State, then perform the following steps.

    (a) find the files MP3, to modify, select toolbar, select ALL, then copy.

    (b) navigate to where you want music go on your hard drive, (usually the My Music folder), the toolbar, select Edit, Paste.

    (c) open Windows Media Player from the toolbar, select organize libraries, manage libraries and the music.

    You can also see the following article for more information;

    Add items to the Windows Media Player library:

    http://Windows.Microsoft.com/en-us/Windows7/add-items-to-the-Windows-Media-Player-library

  • Unable to sync Mp3 player with Windows Media Player 12 on Windows 8

    Hello

    I have a MP3 SA018 of Philips player. Windows Media Player 12 does not detect this mp3 player. Therefore, I can't sync music.
    However, when I connect the MP3 player on my laptop Asus N53SV (Windows 7 Home Premium, x 64), it works fine.
    In Device Manager (devmgmt.msc) is the visible MP3 player as a Portable device. The device driver is "WPD file system Volume driver". According to the manual for this MP3 player, no additional software is necessary. Windows Media Player should be recognized.
    Does anyone have an idea how to solve this problem?

    The drive is displayed in Windows Explorer.

    Specifications of the PC:
    -Card mother Asus P5K
    -Windows 8 Pro (x 64)
    -4 GB OF RAM
    -Intel Core 2 Quad Q6600 CPU
    -M4 crucial SSD
    -Samsung Spinpoint HD753LJ 750GB SATA HDD.
    -Windows Media Player 12.0.9200.16578

    Thanks in advance,

    Stefan.

    Original title: Windows Media Player 12 does not detect my mp3 player

    Hello Stefan,

    I'm glad to know you found how to solve this problem. Thanks for sharing this information with us. I'm sure this will help other forum users having the same problem. We really appreciate the way you figured this out.

  • XML file for GigE Vision camera

    Hello

    I'm working on a model of GigE Vision camera. It should be very simple linescan camera. I put in place the necessary set of registers GigE Vision, can communicate with the camera in MAX. The problem is that I need creata this XML file for the camera. There is this here XML file:

    http://www.EMVA.org/CMS/upload/standards/GenICam_Downloads/SFNC_Reference_Version_2_0_0_Schema_1_1.x...

    What should I do with it? My first version of the camera will have 2 functions: turn on and off I'm confused, because the model xml file has many functions, I don't really have. Should I remove them? Or leave it inside with default values? That she needs a configuration minimum XML file?

    Kind regards

    Linus

    Hi Linus,

    If you look at the GigE Vision specification, you will see that there is a minimal subset of functionality that must be present for the camera be declared compliant. That's all what IMAQdx will need for the camera works fine. All other functions in the XML file that you downloaded are part of the SFNC (features Standard Naming Convention) defines the names/behavior for common characteristics that are often found on machine vision cameras. As a general rule, cameras implement a subset of these features. You should not let any features that are not implemented in the XML because it would be just confused because they would do nothing.

    Eric

  • LinkButton access the list of URLS in the xml file

    Hello

    I have a list of URLS in an external xml file.  When my linkbutton is clicked, I want a new tab to open with the URL of the xml file.  I don't know how to save the xml file in my mxml component so that I am able to reference the URL in the xml file.

    This is how my xml is formatted:


    < xml >
    < link > http://www.Google.com < / link >
    < / xml >

    This is what my linkbutton code looks like:

    < mx:itemRenderer >
    < mx:Component >
    < mx:LinkButton label = "hyperlink" textDecoration = "underline" color = "#FF9900" fontSize = "11" / >
    < / mx:Component >
    < / mx:itemRenderer >

    Thank you!

    What other data would be displayed? The number of columns? All this will be in the xml file. You do not have to display the url in a column, but it must be linked with data from other columns. Thus, when you click on this line, the url is available from the itemClick Manager and open the link.

    Here's some code I've used; I've cut out a lot of things specific to my application, so you can get an error or two, but that's how you can get started:

    XML data file *.


      http://www.Google.com"target ="_blank"/ >
      http://www.Microsoft.com"target ="_blank"/ >
      http://www.Adobe.com"target ="_blank"/ >

    application *.

    Script block *.


    manage the results of service:
    public void linksServiceResult(event:ResultEvent):void {}
    linksxml = event.result as XML;
    }

    public void gotoLink(event:ListEvent):void {}
    navigateToURL (new URLRequest (dgLinks.dataProvider [event.rowIndex] .@url), '_blank');
    }

    ******* UI ************


     
      
        
         
           {data.@description}"/ >}
         

        
      
      

      
     

Maybe you are looking for

  • Lithium2-UL8E compatibility with a Media Center M7277C

    I need to replace a motherboard of Lithium-UL8E on a M7277C.  The CPU 4 pin power connector burned/melted after years of relatively stable use.  I know it's silly to put the money into a motherboard on a system of this age, but no one knows if a Lith

  • binary hex.

    I searched and found examples of exactly what it is that I want to do, but for some reason I do not get the correct values, I want. All I have to do is take a hexadecimal value... 1F4EF5 and translate in simple BCD so that I take part at the level of

  • Driver M1136 MFP does not not in Windows8.1 64-bit

    My printer model is M1136 MFP. I tried to install the driver but he failed and blocked middile of MyWindowsApp 8.1 64-bit installation and I found that it is the same listed driver for windows 64-bit 8 too.

  • his bad breaks

    Whenever I play any type of file with the audio in it (whether in a movie in my computer, online audio or video files), sounds very bad, breaks every 2 seconds or more.I tried to disable the sound improvements and updates of pilot (there's no availab

  • Lesson 1-1 code is correct?

    Hi all.I just started watching a course and have finished all the chapters of lesson 1, no homework and quiz.So we in Lesson 1-1 example usage of lambda expressions (with my method createStudentsList() to fill the list):Students list < student > = cr