AS2 :: Handle Missing Sound Card
Feb 25, 2010
In my AS2 Flash game, I play a number of sound files and wait for the "onSoundComplete" message/function before proceeding.The problem is if there is no sound card in the system (or it is disabled in device manager) - everything acts like it is working (no errors, onLoad handler gets "true") - but the sound never actually gets played, and as such, my event never gets triggered.I had planned on dealing with this by hooking into my sound code, and if I detect no sound card, just kick off a timer to wait a few seconds before manually firing the "onSoundComplete" function.The only problem is that I can't reliably find a way to determine if there is a sound card in the system! AS3 seems to handle this quite nicely by passing back a NULL soundchannel - unfortunately I am stuck in AS2.0
View 1 Replies
Similar Posts:
Apr 23, 2010
I use this class as a base for all my streaming sound. It gives you two missing properties not available in the Sound class: a reliable soundchannel always available for referencing and a latency value indicating how long it took for your last call to play() to actually play the sound. I'll probably post it on my blog when I get the time but here it is:
[Code]...
View 8 Replies
Jan 12, 2011
we'd made a flash site which was working fine on normal pc and mac and on all kind of browsers, but we discovered if the pc has no sound card, the flash will freeze after loaded, we tried some other flash sites, some of them also cannot run without a sound card but some can, is there any script we need to add to avoid this problem?
View 1 Replies
Feb 23, 2010
Is there any way to detect whether sound card is installed on a machine using AS 2.0? I am embedding my swf in an html (javascipt)file. If this is possible in javascript, even then it will solve my purpose.
View 4 Replies
Oct 28, 2010
printing directly to a Photo ID Card printer in a web browser?I have a web application that manages user data, photo, and so forth. I'd like to add a Print ID Card feature to it. The web application is a single page javascript application that talks to a RESTful web service via JSON. I'd like to display what the printed card will look like on both the front and back for approval before the user clicks the print button.
Generate front and back JPG or PNG images to print on the server, send them to the client for display and approval, and then somehow send the images to the printer.Use javascript with SVG or Canvas to display the card to print in the UI for approval, then somehow send the SVG/canvas data to the printer.Generate a PDF and print the PDF to the printer.Use Flash to display and print Use a Java applet to display and print Something else?
View 3 Replies
Jan 20, 2012
I want to play youtube videos and programmatically direct firefox's audio out to a particular sound card.
Playing raw data 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:1059: Sample format non available
Available formats:[code]....
The command-line suggests that it worked, but audio came out of hw:0,0 (the default).Do I need to make my own plugin? Or do I need to force alsa to take 44100Hz?I refuse to use pulse since the memory leak bug makes it crash often.
View 1 Replies
May 7, 2009
From the Sound Class information, it says to use the SoundMixer Class to handle embedded Sound Files. I have two sound files embedded, that I have setup in 2 separate layers, starting at frame one in the main timeline. I needed to do this so I could see the wave files, and coordinate text with the waves. I do not want to load these files into the .swf file at runtime using URLRequest. How do I get a handle on those as they exist, to make each controllable by separate volume and mute controls for each sound?
This will be a challenging question, because, "it can't be done" doesn't work for me. I managed to create a way to use an external classfile to control the main timeline, the ROOT timeline, without having to create a sub movie to root. I can use my component to call play(); as though it were in code in a frame. But it isn't, it's in an external classfile. I passed root to the classfile and told the classfile to think of it as a movieclip - that put the handle on it. I tried similar way with root as a Sound, but that isn't detailed enough - I need to get a handle on the frame that contains the embedded sound file. I embedded, attached it, using the properties view for the frame.
I've attached, or whatever you want to call it, these sound files to a frame, and this frame is or should be attached to the layer I've created. So, under the assumption that the ROOT has everything attached to it in some manner (it is after all the foundation for the COM), the stage of the root contains the visual components, so ROOT has to have the layer objects attached to it, which should have the frame objects attached to the layers. I have two layers that each have a .wav file attached to frame one. Somehow Flash keeps track of that - I want to know how Flash does it so I can read what flash reads.
View 1 Replies
Feb 9, 2010
I am facing a problem with multiple sound file in one flash file. I have added a background music in my flash and on one of the page, I have published a video. However both sound files are clashing with each other. If I will do stopAllsounds(); on the video frame then while moving on next section the sounds still remains stop.
View 1 Replies
Jan 20, 2012
I know global variables are supposed to be bad but is it possible to create global classes? I am creating an application and I want to have one class that handles sound. From any class I would like to be able to say soundhandler.playSound(); without having to pass references all over the place. It should just know it is there.
View 1 Replies
Sep 24, 2004
[URL]
can i handle multiple sound through one volume slider by passing parameters and MC instance name?
View 1 Replies
Feb 6, 2010
I'm creating a scrollbar gallery from a tutorial on this site. Though I've completed the tutorial, and customised the gallery to my own needs, however I'm trying to make a very small change to it - and no matter what I do, keep running into problems. I'm trying to replace the rectangular handle with my own customised handle - a (20 x 20) 'circular' png image that I've imported into Flash, made a graphic and stored in the library (though I understand it can be imported using actionscript, like the other images in the gallery).
[Code]....
View 7 Replies
Apr 16, 2011
I am triggering short sounds dynamically from the library for a game (Specifically Air for Android). When the user clicks a button the sound can take up to 600ms to actually play. I have set it for any silence before the actual sound by calling the sound like so:
[Code]...
All return the same results. I know there are threads here that talk about this but none have offered a real solution that I can find. Is there no way to cache the sound or store it in a buffer?
View 1 Replies
Dec 3, 2009
I just made my first flash game. A memory game, But I cant figure out how to put some graphics on the front of the card. And make it take the pictures from a image folder. and make it look ok ?
View 1 Replies
May 20, 2011
I'm having difficulty getting a scoring system on a card game to work properly.
View 2 Replies
Jul 17, 2010
I'm trying to make a basic card game where I can flip the cards and also drag them around. Here's the code for card.as, the file that's controlling my cards.
package{ import flash.display.MovieClip;
import flash.events.MouseEvent;
public class Card extends MovieClip { private var _type:*;
public function Card() { this.buttonMode = true;
this.addEventListener(MouseEvent.CLICK, onClick);
} private function onClick(event:MouseEvent):void { this.play();
} public function setType(type:*):void { _type = type;
loader_mc.addChild(_type); }}}
I've been trying to add draggability to the card, but I'm not sure how to do it. Do I need a separate ".as" file to control it? Or, do I build it right into this file? If so, how would I do that? I tried making a separate ".as" file but then my basic card flipping code doesn't work.
View 2 Replies
Dec 26, 2010
There's something I'm trying to make but I just can't seem to figure it out. I want to make something that allows a person to build a deck of cards from multiple sets of cards. I also want a button that can be clicked to randomly choose a card from the created deck. For example: lets say there are four sets of thirteen cards (hearts, diamonds, spades, and clubs). The user can select which of the four sets will be included in the deck. Once the sets are chosen the user can click a button and one card will be chosen from the selected sets. What is the best way to handle something like this? Is there a tutorial that explains how to do something like this?
View 3 Replies
Aug 31, 2010
I would like to do some video capture through flash. Is there a good video capture card I should use? Or will any do?
View 1 Replies
Oct 23, 2009
I need get the details from card using Flash action script ..
For example :
ATM process. i am insert the card and display the card details ( Name , account number).
View 1 Replies
Mar 14, 2011
How can I simulate turn over a card? I want to simulate that user laid the cards face up.
View 4 Replies
Sep 6, 2011
This is what I need to do, I need to design an access card where the user would type his/her name in the textbox, press a submit button, and then have their name on the card so that the card can be printed with their name on it.
View 4 Replies
Dec 12, 2011
I'm trying to code a card game in AS3 for a class project. There are three computer players and one human player. The code to run the overall game is something like this:
[Code]...
View 1 Replies
Feb 3, 2012
I'm trying deploy a test Air app (Authored Flash CS5.5 IDE) onto a Sony Andriod Tablet. Running Andriod 3.1.I'm not having much luck. My only way of connecting to the tablet is through an SD Card. I've tried opening the files directly of the SD card, no joy.I've also tried opening the SWF through the web browser but that didn't work either.URL...
View 4 Replies
Mar 6, 2009
I am trying to make a graphic of a card slide down with actionscript, I don't want to use the time line.
Code:
// Get the card top pos
var card_y = getProperty ( _root.Aladdin.Card, _y );
// Move down
for ( var i = card_y; i <= 0; i++ ) {
setProperty ( _root.Aladdin.Card, _y, i );
}
Obviously this makes the car animate way to fast and cannot be seen by the user. So how exactly in actionscript would I put a 0.1 second pause between each loop iteration?
View 4 Replies
Nov 9, 2009
I am trying to create an e-card with a personalized picture on it.
Does anyone know somewhere with a tutorial teaching me how to create one. I wish it to be like a christmass card that opens.
View 2 Replies
Nov 18, 2009
I am trying to design a pop up card in flash but it's a tough one to work out. I have a flat illustration which my client wants to appear as if it is on a pop up card, but I'm having trouble trying to animate this. Everything I try looks a bit flat, and trying to get the perspective right is a killer.
View 1 Replies
Oct 21, 2009
How can I quickly build a credit card payment wizard in flash? - AS2 / AS3 I have some actionscript to validate a credit card number, but what next? Which service / what scripts should I use to accept credit card payments in flash?
View 1 Replies
Nov 30, 2009
I was trying to create a online greeting card generator.
View 2 Replies
Dec 14, 2009
I'm at the end of finishing this application and am completely stumped as to why ampersands (&) are displaying like, &. The app is a greeting card. The text field it is displaying incorrectly in is a dynamic text field that is pulling the data from an XML file. The XML file is being generated dynamically via PHP which is pulling the data from a database
View 13 Replies
Aug 10, 2010
I'm trying to adapt the memory game in chapter 3 of the book "ActionScript 3.0 Game Programming University" for my own uses. I want to get all of the cards to flip and drag.I am able to flip the first card and drag it, but when I flip the second card over, I can't drag it. I have two files, MatchingGameMe.fla and MatchingGameMe.as. All of the actionscript is in MatchingGameMe.as. Here is the code. Does anyone see how I can modify it so that all the cards drag?
[Code]...
View 3 Replies
Aug 10, 2010
I'm trying to adapt the memory game in chapter 3 of the book "ActionScript 3.0 Game Programming University" for my own uses. I want to get all of the cards to flip and drag. I am able to flip the first card and drag it, but when I flip the second card over, I can't drag it. I have two files, MatchingGameMe.fla and MatchingGameMe.as. All of the actionscript is in MatchingGameMe.as. Here is the code. Does anyone see how I can modify it so that all the cards drag?[code]
View 3 Replies