ActionScript 3.0 :: Sound Doesn't Play Correctly?
Oct 23, 2011
I have a button that when clicked, it's supposed to play a sound. Now, the sound does play when it's clicked, but it seems to be offset (meaning, it starts a few seconds later in the sound). As a result, only half of the sound plays.I have two buttons that do this, and I'm not sure what caused them to do so.I've never had this problem before, so I'm clueless where to go to fix it. I tried verifying the integrity of the sound, and it's normal. When I check it's proporties from the library, and "Test" the sound, it plays just fine, with no offset or anything.Here is the code I have for the button that causes this behavior:
Code:
var soundEffect_Button = new SND_EFFECT();
soundEffect_Button_instance_manual.addEventListener(MouseEvent.MOUSE_DOWN,SndEffectDown);
//Make the callback[code].........
View 4 Replies
Similar Posts:
Dec 16, 2009
I have sound playing in my flash file. My index file is a html file which calls the flash file, and when i run the html file, the sound doesn't play. Does anyone know how I can rectify this?
View 5 Replies
Apr 14, 2005
I have an mp3 exported for actionscript with the linkage name bgmusic.When I play the sound using a sound object, it works fine.However, I take that same .swf and load it into another movie and the thing breaks... the sound doesn't play.How do I fix the linkage so that it'll play again?
View 5 Replies
May 6, 2006
I've just made a 2'nd version of my portfolio: [Code]... with xml used to read the content & i have several problems that i can't fix.
1: The site works well only in InternetExplorer. In all other browsers, jpg files are not loading correctly - they should fade in when the button is rolling & fade out when the button is rolling up, but they doesn't. Thare are also preloaders for each artwork & they doesn't appear (excepts IE). 2. The main preloader doesn't work correctly (even in IE) It appears, when about 80% of the site is loaded :S I don't know what to fix to the site to work correctly in all browsers.
View 9 Replies
Dec 28, 2011
I'm having issues with drawing a circle. The code seems to work for drawing all the required segments except one, but tracing the points of the drawing looks correct.This is the class that generates the segments:
package views
{
import flash.display.Sprite;
import flash.geom.Point;
[code]....
View 1 Replies
May 29, 2009
I am trying to load html into a text box from a website. when i load to the text box, everything goes fine except that it is loaded as something that looks like this:
[Code].....
I just need to convert it to html. I understand a lot of the tags wont work the same way bc as2 doesnt accept them, but I can deal with those after. Here is my loader:
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean)
{
[Code].....
View 1 Replies
Jan 21, 2010
How to import sound with AS? Cuz i have tried it and my sound just wount play. Can you explain me where my sound should be and what is the as code for importing cuz i use
mysound = new Sound();
mysound.attachSound("SoundOn");
mysound.start();
and this SoundON from where i get it, i try to add linkage to the sound file but in CS4 i cant find the option;. I do it from the library, adding text into the linkage field but still my sound doesn't want to play?
View 15 Replies
Apr 20, 2008
scott_euser helps me to modify my carousel, i wanted when all icons will be loaded then to show them and it works fine but it has one bug some icons doesnot show correctly here is as
[Code]...
View 1 Replies
Feb 13, 2011
I wanna make a gallery using xml. Every photo is gray, after ROLL_OVER on it position loads it's colored copy, and after ROLL_OUT copy dissapears. After click, it should navigate to URL. And I have 2 problems:
1. ROLL_OUT doesn't work correctly: it's strange, but it work after ROLL_OVER ... :<
2. how to make linking, hm.. for example, if it's first thumb, to "proj/1", if second to 'proj/2' etc...
it's my code:
[Code]...
View 3 Replies
Jun 1, 2011
I'm using a version of the pause sound code found on the adobe/page, but it's not resuming the sound from the pausePoint. I have the pause/play function tied to the stage so that my external swfs pause as well. Here's a clip of my code,This is the load audio with swf part:
var fl_Loader_5:Loader;var fl_ToLoad_5:Boolean = true;var channel:SoundChannel = new SoundChannel();var snd:Sound = new Sound();var req_1:URLRequest = new URLRequest("audio/Introduction.mp3");
[code]......
View 27 Replies
Sep 19, 2011
First is that after showing question and answers and playing sounds i go to the next question and we the answers but the sound does not go with it, that is the sounds of question and answer dont change and are the same as in the first question and the same goes for answers the xml looks like this:
Code:
?xml version="1.0" encoding="UTF-8"?>
<Questions>
<Question>
[Code].....
View 1 Replies
Dec 5, 2010
The code seems OK but I can't hear the sound. I have it in the fla/swf and exported etc... I suppose something in this code is wrong. Haven't coded for ages - bit rusty I'm afraid.
[Code].....
View 3 Replies
Mar 7, 2011
I am making a spin wheel and the hitTestObject doesn't seems to be displaying correctly Basically, there is an arrow (the finger that locate where the wheel stopped) and the wheel itself. The wheel is divided into different segments, and each of these segments can be control by the code. Here's the problem though, my arrow is at the top of the wheel and it only touches 1 of the segment, but whenever I use the hitTestObject method with the arrow and the segments, it somehow detect several segments instead of one. These segments are not overlapping one another so I don't understand why it is detecting several hits instead of one.
View 3 Replies
Mar 12, 2010
i have designed a gaming kiosk app in as3i am using it on a Sony vaio l pc (like hp's touchsmarts) in windows 7the app doesn't need any multi-touch gestures (only single touch clicks and drags) so i am using mouse eventseverything is fine (including mouse click and move events) except that a single touch to the screen (with no move) doesn't fire a mouse down. it is fired only after a small move of the fingeroutside the app, on my desktop, i see that the small windows 7 cursor jumps immediately to where a finger is placed, meaning this issue isn't a hardware or a windows problem but rather how internally the flash app receives "translated" touch-to-mouse events from the os.for example, in a windows Solitaire game, a simple touch to the screen immediately highlights the touched card.in my app, a button will change to the down state only if i touch it and also move my finger slightly.
View 8 Replies
Apr 1, 2011
I am trying to add videos to my project, but none of them seems to work correctly. I have a movieclip, which has 3 layers and 2 frames on each layer, 1 frame at nr.1, and frame 2, at nr. 5 in the timeline. I tried to add a FLVPlayer, using a tutorial, but it doesn't works correctly. 1st frame has a stop(); a blank, and 4 buttons + FLVPlayer component. the last frame nr.5, has the AS3 code, the frame label "videocontent", and the same 4 buttons and FLVPlayer component as in the first frame. I've created a classic tween between 1st and 5th frame on the timeline for the buttons and component. even with or without animation, the video is throwed by the Flash on the stage without any coordinates, where he wants by default. The FLVPlayer's buttons are throwed in other place on the stage, and none of them seems to work.
the second issue is that after i click the main menu button, the sound of the video is still playing and to be heard, so that means it is still there. In AS 2, once upon a time, i used some function called removeclip, or unLoadMovie, and it worked.
View 6 Replies
Apr 12, 2011
I have a 5 minute flash movie that has great sound synchronization with the motion when I export as a SWF. However, when I export as a Quicktime file (.mov), sometimes the sound is ahead of the image. Is there a setting I can tweak during Export to remedy this? (so far I have tried to save the Video as "H.264" as well as "Animation". And for sound I have had no luck with the setting of "None" or "Apple Lossless."
View 2 Replies
Sep 2, 2009
The movie will not play the same after I embed it in a pdf. pretty sure all the right selections were made when exporting.
I have a stop in the first frame of the movie and a button to start the movie. But when the movie is opened in the pdf it has skipped that frame and it starts to play automatically.
View 1 Replies
Jan 7, 2011
I have a big problem - I decided to make a website using flash as I am good with photoshop and thought it would be fairly easy to construct in flash using tutorials. All went well except now the website is published, weird things happen. The homepage works fine but when you click on "portfolio" some of the buttons don't appear and when you try the buttons, some images don't appear. Occasionally some of the buttons take you to the wrong place also. When I test the movie in flash, everything works fine so I can't work it out. I am a complete novice so advice will have to be spelt out in black and white.
View 2 Replies
Mar 13, 2010
i have designed a gaming kiosk app in as3.i am using it on a Sony vaio l pc (like hp's touchsmarts) in windows 7. the app doesn't need any multi-touch gestures (only single touch clicks and drags) so i am using mouse events. everything is fine (including mouse click and move events) except that a single touch to the screen (with no move) doesn't fire a mouse down. it is fired only after a small move of the finger
outside the app, on my desktop, i see that the small windows 7 cursor jumps immediately to where a finger is placed, meaning this issue isn't a hardware or a windows problem but rather how internally the flash app receives "translated" touch-to-mouse events from the os.for example, in a windows Solitaire game, a simple touch to the screen immediately highlights the touched card.in my app, a button will change to the down state only if i touch it and also move my finger slightly (click events - down and up - are triggered fine).shouldn't the MOUSE_DOWN event trigger exactly like how a TOUCH_BEGIN would in the new touchevent class?
View 3 Replies
Jan 7, 2011
I decided to make a website using flash as I am good with photoshop and thought it would be fairly easy to construct in flash using tutorials. All went well except now the website is published, weird things happen. The homepage works fine but when you click on "portfolio" some of the buttons don't appear and when you try the buttons, some images don't appear. Occasionally some of the buttons take you to the wrong place also. When I test the movie in flash, everything works fine so I can't work it out.
View 9 Replies
Jun 18, 2010
I have imported a gif but it does not play correctly. It's only two frames. The first bmp associated with the gif in the library has both slides combined while the second bmp is correct.To show the issue I am having. Here is the 2frame gif playing correctly:[URL]Now here is a screen shot of my library:[URL] You can see how the highlights bmp is incorrect. When I play the gif in Firefox,IE, Ulead gif animator or anywhere else it is fine but in Flash it shows that first frame with the combined slides and then the 2nd slide correctly. It ruins the "dancing effect" I'm going for.
View 2 Replies
Jun 7, 2011
I have made a drag and drop quiz, which can allow one drag_mc to be dropped to one of three target_mc's. I would like it that when the drag_mc hits any one of the target_mc's that it goes to and plays the drag_mc's frame 2.
Here is my code so far
stop();
//Import tween classes
import mx.transitions.Tween;
import mx.transitions.easing.*;
[Code]....
View 3 Replies
Feb 4, 2012
I am currently building a custom jPlayer instance for a streaming media file. Having modified a supplied demo, I am able to get the player working in all major browsers except IE.
I have checked the swf path many times, which is loading without fault. I think I am unable to get the trigger to load the file in IE, resulting in "Attempt to issue media playback commands, while no mediaurl is set. Use mediaurl() to set. Context play()".
I am using an event trigger CSC class to play the media "track" in my source code (not mediaurl directly).
Below I will demo the current code, however I feel it would be more beneficial if someone could construct some pseudo code for me outlining the exact requirements to get this to work, and also an explanation of the GUI button CSS handles, so that I can get these working properly too (I may need to modify the JS, which is currently the standard).
I am using IE8 32 w/ Flash 8 and jPlayer 2.1.0
I only need the following functions:
Play button (jp_play?) - this should trigger the stream and then enable multiple other classes (jp_volume, jp_playline, jp_stop etc)
Stop button (to replace play button) - should stop (not pause) the stream and disable previously enabled classes.
If it helps jp_pause gives me all the required functionality with regard to hiding elements, except the mediaurl is paused, I need it stopping.
Current code snippets:
// Instance jPlayer
my_jPlayer.jPlayer({
ready: function () {
[Code]...
View 1 Replies
Oct 14, 2009
It's possible to play a sound file through AS, either by loading it from a folder or import it to flash. It's also possible to play a dynamic tone with flash.media.Sound + writeFloat.
But... is it possible to play a sound file with flash.media.Sound + writeFloat in some way? I want to play a sound file without having to deal with any files except the .swf!
View 9 Replies
Feb 13, 2007
i want to make a single button to play a sound, and if pressed again, stop the sound. and if pressed again, play the sound, and so on...
i know it has to be made with a boolean variable, true/false, but i just can't figure out how.
View 13 Replies
Jun 11, 2010
[URL] Above is a link to view the project I'm working on. Once the site loads if you go to the "Contact Us" page the content doesn't load correctly. I'm using an extrnal .xml and .css files for the content. I'm also embedding the fonts dynamicly. If I test the file locally on my computer is works fine the image loads as it's supposed to and content looks correct. However when I post the files to the server (which work exactly the same way) I get the white box when you can see from the link above. I'm at a complete loss as to how to to fix this.
View 3 Replies
Mar 6, 2009
I'm trying to add sound to some buttons. It's just a little metallic 'klink' sound that plays on rollover. I only want the sound to play on the 'Over' state. So I've set up a layer (just for sound) for the button and I add my sound in the 2nd frame (the Over state). Everything is cool. All is good. And the sound plays on rollover. But the sound also plays when I click the button (i.e. it also plays on the "Down" state). Why? The Down state keyframe is completely empty. What's going on here? I've only put the sound in the "Over" keyframe, why does it also play in the "Down" frame (or when I click)?
View 1 Replies
May 17, 2003
I want to use a sound loop in my flash movie. The movie has many scenes. And the problem is that when I go to next scene or different scene I hear the sound repeating twice. I mean sound does not stop from first scene and begins from the different scenes.Is there any way to play sound like "stop all sound" option in Flash.
View 6 Replies
Mar 16, 2009
I have to play a sound file and show the progress of the sound file being played. I am using import flash.media.Sound; import flash.media.SoundChannel; But the PROGRESS event gives theprogress of loading of file. I want to know of much of the song has been played and how much more is left.
View 3 Replies
Nov 8, 2010
I just updated to CS5 - I'm working on a custom video player. It works fine embedded in a web page both locally and on the network. It works fine in the debug player. However, when I test it in the authoring player I get a NetStream.Play.StreamNotFound error and no video. I have tried setting the Local Playback Security publish settings to both local and network - doesn't find the video either way.
It used to run fine in CS4 in the authoring environment.
View 1 Replies