Read an external .mp3 file via AS3
Stop();
var pausePoint:Number = 0.00;
var isPlaying:Boolean;
var soundChannel:SoundChannel = new SoundChannel();
var sound: Sound = new Sound (new URLRequest("Sounds/Music_File_2.mp3"));
Play_btn.addEventListener (MouseEvent.CLICK, clickPlayPause);
Stop_btn.addEventListener (MouseEvent.CLICK, pivot);
soundChannel = sound.play().
isPlaying = true;
soundChannel.stop ();
isPlaying = false;
function clickPlayPause(evt:MouseEvent) {}
If (isPlaying) {}
pausePoint = soundChannel.position;
soundChannel.stop ();
isPlaying = false;
} else if (! isPlaying) {}
soundChannel = sound.play (pausePoint);
isPlaying = true;
}
}
function clickStop(evt:MouseEvent) {}
If (isPlaying) {}
soundChannel.stop ();
isPlaying = false;
}
pausePoint = 0.00;
}
I am playing the .mp3 file called "'Music_File_2.mp3 ' the music file is in a folder called"Sounds" "
2To called Play_btn and Stop_btn time and stop the music. Once the music is playing if I click on the play button, the music pauses.
Everything works fine when I run the program but «Flash Player 10»
but when I right click and open the .swf with Internet explore the whol project works very well, but the sound would not play.
what I'm doing me wrong.
Thanks for reading this.
are you a right click on the SWF or html file?
Tags: Adobe Animate
Similar Questions
-
Windows media player, it is impossible to read the downloaded particular Internet as mp3 file ' save link as. / target as ' while some other mp3 file can b played. What should b the reason?
Hi Manjit L,.
I see that you are unable to read a particular mp3 file in windows media player. I'll help you with this problem.
1. have you made changes on the computer recently?
2. what security software is installed on the computer?
3. do you get an error message trying to read that particular file in media player?
I suggest you to refer to this article and check if that helps.
Windows Media Player Invalid File Format Error Message: http://support.microsoft.com/kb/234019
Refer.
Windows Media Player: http://windows.microsoft.com/en-US/windows/media-player-help#media-player-help=windows-7&v2h=win7tab1&v4h=winxptab1
I hope this helps.
-
Pause for an external mp3 file
Right now I use this code to load an external mp3 file in my website:
var url: String = "my folder";
var urlRequest:URLRequest = new URLRequest (url);
var sound: Sound = new Sound();
Sound.load() (urlRequest);
Sound.play();I wonder if it is possible to add playback (play, pause, stop) buttons that control this external mp3 file from my site. And what code would I use to do.
Thanks for your help!
Replace your code with the code I gave in my previous message and repeat the test.
-
using pl/sql to read an external stored file of Bi, APex pub
Hello, I want to use pl/sql to read a type bfile (files stored outside, pdf, JPEG, etc.). I'll call him from bub pi and APEX.
So that this works is the file must be stored on the OAS(mid-tier) or on the server as the database?ashalon wrote:
Hello, I want to use pl/sql to read a type bfile (files stored outside, pdf, JPEG, etc.). I'll call him from bub pi and APEX.
So that this works is the file must be stored on the OAS(mid-tier) or on the server as the database?On the database server. The BFILE column value is a file descriptor that refers to a file that needs to be I / O'ed by the database server Oracle process if necessary.
If this fact file handle refers to a file on the application server (middle level), what is the process of the server Oracle to make its way in this app server and crack open the file system access (illegally) this file?
BFILE must be a file that is accessible by the server. (Yes, he can physically reside on another server, and be shared via Samba or NFS for example - but it is not always just a robust solution)
Note that the APEX is PL/SQL. There's nothing strange or unusual to the APEX. The APEX is a suite of code PL/SQL and other database objects (such as tables and indexes and views). I often met the perception that APEX is slightly different and is running outside the database. Not true. The APEX is 100% PL/SQL.
-
Reading an external video file and video playing, go to the next image.
I guess the title says it all. I can load an external video file (FLV) and I can have it play. I also made custom buttons to limit the clip. The only thing that that I have to do is to have the main timeline move on frame 2 once the external video comes to an end. I use actionscript 3 and flash cs 5.5. Any ideas how to do this? Thank you!!
You can assign an event listener to the FLVPlayback component to its COMPLETE event...
Import fl.video.VideoEvent;
function playedVideo(evt:VideoEvent):void {}
nextFrame(); or something else}
flvplayer.addEventListener (VideoEvent.COMPLETE, playedVideo);
-
Loading external as file via url
Hello
I have external actionscript files that I call like this:
#include '... / events/allevents.as.
But if I want to reach inport the full URL that is#include " " http://www.essentialeventsmanagement.com/events/AllEvents.as "he locates the file even if it is the correct URL. How can I set this up so he always calls the server and not my local as a fileThank youMarkYou can load the dynamically compiled code (by loading a swf file), but you cannot compile dynamically.
-
I can't read the FF27 mp3 files and I tried some help I can find.
When I try to play an MP3 in FF27 I get a black screen that says:
"The video cannot be read because the file is corrupted.
The web console shows this:
"Media resources http://tomwhelan.ca/commercial_2014.mp3 can't be decoded."
Any ideas?
It is on a XP machine which is fully updated.
Thank you
V
From 26 of Firefox, Firefox on Windows XP will attempt to play media encoded MPEG as MP3s natively in the browser. This requires that the necessary components in your system, but they are perhaps not? To turn off the native player and return to the use of a plugin like Windows Media Player or QuickTime for this kind of media, you can make a change to the configuration under the covers. Here's how:
(1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.
(2) in the search above the list box, type or paste media and make a pause so that the list is filtered
(3) double-click the preference media.directshow.enabled from true to false.
I don't know if this changes enter into force immediately or after you exit and then restart Firefox.
Note to other readers: Windows XP uses DirectShow (DirectX). Windows Vista, 7, 8 and 8.1 uses Media Foundation to play natively coded MPEG media. It's a different setting.
-
Read and use the cue point in mp3 file
Hallo,
It is possible to manage the cue point in the mp3 file with as3.
If so, no allusion?
Thank you.
It is likely that you need to import the CuePointEvent class, if the error indicates it is not.
-
Hello
I entered in a previous post and said that my external MP3 did not work with Flash 8.0. I tried a longer sound wave and what it seems to be that the sound wave is read back but at high speed, which is unintelligeble.
The file MP3 must be converted or formatted in a certain way to use as an external MP3 player. I imported the exact same MP3 file and it works without problem in embedded mode.
Thank you
Hugh> I entered in a previous post and said that he did not work with my external MP3
> Flash 8.0. I tried a longer sound wave and what it seems to be that the
> sound wave is reading, but at a high speed, it is unintelligeble.
>
> The file MP3 must be converted or formatted in a certain way to use as
> an external MP3 player. I imported the exact same MP3 file and it works without any
> problem in embedded mode.Hello
Audio that sound like Chipmunks is cause of inappropriate bitrate.
It is preferable to use the mono sounds of 16-bit 22 kHz (stereo uses twice as much data as mono), but Flash can
import two sounds 8-bit or 16-bit at frequencies of sampling of 44 kHz, 22 or 11.--
ConcerningUrami
--
Happy new year guys - all the best there is in the 2006 :)
-
I am trying to record an mp3 file, but firefox does not allow me to save... it allows me to read the file but not download and asave to my computer. How can I activate the Firefox save MP3s on my computer?
Go to Options > Applications tab > MPEG Layer 3 audio(audio/mpeg) image search > use the "Save file" option on the menu drop down.
-
Download or read audio data in MP3 files in Hotmail
Cannot open MP3 files in Hotmail. Tried clicking on Audio and download and same problem if the file is transferred to the desktop.
These files open in the past. Now says that Windows has encountered a problem with Windows Media Player. Do not open or play.
any ideas out there? Thank you!
You can play other audio (mp3) files using the media player.
No doubt, you can download the latest version of media player (http://windows.microsoft.com/en-US/windows/downloads/windows-media-player)
If you are able to play other audio files, probably the file you are trying to read is damaged or did not download properly.
-
I use a DELL Studio 15 laptop computer. When I try to copy a single file (for example: size of 1 GB) hard drive to any external memory device (for example: USB key or external hard drive) via the port USB, the copy process takes several hours to complete. I have checked the viruses using McAfee Antivirus, but could not find. Can someone suggest me a solution?
Hello
· Were there any changes made to your computer before this problem?
Step 1: Format the external device to the NTFS format and check if the problem persists.
See: http://windows.microsoft.com/en-US/windows-vista/Convert-a-hard-disk-or-partition-to-NTFS-format
-
I want to use sound recorder to save as wav audio is not wma... How do I save it as a wav or mp3 file in order to make a cd and read it in my car?
Hello
1 are you referring to the sound recorder program in Windows?
2. you have all the music you want to convert to WAV?
3 are you referring to the "Sound Converter" when you say 'tape recorder '?
If so, you can use third party software to convert WMA to WAV audio format.
Note: The use of third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk
-
Links to external .AS files after the conversion to AS3 canvas
After you convert an AS3 project in canvas, objects that were previously linked to a file external .AS, containing their class to the library as always appear related to this class, as follows:
but I get no choice but in the environment of the AS3 to 'Change the class' and implement these for editing external .AS files, as you can see here:Can I still retain the binding object in Javascript and how do I do in the environment Adobe animate CC, please?
In the library, you can double-click on the column link to any element and give it a name of link. Later, it is used like this:
var something = new lib. Thingy();
But there is no file class in HTML5 Canvas. If you want external CODE to participate you must convert it into Javascript and put it in the first picture inside the movieclip.
-
Weird reading during the use of Stream.play ("mp3:file")
Hello!
I am trying to set up a selection side server for playback of mp3 files, if I fall into a weird behavior of the FMS.
I use the last FMS 4.0.2
Here's how I try to publish the stream (ActionScript on the server side):
var s = Stream.get ("boo");
If (s) {s.play ("mp3:rhcp", 0) ;}}
Client side, I try to play using NetStream.play ("boo"). However, the sound quality that I get is really weird. The sound goes slower and faster and stops for a split second. He can play properly for a few seconds, but that's all. Sounds like a problem of decoder for me, or a bitrate conversion problem.
When I play the stream with NetStream.play ("mp3:rhcp"), the reading goes well.
I tried several MP3s with different flow rates, but they all have the same problem.
It looks like a bug to me, so I'm expecting Adobe to comment on this one.
Hello
Please try the FMS 4.0.2
It is a little strange to see the problem, but I would like to know your settings on the client side. What player flash you use (although I doubt that it is a question that your reading of the original file is ok), and what is the length of the buffer that you used? There are known issues with the length of the buffer to 0. Can you try and change the length of the buffer in some other values and see if that helped to get the best quality?
Thank you!
Maybe you are looking for
-
For example Facebook, I can't click on the House or one of the tabs on the top, as well as some information through the pages. For Youtube, I can't click in the area of research as well as other places. I can't log out of my RBC page... It happens on
-
Speech recognition automatically press the home key
Hey, I had a problem with the text-to-speech software since I started using it. If to dictate or Commander, several times when he does not understand me it displays "what was it?" then automatically, press the home key. It's especially annoying whe
-
The test of the monitor could not run
While trying to do tests, I was generating events through the OnPlus portal. However, during the last week, when I select a monitor and try a series of tests, it will fail with a message "test the monitor was unable to run. Any test I try or what d
-
InDesign CC2015: App missing and grey bar
Since the last request to update compared to the creative clouds (March 2, 2016) my InDesign 'App Bar' has disappeared and is also checked but greyed out in the menu window. Actually updates more ignore my preferred monitor set up and I have to chang
-
Purchase Adobe Photoshop Lightroom 6 upgrade
I bought Adobe Photoshop Lightroom 5 of B & H Photo Video last year. I am buying the upgrade from Adobe Photoshop Lightroom 6 (office only) of the Adobe.com site. Therefore, I have connected under my account and made the purchase. However, the system