Javascript :: AJAX And Playing A Sound Once

Nov 25, 2011

We have a website which displays status updates throughout our various facilities (they all have LCDs with a fullscreen IE page I point it to). Right now I go to my management page with a WYSIWYG-editor, type in the messages/updates, which saves it to a .txt file (alert.txt) and it updates the page on the screens via AJAX. The page on the screens checks for updates at a set interval of 5 seconds. What I want to do now is play a sound to alert when an update is given (the screen only displays critical network errors and such)[code]I've tried adding the sound clip via an embed HTML code (created a Flash object that plays it once upon loading the Flash object) to the text file, but this causes it to play once every iteration. Even if there are no changes.

View 1 Replies


Similar Posts:


Flash :: Playing One Sound At A Time In Called From Javascript?

Jul 15, 2010

I'm working on a site, for kids, which has a small avatar in the corner that talks.The avatar is a flash file and the plan is to determine what it says through a mix of javascript and ajax.

Unfortunately when I make the flash file play an Mp3 file through JavaScript, I can't seem to stop the sound.. so when I keep clicking on a link which causes it to talk, I hear the sound repeated x times.

The odd thing is, when I attach the very same code to a button in flash, there seems to be no such limitation. It seems as if it won't store anything in global variables when calling from JavaScript.

View 2 Replies

Javascript :: AJAX Or Something Else For A Web-based Demo Interface?

Dec 3, 2009

My company has some software which we use to acquire data and interact with some hardware. If we wanted to put a mockup on a website which allows the user to get a feel for the UI (gather some data, change some settings etc.), what are some good methods to do so?I'm thinking either some clever javascript or flash. I've done some JS before but only to style elements of a page. I did some stuff with flash about 8 years ago and found it really fiddly.

So my questions; Are javascript/flash reasonable solutions for this or is there something better. What is likely to be the simpler/quicker route? Is there a better way to achieve the end result?] The demo doesn't need real data, just some fake/dummy example stuff is fine.

View 3 Replies

Javascript :: Use Adobe's Blaze DS Via ColdFusion Through Ajax?

Dec 7, 2009

I want to use Adobe's Blaze DS via ColdFusion through Ajax. I know enough ColdFusion and JavaScript to do what I want to do, but I want to add long poling into the application and it looks like the only way to do that is through Blaze DS...but I don't know enough about Flash/Flex to finish the job.

View 2 Replies

Javascript :: Executing SWFObject With Ajax Reloads

Jan 12, 2010

For my current project I am working on a home page that has a series of tabs above a content box that each execute an ajax script to load new content into the content box. However, some of these pages contain a flash object called with SWFObject and when the ajax script calls the page, the SWFObject javascript is not executed and I am left with the no flash support error message.

I have tried defining a function for each video call (short of just designing a single function and passing variables to it) and having the function be called as part of the ajax function but I am left with the same results. I am not opposed to using something other than SWFObject though I have been lead to believe it is the best solution currently.

View 3 Replies

Javascript :: Determine Ajax (XHR) Request Sender?

Jul 8, 2010

Is there a way in any browser to find out who (which piece of code) actually sent an Ajax request? What I mean: in firebug one can monitor network activity (in the Net tab) but there is no way of guessing where the request was initiated from.

Does anybody know firefox/firebug extensions or maybe other browser's extensions to show request source (whether it is javascript code in particular file at particular line or browser plugin Flash/Silverlight/etc)?

View 1 Replies

Javascript :: Handle Ajax Preloader For SWF Files?

Jul 29, 2010

I am looking for a javascript based preloader that can handle .SWF (flash) files. I'm very much aware that it is possible to preload a flash file by using another flash file, but I was wondering if anyone knows about an AJAX preloader that can load swfs (also, a progressEvent would be a nice extra) and then add the flash file to the HTML document. I did quite some googling but it seems that there is no such thing out there. Is it überhaupt possible?

View 2 Replies

Javascript :: Swfobject Variable From Ajax Response

Mar 27, 2012

I have several variables which i use to call flash movie, but i dont want to include that on document.ready because first i need one variable from jquery ajax response.

var flashvars = {
"debug.enabled":"true",
"background": "#000",
"uploadUrl": "UploadImage.ashx?id=" + var_from_ajax}

I have defined var_from_ajax outside document.ready.

My Ajax success function is

success: function(data) { var_from_ajax = data.id; swfobject.embedSWF("movie.swf", "divID", "600", "400", "10.0.0", "expressInstall.swf", flashvars, params, attributes);}

But looks like i cannon embed my movie with variable from ajax request..

View 1 Replies

Javascript :: AJAX Call That Returns Flash Video?

Mar 2, 2010

I have an AJAX web service call that returns a chunk of HTML that I then apply to a DIV element on my page.This works fine for any html element except a flash video which comes up with 'Movie not loaded'.I've double-checked the html that is being returned and it's all fine, and it works if I don't use AJAX, but when I use AJAX and then add it using JS it doesn't seem to attempt to load the playlist.

View 3 Replies

Javascript :: Flex Ajax Bridge, Or Any Other Push Method With ColdFusion?

Jul 5, 2011

Is it easy to implement Flex Ajax Bridge with ColdFusion? Where can I learn how to use it? My frontend is pure HTML+JS and I just need the push capability. I thought of using Websocket Event Gateway and Server Sent Event (aka EventSource) but seems like they don't have much browser support quite yet. Any pure jQuery short/long polling option Any good Server Sent Event polyfill solution available for older browsers?

View 3 Replies

Javascript :: Looking For Html/flash/ajax Uploader Component With Specific Requirements

Oct 27, 2009

There is a number of Flash and AJAX based uploaders around. I need a file upload component for an existing form in an existinc application, so I have very specific requirements for it. Maybe somebody knows one off the top of their head and saves me a lot of research.

I need a file upload component that has a progress bar and "upload" button next to it (= standalone functionality, no connection to the submit event of a surrounding form).

It should be either Flash or Prototype based. No JQuery or Moo, as the app runs with prototype.

If server-side scripting is needed, it must be PHP. No Perl, no ASP.

On successful upload, I need a custom Javascript function triggered. (I need to update a file list that is displayed on the same page.)

The possibility of filtering file names before upload (no Umlauts, spaces..) would be a plus.

I will try to give this question a bounty in a minute if I'm allowed to.

Edit: I can't seem to open a bounty. Do I have to wait first?

View 2 Replies

Javascript :: Intercept The Response Of An Ajax Http Request Made By A Flash Object ?

Feb 24, 2012

I want want to intercept the response for an ajax request made inside a flash object via javascript.

View 3 Replies

Ajax :: In Terms Of HTTP Request Performance Pick AJAX Or Flash?

Jul 19, 2011

In terms of HTTP request performance should I pick AJAX or Flash? To be more specific, I'm more into Flash than AJAX and I'm currently working on a wide scale web project. I wanted to try AJAX out for once and now it's getting too messy for me. Before it gets more complicated I thought may be I can run Flash on the background for HTTP Requests and use it with javascript. I couldn't find any benchmark on the Internet, but I think AJAX is faster than Flash. So what's your personal experience? Is there too much difference between Flash and AJAX?

View 4 Replies

Ajax :: FBJS AJAX.post Is Not Working After Permissions Dialog?

Feb 21, 2011

I have problems with facebook application based on flash which communicate with PHP using FBJS-bridge.When someone use the application for the first time, he/she is asked for various permissions. After that, flash contact PHP with ajax but request is never sent. When you refresh page, everything is working without any problems.If you remove the application on privacy settings, refresh the page and try again -same bug happens.If you allow application, refresh page, in other tab remove application and start application in previous tab - user is asked for permissions but everything is working after allowing application.This is FBJS code

function openPermissions(){
Facebook.showPermissionDialog(/*permissions string*/, permissionOnDone);[code]......

openPermissions is called to display permission dialog, and on allow flash function allow() is called. In flash, allow() calls JS function ajaxCall(), which should make ajax request. But, ajax.post never sends request. I know that for sure, because flash function parseAjax was never called and also debugging tools in browsers are not showing any ajax requests. URL and parameters are same as when it is working. No flash or JS errors are detected...

View 1 Replies

Actionscript 3.0 :: If Press Play Button While The Sound Is Already Playing It Has The Same Song Playing In The Background

Nov 13, 2010

I have a sound clip that I'm loading externally into my flash file. The code I'm using looks like this and is placed in the as layer on the first frame,

var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var myTransform = new SoundTransform();
var lastPosition:Number = 0;
mySound.load(new URLRequest("introaudio.mp3"));
myChannel = mySound.play();
[Code]....

View 14 Replies

ActionScript 1/2 :: Stop Other Sounds From Playing While Current Sound Is Playing?

Apr 10, 2011

I am creating a game that has 6 movieclips all on the main time line of the game. Each movie clip has three buttons that when clicked plays, pauses or stops a sound clip.When I press any of the sound clip play buttons that sound starts playing, the problem is when I click any of the other sound clip play buttons those sounds also start to play. Is there a way I can disable the other sound clip buttons while the current sound is playing then enable all of the buttons when the current sound has stopped.
 
This is the code that creates one of the sound objects

[Code]...

View 3 Replies

Stop The Playing Sound And Start Playing The Button?

Oct 3, 2009

So I made a few buttons with sounds within them and when I publish it they work just fine. But what I want them to do is;

Say I click a Button.The sound starts playing.Then I click it again, before the sounds done playing.I want it to stop the playing sound and start playing the button I just clicked on, whether it be the same button, or a different one.Right now it just ends up sounds like an echo because it'll play it as many times as you click it.

View 2 Replies

Flash :: Playing Sound From Data Acquired From Sound.extract()?

Aug 1, 2011

I'm trying to play a sound using a technique found here (play the sound by sampling raw sound data gathered from the original with extract()), with the difference that the mp3 sound is embedded in the swf, not loaded externally. This is my code:

var soundBytes:ByteArray = new ByteArray();
var mp3sound:Sound = Sound(new Sound1_design()); // this is the embedded sound
mp3sound.extract(soundBytes, int.MAX_VALUE);

[Code]....

This works, in a way, except that the resulting sound is distorted (it has a kind of a metallic ring).

View 1 Replies

ActionScript 2.0 :: [FMX] LoadSound - Sound To Keep Playing While The Rollovers Load Sound

Jun 22, 2003

I am loading small sounds dynamically with the loadSound command. These small sounds are activated with a rollover. see script below. This works ok. however. i want the first sound to keep playing while the rollovers load sound. a bit like playing the piano. This works ok when i import all the sounds into the library and place them on their very own button. however the size of the flash movie increases to 140k. whereas when i load them dynamically the size of the movie is 20k. obviously i want to load dynamically.

But with dynamic loading each sound stops when another sound is rolled over, so that there is only ever one sound playing at once. I need to load the sound into a different level or something, so that the first sound can keep going while the smaller, shorter sounds play over the top. this is my script below. The first sound loads when the movie starts. This is the one i want to keep playing. Then there are the smaller ones with rollovers. does this make any sense? there's actually 13 little sounds.

[Code]...

View 3 Replies

Professional :: Stop A Sound From Playing If It Is Playing Already

Dec 6, 2011

ok so i have a button that plays an animation for fire when held down. and when realsed goes to and stops and frame one. when it reaches the end of the time line it goes to and plays at frame 10 and goes back to the end of the timeline. I have a sound for the fire animation that plays for the effect. The problem is the sound keeps going untill its over even if the button isnt held down. and when the playhead reaches the end of the timeline it goes to and plays and frame 10 and it replays the sound. if i hold it down it will just keep playing the sound over and over from start to finish. what i want it to do it when i hold the button down i want it to play the sound and when released it stops the sound where ever it is at. I also dont the sound to play again if there is a sound already going to stop it from playing 20 sounds at one time it gets loud and you need asprin after about 5 seconds of that.

View 2 Replies

ActionScript 3.0 :: Assign A Sound To A Soundchannel Without Playing The Sound?

May 4, 2011

The thing I don't understand is how to assign a sound to a soundchannel without playing the sound. All the examples I've seen do this.

Code:
_SoundChannel = _sound.play();
_SoundChannel.stop();

And how can I set a SoundChannel volume to zero before allocating a sound to it?

View 2 Replies

CS3 Sound Control - No Sound Playing?

Apr 16, 2010

I am trying to embed some sound controls, and have hit a dead end. I made my play and stop buttons, imported my mp3,, assigned it proper linkage, and inserted this AS2 :

[Code]...

The buttons are named "play_btn" and "stop_btn" respectively. When I export it or preview it, hitting the play button does not do anything.... I hear no sound. What could be up with this?

View 4 Replies

Javascript :: Run After Swf Is Finished Playing?

Aug 9, 2010

I'm working on a project where a SWF will play (as sort of a splash), followed by JS. After the video plays, the navigation and content will appear, and the video will fade out. I'm just wondering what would be the best way to accomplish this? Play the video first and then load everything via ajax behind the scenes? The goal is to be as seamless as possible and I am having a flash asset provided to me by the client.

View 1 Replies

Sound Playing Too Soon?

Sep 2, 2010

Im making an animation and in the 3rd scene i have a deer that screams and the sound plays way to early. I had to drag it out way past the frame where it opens its mouth for it to play at the right time.

I have no idea whats wrong this has happened before. I really dont want to have to guess on where to put the sound for everything a character says.

View 2 Replies

Sound Not Playing On Mac?

Sep 21, 2009

Back to my nightmare project, I've embedded sounds in the project that play based on certain user actions. They play fine for me (PC), but my customer is telling me they don't work for her (Mac).Would there be ANY reason a sound would play on a PC but not a Mac?I've told her to update her Flash player to make sure it's current and to make sure her speakers are on and the volume is up, but no sound.Okay, the REAL reason this isn't working is user error based on everything else I'm told that's happening and not happening, but I need to cover my bases and see if there really may be a reason sounds won't play on a Mac.

View 3 Replies

Javascript :: Browse Pages While Music Is Playing?

Apr 23, 2011

There's a new feature on vkontakte.ru (I bet facebook has the same, not sure though). You browse pages while player keeps playing music at the background without interruption. How is this possible?

View 2 Replies

Javascript :: Playing A Stopped Video In Flash?

Jun 15, 2011

I'm having great problems getting Javascript to resume a flash file.The flash file loads up and the video is set to autoplay false. For some reason, any Javascript is not recognising the AS3 function. It keeps saying the function is undefined. e.g.

function getFlashMovie(movieName) {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];

[code]....

View 1 Replies

HitTest Was Playing The Sound Over And Over?

May 20, 2009

I have a playhead that moves across the screen and when it hitTests a movie clip it plays a sound. all is working fine except that it will only work the first time it is played. The playhead is controlled by a button. I am working in Actionscrpt2. Here is the code on the movieclip:

onClipEvent(enterFrame)[code]....

In the begining I was having trouble because the hitTest was playing the sound over and over but the above code sorted that out. I think that the new problem was created by fixing the old one.

View 7 Replies

ActionScript 2.0 :: Sound Playing Only ONCE

Nov 13, 2009

I want to achieve the effect of a computer startup. IE, it only plays -once- and then doesn't play again for the rest of the time, even if the user comes back to the same menu. How do I get Flash working that way? I've tried variables to no effect... it doesn't want to change the variable condition.

[Code]...

View 1 Replies

ActionScript 3.0 :: Sound Is Not Playing

Aug 2, 2010

I have another one to get off my chest.I am basically doing a spinning wheel game - i want the sound to play each time the Stopper hits a new prize section of the wheel.In my code, from my EnterFrame function, i call my playSound function but the sound file just never plays .. i know the function is being called as i can see it in trace.I suspect that because the EnterFrame is constantly being called, that the sound file - because it has determined it won't complete - it ignores it totally.[code]

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved