PB file loading external audio mp3

Hello

I use the following code to load and then play a sound file external mp3 called "loop.mp3.
var son: Sound = new Sound (this);
son.loadSound ("loop.mp3", false);
{son.onLoad = function (success)}
If (success) {}
This.Start (0,999);
}
}

When I test my code while being under the environment of the author by using the CTRL + ENTER key, the sound plays correctly but when you launch the single swf file, the sound is not playing. Why?

It's probably that. The pb is solved now, I've updated the flash player and he has worked since.

Urami thank you and happy new year!

Tags: Adobe Animate

Similar Questions

  • Load an external audio file in table?

    Hello.

    I figured out how to load an external video file - and I can play an audio file imported, but I can't seem to use both methods to load an external audio file into a table. (doh)

    Here is my audio code:

    var tour_audio:Array = [tour1, tour2];

    var my_num:Number = Math.floor (Math.random () * 2);

    var ChosenSound = tour_audio [my_num];

    var playing: Sound = new ChosenSound();

    Playing.Play ();

    Here's my video code:

    var my_videos:Array = new Array ('link1.mp4', 'link2.mp4', 'link3.mp4', 'link4.mp4');

    var randomIndex = Math.floor (Math.random () * my_videos.length);

    my_player.source = my_videos [randomIndex];

    I tried ' var tour_audio:Array = ["link1.mp3", "link2.np3"];  - but it does not work.

    Ty

    //  ------------------------

    the table is from your code, the table will be the references for the two audio files

    var tour_audio:Array = new Array();

    then you must create two instances of the sound class to contain the audio files you load into

    var soundClip1:Sound = new Sound();

    var soundClip2:Sound = new Sound();

    then you need a sound channel to play audio files

    var sndChannel:SoundChannel = new SoundChannel();

    It's your randomizer code

    var my_num:Number = Math.floor (Math.random () * 2);

    now, you load each sound file in your instances of the sound using the URLRequest class

    soundClip1.load (new URLRequest ("tour1.mp3"));

    soundClip2.load (new URLRequest ("tour2.mp3"));

    to find out when loading, the files have completed, you must add an event listener to each of the classes of sounds

    These event listeners will be triggered the functions onComplete1 and onComplete2 when loading is completed to each sound file

    soundClip1.addEventListener(Event.COMPLETE,onComplete1,false,0,true);

    soundClip2.addEventListener(Event.COMPLETE,onComplete2,false,0,true);

    This is the function for the first hearing of his charger, it will add the instance of the sound in your table class once loaded the sound

    function onComplete1(evt:Event):void {}

    tour_audio.push (soundClip1);

    }

    This function does the same work for the second audio file

    function onComplete2(evt:Event):void {}

    tour_audio.push (soundClip2);

    }

    Call this function to play the selected audio file

    It could be called from the function of onComplete2 above

    function playRandomSound (): void {}

    var ChosenSound = tour_audio [my_num];

    sndChannel = ChosenSound.play ();

    }

    //  ------------------------

    I added comments to the code itself which should help to explain what is happening. Yes, AS3 is just jam packed with intimidating stuff. As use you it, it will start to make sense.

  • What happens to the audio cd after the cda file are converted to mp3 format? Only the original cd remains unchanged?

    What happens to the audio cd after the cda file are converted to mp3 format? Only the original cd remains unchanged?

    She remains totally unchanged, regardless of how many times it is loaded in the computer.

  • Load external wav files

    I'm currently import mp3 files using the loadSound feature. Problem is, because of some problems of mp3 encoding that I can't use this format due to problems of loop, so I turn to .wav files that work very well. The thing is, if I try to import wav files using the loadSound function it does not work... do not play the wavs.

    Is there a way I can load external wav files in flash?

    You can load a wav, but you can't seem to play by using loadSound().

  • Try to copy MP3 files to an audio disc using Disc Creator

    I'm trying to copy MP3 files to an audio disc using Disc Creator.
    I can find the audio file that I want to copy but do not appear in the Source window.

    Do you mean Toshiba recovery disc creator?

    This tool has been designed with chisel only drive recovery!

    In your case I advise to use a tool like Nero third 3rd

  • Book audio mp3 file unknown

    Hi-

    I'm new brandie mp3 players... and I must say that I learned a little

    This forum...

    I just downloaded a book audio mp3 - I dragged and bumped on my sansa fuze in audio books -.

    the files are all labelled correctly and in order. I was in MSC mode

    But the folder itself is called unknown? on my sansa player...

    but when I look at the file when I am connected to the computer - this is the name correctly

    Then... I'm confused?

    Help please...

    Thank you

    Ellie

    OK - I got it - I have downloaded mp3tag - changed the tags and everything is fine!

  • Is it possible to have a block of text from an external source (ex. TextWrangler file) load in multiple pages (file TW exodus as an "insert" in 4 different pages on a site)?

    Is it possible to have a block of text from an external source (ex. TextWrangler file) load in several pages on a site in the 'performance' (e.g. TW file as an "insert" in various pages)

    Use SSI. If you're on a PHP server just use the PHP include, if not take a look on SSI: the command Include

  • Problem with loading external swf files

    Hello

    I am currently working on a project which is an interactive and dynamic elemtry school presentation to the Denmark. I finished my project and it works perfectly, but only locally on my computer.

    The final draft should be implemented on the site and public work. I tried to implement the project on the site and unfortunately, it does not work as expected.

    When all the files where transferred to the ftp server, only a single files are responding and appear correctly.

    Interactivity of the project is based on a structure of Action script, which is based on the smooth transition between swf files (load another swf file after the action is triggered by clicking on a button) do any work.

    After days of trying to figure out the solution, I'm totally lost. One thing is to publish the project so that all action script will work and answer between swf files, and the other thing is to make it user-friendly for the Android and apple products.

    The presentation is quite heavy because of its loading external swf content files, which are images and movies.

    I really hope you can help me with my problem. I will gladly share the files and codes if it would help solve the problem.

    Best regards

    Agata

    It could be a problem of location of file from loading.  When you place a swf file in an HTML base for targeting anything that the SWF load becomes the folder of the html page.  You may need to adjust the target so that the target of swf files, load it as if it were in the same folder as the html page.

  • How to load external swf files into the AIR

    I try this code its working at the computer, but when I publish this .apk or .ipa file, my external swf file does not open

    (I included my external file as well)

    places_btn.addEventListener (MouseEvent.MOUSE_DOWN, newvid);

    function newvid(event:MouseEvent) {}

    trace ("you clicked me");

    var loadit = new Loader();

    addChild (loadit);

    loadit. Load (new URLRequest ("scene02.swf"));

    }

    01.jpg

    Add this in your newid function:

    You forgot to put the beginning of your original function:

    var loadit = new Loader();

    addChild (loadit);

    var _lc:LoaderContext = new LoaderContext (false null, ApplicationDomain.currentDomain),

    loadit. Load (new URLRequest ("scene02.swf"), _lc);

  • plain text files load from an external file

    I created a text file from an external load file. I am facing a problem is that the text does not load unless someone click on the button. I'd like the text is displayed as soon as someone enters the page.

    Here is the link to the website http://hitenkajal.co.uk/our_story.html

    Username: hitenkajal.co.uk

    password: sairam11

    and my screen below codes:

    Plain text files load from an external file

    var textLoader:URLLoader;
    function loadStory(evt:MouseEvent):void
    {

    textLoader = new URLLoader();

    textLoader.addEventListener (Event.COMPLETE, textLoaded);

    textLoader.load (new URLRequest ("MobyDick.txt assets/Franck"));
    trace ("hit_btn");
    }

    hit_btn.addEventListener (MouseEvent.CLICK, loadStory);


    function loadHowwemet(evt:MouseEvent):void
    {

    textLoader = new URLLoader();

    textLoader.addEventListener (Event.COMPLETE, textLoaded);

    textLoader.load (new URLRequest ("assets/pencil kajal MobyDick.txt"));
    trace ("kaj_btn");
    }

    kaj_btn.addEventListener (MouseEvent.CLICK, loadHowwemet);

    function loadProposal(evt:MouseEvent):void
    {

    textLoader = new URLLoader();

    textLoader.addEventListener (Event.COMPLETE, textLoaded);

    textLoader.load (new URLRequest("assets/proposal.txt"));
    trace ("pro_btn");
    }
    pro_btn.addEventListener (MouseEvent.CLICK, loadProposal);

    function textLoaded(evt:Event):void
    {

    Container.info_txt.text = textLoader.data;

    }

    Creation of a ScrollBar to a text field
    var dragRect:Rectangle = new Rectangle(drag.x,drag.y,0,bar.height-drag.height);
    drag.addEventListener (MouseEvent.MOUSE_DOWN, dragMouseDown);


    function dragMouseDown(evt:MouseEvent):void
    {
    drag.startDrag (false, dragRect);
    stage.addEventListener (MouseEvent.MOUSE_UP, dragMouseUp);
    addEventListener (Event.ENTER_FRAME, scrolling).
    }

    function dragMouseUp(evt:MouseEvent):void
    {
    drag.stopDrag ();
    stage.removeEventListener (MouseEvent.MOUSE_UP, dragMouseUp);
    removeEventListener (Event.ENTER_FRAME, scrolling).
    }

    function scrollText(evt:Event):void
    {
    var percentScrolled:Number = (drag.y - bar.y)/(bar.height-drag.height);
    Container.y = percentScrolled * (bar.height - container.height) + bar.y;
    }

    I do not know what Maury is trying to say, but the code is very well.  1009 error means your code is trying to target something that does not exist for as far as the code sees it.  In your function textLoaded, add the line I show below and see what appears in the output...

    function textLoaded(evt:Event):void
    {
    trace (container, container.info_txt);

    Container.info_txt.text = textLoader.data;
    }

    If the output shows undefined, then you have a problem insofar as the container or the textfield inside it sucks... most likely a naming problem.

  • How can I fix avi files importing as audio only?

    I'm experimenting Premiere Pro, am new for her and for video editing and not a techie. Unfortunately, I do not know the source of the camera to the original files but it's Sony and a HD. The files came as an .avi extension. They opened with Windows Media - I tried a suggestion in the forums to open with Quicktime, but same problem. I also changed the file at the same time .move and .mpeg extension (I think that was the suggestion) and got "could not open the file due to an error header '.

    I also tried the recommendation I've seen several times on upload the ffmpeg.exe and create a bat file {' error is "the file has no audio or video stream").}

    I also downloaded the pac k - lite codec.

    I'm on Windows 7 Home Premium, 64-bit operating system. The Codec for the video is H264. I have several files, however, the mediainfo on a typical is below.

    Hope you can help as I have a date a customer Tuesday deadline. I see that many people have had frustrations with importing files in Premiere Pro, but I'm just a beginner and open to resolve this, even if not a techie. I don't really have any idea what I'm doing, please be patient with me!

    General

    Full name: D:\docs\LGBT\01778.avi

    Format: AVI

    Format/Info: Audio Video Interleave

    File size: 302 MiB

    Duration: 9 min. 45 sec.

    Overall bitrate: 4 332 Kbps

    Writing application: Lavf51.12.1

    Video

    ID                               : 0

    Format: AVC

    Format/Info: Advanced Video Codec

    Format profile: [email protected]

    Parameters of the format, CABAC: No.

    Parameters of the format, Reframes: 1 frame

    Parameters of the format, GOP: M = 1, N = 12

    Codec ID: H264

    Duration: 9 min. 45 sec.

    Flow rate: 4 192 Kbps

    Width: 1 920 pixels

    Height: 1 080 pixels

    View picture format: 16:9

    Frame rate: 25.000 fps

    Color space: YUV

    The chroma subsampling: 4:2:0

    Color depth: 8 bit

    Scan type: Progressive

    /(pixel*Frame) bits: 0,081

    Stream size: 293 Mio (97%)

    Audio

    ID                               : 1

    Format: MPEG Audio

    Format version: Version 1

    Format profile: Layer 3

    Mode: Joint stereo

    Mode extension: MS Stereo

    Codec ID: 55

    Identifier of the codec/Suggestion: MP3

    Duration: 9 min. 45 sec.

    Bit rate mode: Constant

    Flow rate: 128 Kbps

    Channels: 2 channels

    Sampling frequency: 44.1 KHz

    Compression mode: lossy

    Stream size: 8.93 million (3%)

    Alignment: Aligned on interleaves the

    Interleave, duration: 26 ms (0.65 video frame)

    Interleave, duration: 26 ms

    If there had been no conversion of the original material - which I doubt - then rename AVI MTS can operate, it's at least test. That still leaves you without all the metadata, but it might be better than nothing.

    If the original material has been transformed, and it is likely, then you have to Google for a converter that takes one editable format. Always your best bet is to ask the shooter (M/F) to send you the original files on a data DVD / USB stick or external drive.

    Colin referring to ffmpeg, not the pack K-Lite. I'm not a fan of ffmpeg it caused me headache, but Colin has found some ways to make it feasible.

  • Hi, I use iTunes 12.3.2.35 on a Windows 7 computer. I don't seem to be able to import files from a CD that contains the files on it as mp3 files. If I launch iTune and then put the CD in, it doesn't appear and I can't drag and drop.

    Hi, I use iTunes 12.3.2.35 on a Windows 7 computer. I don't seem to be able to import files from a CD that contains the files on it as mp3 files. If I start iTunes and then put the CD in, it doesn't appear and I can't drag and drop.

    It would not seem like an audio CD, as a drive in this way is a data disc when it contains mp3 files. You would need to access the file menu in iTunes, manage files here. If you manually manage music, you will need to access it as a regular folder on your computer. In iTunes, go to file > add file to library, and select individual files.

  • How to identify a codec music for a file labeled 60 MB MP3 (wrongly?)

    This file carries a label MP3 but Windows Media Player says it cannot identify the compression used.

    This file carries a label MP3 but Windows Media Player says it cannot identify the compression used.

    ========================================
    Sounds redundant... I don't know... but if you use the following
    freeware to convert the MP3 it will create a file in MP3 format...
    a new version of the file that may be compatible.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Freemake - Free Audio Converter
    http://www.Freemake.com/free_audio_converter/
    (Windows XP / Vista / 7 / 8)
    (* Read * all * the installation screens... it)
    may be a few items you want to unmark *)

    When you have installed Freemake... Open Freemake
    and drag and drop your MP3 files on the main screen.

    Or... Click left on the Audio button, then navigate to the
    your MP3 file is saved in the folder.

    Select (highlight) the files you want to import into
    Freemake and left, click on the button 'open '.

    When your music files are imported into Freemake,
    On the left, click the MP3 icon at the bottom of the screen.

    The "Output settings" screen opens.  Choose
    ' Save in ' file so you can find the converted files.

    On the left, click the "Convert" button and the files must be
    converted very quickly.

    That should do it...

    If this does not work... try to convert to the. WMA format.

  • Load external text in Adobe animate CC

    Hello!

    I am interested to load external text in a HTML5 Canvas with Adobe animate.

    This text should be bold and italic tags too.

    Any help?

    Concerning

    [Ask in the correct forum allows... Left generic Cloud/Setup forum for forum specific program... MOD]

    Of course, you can load data in the form of XML or JS files. JS (via the injected script tag) has the advantage of working from the local file system, while XML (via XMLHttpRequest) works for a web server.

    However, you won't be able to display any bold/italic formatting by using the native Flash text objects online. To do this, you superimpose native text HTML elements on the stage.

    Here is a simple example of loading an XML file:

    // load XML file
    var req = new XMLHttpRequest();
    req.open("GET", "test.xml", true);
    req.addEventListener("load", transferComplete);
    req.send();
    
    function transferComplete(e) {
        var rawXML = e.target.response;
        console.log(rawXML);
    }
    
  • run the error when go to the "home" button after loading external swf

    I work to develop an Android app to learn Arabic, it's very simple.

    to explain the alphabet, I create and load files SWF external, first and second Chargers work well (loading and when click the buttons there is not any question)

    but the third charger charge well also, but the problem when I test project, I make me run error when press home.

    (it does not occur when you load other chargers)

    Here are the sisters Project.rar Android - Google Drive files

    Thank you

    the problem is in the way that you use to add the listeners to events for the buttons, you add a listener for them different click events each keyframe, so you need to remove the headphones before you leave for another frame.

Maybe you are looking for

  • Connect you to Skype does not work with the correct user name and password

    I tried to login with my correct user name and password, but received the error: unable to connect to Skype. So, I reset the password and can log on the Skype website. Tried to connect to Skype and the same error: unable to connect to Skype. I use Ma

  • Address of the HP b2600 Workstation ID.

    We have no workstation HP b2600 with ID can I use this ID on another machine HP b2600? Depends on the mac machine ID? Can I copy and use on another machine? Rajiv Garg.

  • Pavilion dv 9420 and Windows 7?

    Im proud of my laptop and how my old self built desktop running Windows 7. Does anyone have this race?  I prefer to 64 bit. You simply use the Vista drivers? Everything went wrong?

  • HP Pavilion dv7-4151nr broken hinges

    Looking for specific instructions to dv7-4151nr to change the left hinge broken myself.  HP does not list the hinge as a spare part for would appreciate suggestions to find the part from a reliable source. I found videos and instructions for other HP

  • Unable to share internet access among the accounts of users in the same computer

    Hello I have bsnl connection broadband through beetel 110tc1 adsl2 modem + router connected through administrator account. the computer has also other user accounts of my son, but he is not able to connect because the computer does not display this c