AS3 mp3 encode problem

Hello

We develop an application that could play mp3s in a music store. We found that the MP3s downloaded from the store can not play be the as3 Sound class. The file information can be a burden, but just do not play. The same code (something like new Sound(); load (urlrequest); play ();..) will work to some of the other mp3s. I searched on the internet. Looks like it's only way to play mp3s in AS3. Some old AS2 code could play these mp3s in sound.loadSound (). I do not understand why the old method is better than the more recent, and it is in the drive and even flash editor. I have re-encoded mp3s by Adobe Media Encoder, and the AS3 player will work. But I can't do it for the mp3 downloaded to each client. On the internet I can't find what is the specification of environmental Flash mp3 encode. And mp3 players can play these same mp3s Flash AS2.

Help, please!

Andy

Finally. The music can be played on iphone, no matter what has happened to the debugger flash on pc. How it's stupid! Although I can't test my application on PC, I can test it by publishing it to iphone. Fortunately, it's not a browser project.

Tags: Adobe Animate

Similar Questions

  • [LIKE, CS4] Import and export text file that contains the tag: encoding problem

    Hello

    I have a script that exports a text selection into a temporary folder (Unicode) text file with label. This file is then loaded in a variable AS and transformed line-by-line for some changes to the text. Subsequently a new text file with the modified content is written.

    Up to CS2 (and 10.4 PPC) this script worked like a charm. He stopped working with the new system and Intel. Meanwhile, I discovered that it must have something to do with encoding problems. «Everything in the old writing with ' as a unicode text "forced a mistake (since AS 2 each text is processed as UTF - 16), so I changed these lines to ' as text '.»

    In addition, I realized, that InDesign exports to tag text Unicode like UTF-16 (little endian), but importing tagged text to UTF-16BE (big-endian). "As variables and" write iconv ' command uses MACROMAN, so I added a few conversions with ""and it worked.

    Unfortunately the last conversion of MACROMA in UTF-16BE converts all spaces in the output string en normal spaces.

    I am therefore a little at my end of the problem. Can someone help me please?

    See you soon

    Tobias

    [InDesign 6.0.4 with AppleScript on Mac OS v2.0.1 X 10.5.8, Intel]

    A code for the relevant parts:

    Export as referenced text selection:

    on TMPexportTaggedText(myFileName, myText, myEncoding)
        tell application "Adobe InDesign CS4"
            tell tagged text export preferences
                if myEncoding = "ascii" or myEncoding = 1 then
                    set character set to ASCII
                else if myEncoding = "ansi" or myEncoding = 2 then
                    set character set to ansi
                else if myEncoding = "unicode" or myEncoding = 3 then
                    set character set to unicode
                else if myEncoding = "jis" or myEncoding = 4 then
                    set character set to shift JIS
                else if myEncoding = "gb" or myEncoding = 5 then
                    set character set to GB18030
                else if myEncoding = "ks" or myEncoding = 6 then
                    set character set to KSC5601
                else
                    set character set to ansi
                end if
                set tag form to abbreviated
            end tell
            export myText format tagged text to (myFileName) without showing options
        end tell
        tell application "Finder"
            try
                do shell script "iconv -f UTF-16LE -t UTF-16 " & (POSIX path of myFileName) & " > " & (POSIX path of myFileName) & "1"
                set myFileName to myFileName & "1"
            end try
        end tell
    end TMPexportTaggedText
     
    

    Line and placement in InDesign (circleLines not the textual changes and throw a string with):

    set theOutput to my circleLines(IN_File & "1", myOptions)
        
    if theOutput ≠ "" then
      tell application "Finder"
        open for access file (OUT_File & "1") with write permission
        write (theOutput) to file (OUT_File & "1")
        close access file (OUT_File & "1")
        try
           do shell script "iconv -f MACROMAN -t UTF-16BE " & (POSIX path of (OUT_File & "1")) & " > " & (POSIX path of OUT_File)
           do shell script "cat " & (POSIX path of OUT_File) & " | tr '\\n' '\\r'"
        end try
      end tell
    end if
        
    place (OUT_File) on curSel without showing options
    
     
    

    The string output with

        write (theOutput) to file (OUT_File & "1") as unicode text
    
    an error of InDesign (bodychecking).

    The problem is not as long as ID's export is little-endian - someone ' one has not heard of Intel chips - but it does not add a byte order mark. If you add a BOM, the problem should go away. Here's how you can add a Bill adapted to an exported file to tag:

    the fileRef value (open for access file "Macintosh HD:Users:shane:Desktop: Untitled - 16.txt" with write permission)

    the value of x to read fileRef

    Set x to character id {711, 731} & x - add THE BOM

    write x to fileRef starting with 0

    FileRef close access

    Then you can read it using "text Unicode", and it should also cross-platform very well.

    And stop putting your file read/write inside blocks Finder - is not the business of the Finder.

  • Computer, unable to recognize the drive tape Jensen with MP3 encoder

    Computer does not recognize the device is connected. Any ideas?

    Original title: tape of Jensen with encoder MP3 player

    Computer does not recognize the device is connected. Any ideas?

    =============================================
    If you connect the MP3 player to your PC via a USB cable and
    turn on is recognized with a drive letter to... Start / computer /.
    Devices with removable storage?

    Perhaps one or more of the books at the following link would be
    be useful:

    JENSEN AV PRODUCTS - Documents and manuals
    http://Ernie.Awa.com.au/Jensen/default.aspx

    And it may be interesting to try to adjust your AutoPlay settings.

    Windows 7 - change settings for importing pictures and videos
    http://Windows.Microsoft.com/en-us/Windows7/change-settings-for-importing-pictures-and-videos

    Windows 7: AutoPlay: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows7/AutoPlay-frequently-asked-questions

    Windows 7: Troubleshoot AutoPlay
    http://Windows.Microsoft.com/en-us/Windows7/Troubleshoot-AutoPlay-problems

    How to set up the automatic run settings in Windows 7
    http://www.techtalkz.com/Windows-7/516004-how-configure-AutoPlay-settings-Windows-7-a.html

  • Mp3 download problem

    I can't uninstall Windows Media Player from modules. My problem is when I click the button on any Mp3 download then open instead of save the file. So, I need to uninstall Windows Media Player.

    Hello, I don't think that windows media player is the cause of the issue you described. Since some versions of firefox is able to natively read mp3s. You can right click on the drive interface and download the file in this way.

  • Encoding problems in Web sites

    I have problems in different websites. Some texts are as if the encoding was messed up. In the page itself, either in the form of pages such as this. This is not the case in the various browsers.
    I downloaded a few screenshots of this problem:
    http://i50.Tinypic.com/11ihjf4.PNG
    http://i46.Tinypic.com/117tmid.PNG

    URL of affected sites

    http://

    It is not not an encoding, but a police problem.

    This problem may be caused by the version of the bitmap of the font Helvetica or Geneva or another font (bitmap) that cannot be displayed by Firefox in this font size.
    Firefox cannot display that font in the specified gibberish of size and display instead.
    You can test in zoom out (view > Zoom > Zoom out, Ctrl-) to make the text smaller.

    Uninstall (remove) all variants of this not working do Firefox, use a different font or find a version of real type of the font that doesn't have the problem.

  • Another mp3 player problem

    I managed to get all my music into the windows media player for my mp3 player and it's pretty easy, but then when I watch on my player is not under artist and not in the right albums. Just all the songs will be under the name of the artist and not in albums. But it is labeled correctly when in windows media player. Help!

    Hi KristaC,

    Windows media player pulls its information from MP3 tags when it shows the songs.

    If there are items in your library that have information on the appropriate media, and you want to copy the attributes of another element that contains incorrect information, you can do it quickly by dragging the incorrect item on top of the correct item.

    1. Click on the library tab.
    2. In the Navigation pane, expand library, and then click a view, Album, artistor Genre.
    3. In the details pane, drag the element that has the media information incorrect on the top of the element that has the appropriate support information.

    For example, drag "Unknown Album" on top of the album "Giant Steps." All the items in "Unknown Album" part of "Giant Steps".

    1. If a confirmation dialog box appears, click Yes.

    http://Windows.Microsoft.com/en-us/Windows-Vista/add-or-edit-media-information-in-Windows-Media-Player

    The player can automatically scan the files in your library and download missing media information or attempt to correct the incorrect media information. To change this setting, follow these steps:

    1. Click the arrow below the library tab, and then click Other Options.
    2. In the Automatic media for files updates box, check retrieve additional information from the Internet .
    3. Do one of the following:
      • If you want the player only add information from media that does not exist in your files, click Add missing information only.
      • If you want the player to replace all the information media in your files, click replace all media information.

    Be careful with this option. If you manually change the media information in your files, this option will potentially overwrite all your changes.

    http://Windows.Microsoft.com/en-us/Windows-Vista/media-information-in-Windows-Media-Player-frequently-asked-questions

    Bindu S - Microsoft Support

    [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

  • AS3 / AIR - BB10 problem: TextInput, counting and Format

    Hello world

    I hope that I have forget something small and appreciate any help sincerely.

    Short version of the problem:

    When I add a skin to a TextInput object, assign a skin, I can't change the color of text.  If I remove the skin, it works.  And the skin seems to work correctly.  Seems the class of skin does not contain not controls font forground color.

    How can I change the background color and a TextInput for BB10 forground using the AS3 BB10 Gold SDK?

    Long version:

    Help: import a qnx.fuse.ui.text.TextInput;

    I have an application with 12 different themes.  In the application, I wish the TextInput box to inherit the theme settings.

    Normally, I use the following to define a format.  And it works on its own.

    var a: TextInput = newTextInput;

    var b:TextFormat = newTextFormat;

    b.Color = 0xFF0000;

    a.format = b;

    However, in order to change the color of the background for the TextInput, I needed to create a custom class.

    public class myTextInputSkin extends UISkin

    That's a lot of vars:

    protected var upSkin Pright;

    protected var focusSkinPright;

    protected var downSkinPright;

    protected var disabledSkinPright;

    public var borderSize:uint = 2;

    Who also works on its own to replace the background.  However, once I attribute the UISkin to the TextInput, it prevents the format never applied to the TextInput.

    var a: TextInput = newTextInput;

    var b:TextFormat = newTextFormat;

    a.setSkin (myTextInputSkin);

    b.Color = 0xFF0000;

    a.format = b;

    No matter how I trace out, it seems that is applied to the object and the skin is applied to the object.  Seek to deepen the TextInput function, it has a buried in TextField.  I can confirm that setting format reached the TextField object buried inside the TextInput, which means that the format should be really change.  I tried to manually trigger the event of colors of fonts to update inside the text input?

    Anyway,.

    Now I'm in a bit of a loss, and I feel I'm missing something simple and stupid.  Someone at - it ideas?

    Ed.

    Thank you!

    For now, I have "unskinned" these elements.  Once it gets patched, I'll reconsider.

    Ed

  • DataOutputStream HTTP Post rinse and segment the encoding problems

    Hello

    I'm finally back to the question that I had a few months ago, but I can't always solve this

    I used this article to understand how to upload files into pieces of a server: http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800431/How_To _...

    Downloading is easy to implement, but I have problems with the download. I am trying to download a large file into smaller pieces. I tried different options. The one that works best is when I use DataOutputStream and write in there after each small party has been read from the file.

    But when I used the flush() function then he threw OutOfMemoryException()! But only if the file is quite large.

    An example of code:

    InputStream    is = (StreamConnection)Connector.open(url , Connector.READ_WRITE, true);
    HttpConnection c = (HttpsConnection)is;
    
    //set connection parameters
    c.setRequestMethod( HttpConnection.POST );
    c.setRequestProperty( "User-Agent", "MyUserAgent/0.2" );
    
    for( ;; )
    {   if( done ) break;
    
       //i have removed some reading code to simlify example
       out.write( bytedata  , 0 , bytesRead );
       Thread.yield();
    }
    
    out.flush();     //<-- OutOfMemory exception here!
    
    int result = c.getResponseCode();
    
    out.close();
    

    I found that I wasn't the only one to have this problem.

    1: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4212479

    2: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5026745

    I usually have the same code, but only use HTTPConnection for this.

    The solution was to use "Chunked" encoding of the header and appellant hunting every time data is written to the output stream.

    However, it has not worked for me. If I use a stored block coding, I 'ConnectionClosedException' when flush() is used for the first time.

    Here is a code example:

    InputStream    is = (StreamConnection)Connector.open(url , Connector.READ_WRITE, true);
    HttpConnection c = (HttpsConnection)is;
    
    //set connection parameters
    c.setRequestMethod( HttpConnection.POST );
    c.setRequestProperty( "User-Agent", "MyUserAgent/0.2" );
    c.setRequestProperty( HttpProtocolConstants.HEADER_TRANSFER_ENCODING, "chunked" );
    
    for( ;; )
    {
       if( done ) break;
    
       //i have removed some reading code to simlify example
       out.write( bytedata  , 0 , bytesRead );
       Thread.yield();
       out.flush();     //<-- ConnectionClosedException
    }
    
    int result = c.getResponseCode();
    
    out.close();
    

    Here is a screenshot of the at the time of the exception stack trace:

    And here are the details of the exception:

    Now, I honestly don't know what to do next. I tried all sorts of options and choices, but can not get this to work for some reason to download any.

    Tried on BlackBerry JDE and Simulator 4.2.1

    Help, please

    Thank you.

    Thank you, but I think that this was not related to this problem.

    The solution is to use SocketConnection would work on writing data OutputStream and flush(). But only if the Content-Length is calculated with precision and this server application is also properly formatted.

    If there are errors in the POST request, the server would send a message back and ConnectionClosedException appear.

    The best way to resolve these issues is to get a sniffer package good as "Wireshark" and study all the packages with a lot of attention even a small typo can break everything.

    I have another question, but the download itself works with the function flush() as expected on the device and emulator. So I think this can be considered fixed.

  • Get 403: Forbidden of Google API - encoding problems in my POST?

    Hi all

    I have problems connecting to the Google API by MAIL by following the instructions on this page:
    http://code.Google.com/APIs/accounts/docs/AuthForInstalledApps.html#ClientLogin

    I've also posted on the forums of the Google API, but I'm starting to wonder if it's a problem that this forum would be able to answer. Here is the post on the Google forum:
    http://www.Google.com/support/forum/p/Apps-APIs/thread?FID=1c22cb44eb5cbba600048a1fc5f25621&hl=en

    Google used to accept a GET request and provide a string SID, who served as a connection key services such as Docs and Calendar. He still offers this SID to GET requests, so I know I can do the BB Simulator applications, but it no longer accepts the SID as a connection key. Now, I have to send a POST request in encoding UTF-8, including parameters as my user name and password and get an AUTH token in response.

    Missions in this forum, I see that I can use a URLEncodedPostData object to encode the parameters for the WORK in UTF - 8. (I know I have to eventually get keys to use on a true signature BB, but I want to get a hello-world working on the Simulator before I pony up for them). I put the settings in this item and include it in the application, but I always get a 403: forbidden with an error message 'error = BadAuthentication' in response, as if my password is wrong. I checked the name of user and password with care, and I can do the JOB and get the AUTH token with the curvature of the line of control on this machine, there must be something about how I make the POST in the Java code.

    Someone on the Google forum suggested that my settings may not have been encoded in UTF - 8, but shouldn't the 'UTF-8' parameter in the constructor URLEncodedPostData manage this coding? I also tried manually escape the '@' in my e-mail address to "% 40" because it seems that URLEncodedPostData does not encode the symbol like this @.» (My password contained no character who must escape for URL encoding.)

    Here is the code I use. I use the Eclipse IDE for Blackberry OS 5 (I think that the version of the plugin for eclipse is 5.0.0_5.0.0.25) with Verizon 9630 Tour 5.0.0.591 Simulator. Any help?

    private void googleSignInTest(String emailAddress, String googlePassword){
    
    // see http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#ClientLogin
    String uri = "https://www.google.com/accounts/ClientLogin";
    
    InputStream inputStream = null;
    HttpsConnection httpsConnection = null;
    
    try{
    //create https connection, POST
    httpsConnection = (HttpsConnection)Connector.open(uri);
    httpsConnection.setRequestMethod(HttpsConnection.POST);
    
    //http://supportforums.blackberry.com/t5/Java-Development/HttpConnection-set-to-POST-does-not-work/m-p...
    URLEncodedPostData postData = new URLEncodedPostData("UTF-8", false);
    postData.append("accountType", "GOOGLE");
    postData.append("Email", emailAddress);
    postData.append("Passwd", googlePassword);
    postData.append("service", "cl");
    postData.append("source", "my-test-app");
    postData.append("Content-Type", "application/x-www-form-urlencoded");
    postData.append("Content-Language", "en-US");
    
    DataOutputStream outputStream = httpsConnection.openDataOutputStream();
    outputStream.write(postData.toString().getBytes());
    outputStream.flush();
    outputStream.close();
    
    //make the request and get response
    int responseCode = httpsConnection.getResponseCode();
    //403 Forbidden Error=BadAuthentication
    
    //Do something with the response
    ...
    }catch (IOException e) {
    e.printStackTrace();
    }
    

    Seems that I have to set the content type in the connection, and not in the post data:

    httpsConnection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_TYPE, HttpProtocolConstants.CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED);
    

    Also, the following line is probably not just:

    outputStream.write(postData.toString().getBytes());
    

    It probably should be:

    outputStream.write(postData.getBytes());
    
  • CalenderComposerCard encoding problems

    Hi guys,.

    I have a problem with the blackberry.invoke.card.invokeCalendarComposer(). I'm trying to use the special characters of the German language as "Aug" and they get scrambled when indicated in the called card. Here is a screenshot of the example:

    When I use "encodeURIComponent" as on other calls I have the problem that the spaces are converted to "% 20" and are displayed as such in the calendar object.» I tried if the string on spaces only encode parts of text, and special characters are always scrambled.

    Someone at - it an idea how to solve this problem?

    OH and BTW: How can I make the event an all-day event?

    See you soon

    Christian

    One of your blackberry collegeaus has followed this internally somewhere as described on github and has a way to solve this problem to patch the webworks framework, if I understand.

    So this time I hope that the problem is not on my side.

  • Smartphones blackBerry MP3 files problems

    I've recently switched to a Vista OS computer. Previously (in XP) when I put music files (MP3) on my BB, there was no audio distortion. Since moving to Vista, the audio files sound like listening to music via speakers shit to the sound of high definition (very rough/scrambled). The sound of songs on the computer, so I know it isn't the audio file. Anyone else seeing this?

    I use 4.7.0.122

    Okay, think I thought of her. Since the upgrade of the operating system original, I had to use audio files in MP3 format. (it's a whole different problem.) So, I have a program to convert WMA to MP3 and uses the same program on my new Vista computer. Well, with Vista, it recorded music "too strong", so it was horrible. I adjusted the audio level of coversion down and now the sound of the songs again.

  • Adobe Media Encoder - General encoding problem

    I've just updated yesterday first and Adobe Media Encoder and experiencing major issues with the SOUL.

    In short, I'm trying to convert a video into ProRes 1920 x 1080 for a H264 for web, something I've done a thousand times. Although, I can't start the queue. When I click the 'green' or press 'return' nothing happens...

    I tried other source files, adjusted the format/screening/way out to many different settings/paths and restarted my computer several times and the software... Yet, I still cannot start the queue with ANY file/setting.

    I use first and SOUL for over 4 years now and have never had a problem like this... Help!

    End of 2013 MacPro

    It seems that your preferences has been corrupted somehow. Could share you with us?

    They are located in the folder "Documents/Adobe/Adobe Media Encoder.

    If you delete this folder, this problem should be resolved for you.

  • Adobe Media Encoder problem suddenly made with CL open

    After update for first Pro CC 2015.1 - 9.1.0 (174) man and Media Encoder 2015.1 Build 9.1.0.163 I am facing a problem of rendering to H.264 format. I get the message "error compiling Movie - unknown error". However, when I spend "Mercury Playback Engine (OpenCL) GPU acceleration" to "Mercury Playback Engine software" only the same images makes it flawless. Of course, it takes about twice as long. Even abroad, the same images will make to ProRes using GPU acceleration. Here's my hardware features:

    iMac (retina 5K, 27 inches, end of 2014)

    Intel Core i7 4 GHz processor

    Memory 32 GB 1600 MHz DDR3

    Graphics card AMD Radeon R9 M295X 4096 MB

    OS X 10.10.4


    I tried rendering on another drive and the same failure occurs. I tried to export directly from Premiere Pro and the same thing happens.


    Any thoughts?


    Thank you

    Aviva



    Workaround solution discovered!

    I went through the clouds creative and found that I could turn the clock back to the latest version (December 2015) SOUL the previous SOUL CC 9.0.0.222 CC. (It's a bit buried in 'Previous Versions') Automatically downloading trashes newest version and install the other oldest.

    I threw the last first Pro CC - 2015.1 9.1.0 174 (Build). I chose the same piece of the timeline to compress with the same parameters of H.264 which had been at fault, he gives and launched SOUL 9.0.0.222 changed the rendering engine to the Mercury Playback Engine GPU acceleration, started the render and crossed my fingers. (I didn't hold my breath.) I was 39 minutes of video).

    And it worked!

    I had not changed anything else. I'll do some additional testing, but for now - because of the length to make it - I'm sure that this workaround is solid. The tricky part is to find the old version of SOUL on creative cloud.

    Aviva

  • Flash as2 as3 attachMovie code problem

    Hi guys,.

    I make a game in which I create several clips from video placed randomly, directly from the library onto the stage.

    I am a good as3 developer and can understand most of the concepts of as3 with the exception of tables. But I can't find a solution for the attachMovie()

    Here is the code that causes the problem. (I have excluded the other pieces of code)



    Object is the name of my clip

    var objectNumTracker = 1;

    var depth = 555;

    current_object = attachMovie ('object', 'object' + objectNumTracker, depth)

    objectNumTracker ++;

    depth ++;

    with as3 you assign a class name (for example, YourObjectClass) and use the 'new ': constructor

    var current_object:YourObjectClass = new YourObjectClass();

    addChild (current_object);

  • Mp3 playback problem seen on music websites

    When I visit a web site with music (example: Amazon.com) and click on the play icon to preview a mp3 music file, I get no sound.  These web sites require Adobe flash player.   I don't have any problem playing mp3 files or any other audio problem.   In my control panel windows, I put the mp3 files play using Adobe Flash Player, but the problem persists.

    The profile of my computer: Windows 7, 64 bit, Internet Explorer 11.  Adobe flash player is installed and the Adobe flash player plugin is enabled in my Internet Explore.

    Version of Adobe's Flash Player installed on my computer: Active X version: 14.0.0.145, NPAPI plug in worm 14.0.0.179, Cap PPAPI, not installed.

    Note: I tried to download the latest version of Adobe Flash Player and was a failure.  I checked that the applications installation and update of Adobe Flash Player installed on my PC.  I run McAfee security that would normally ask the user to approve a download, but when I clicked on the "download the Adobe Flashplayer update website" button, a small window appears briefly and then disappeared.

    I would appreciate any advice.

    eazydr

    Hi David, I was finally able to install Adobe Flash Player version 15.   I also tried to solve the problem by changing IE 11 different settings, including the settings of ActilveX, but could not solve the problem.   So I took your suggestion and install another browser.  I installed Google Chrome. When I use Chrome to read the preview mp3 files it works fine and I don't have the problem mentioned in my original report.   I decided to live with this solution.  Thanks for the help.

Maybe you are looking for