ActionScript 3.0 :: Creates A Class And The Second One Plays Audio Related To The Class?

Aug 18, 2009

I have two classes. One creates a class and the second one plays audio related to the class. When the user clicks the right answer the quiz gets removed from the stage, but my audio keeps playing. I am wondering how I remove/kill the audio class/object at that point.

My class gets created like this:
 
private var quizAudio:CaseStudyQuizAudio;
 
and further down:
 
quizAudio = new CaseStudyQuizAudio(theAudio);
 
When I tried to kill it, I was think this would do, but to no luck so far:

quizAudio = null;
 
delete quizAudio;

How is this done?

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Movieclip Related To Each Object Of Class?

May 30, 2007

I have created a class and I would like each object of this class to be related to a movieclip which I would be able to move around the scene.But I have to admit I don't really know how to do that.

The best would be that each of my objects have a movieclip called "graphical_representation"

[Code]...

View 1 Replies

ActionScript 3.0 :: Object Class To Store MovieClip And Related Data?

Jun 17, 2010

I'm trying to create a game and have come across something that I have never really played with and am not sure if it is what I need to use in this instance or if it's as powerful of a resource as I am hoping.I have a movieClip that is an animated man. I can move him around my stage by clicking on him and then clicking where I want him to go. But I'm eventually going to need to store information about him. Such as his x and y position on the stage, attributes about him that are custom to my game.Real Quick: The man represents an army and when the user clicks on him, I want to display things like, Military Units in this army, number of men remaining in each unit, experience and so on. If you have ever played any of the "Total War" games you will know what I'm talking about.

View 1 Replies

ActionScript 3.0 :: Why Flash Creates Extra Instaces Of Class

Oct 7, 2009

I have linked a MovieClip to a class. After that I have places some movie clips of them on the stage. And now I like to do something with them, but I couldn't because some extra instances are created (I wonder how???) and they make me problems.The names of instances of the class I placed on the Stage are legs1 legs2 legs3,and the extra instances are: instance21, instance25,...(and they are not visible on the Scene)

View 2 Replies

ActionScript 3.0 :: Creates An Instance Of A Class (and Stores It As A Variable)

Sep 15, 2010

If an object, or say... a document class, creates an instance of a class (and stores it as a variable), and it doesn't pass any arguments to the constructor of the class, can that class object, by simply having a function of it called by the parent, tell who sent it that command/request?

In other words, can a class object know who called it (such as it's parent) via a (seemingly) anonymous call?

View 1 Replies

ActionScript 1/2 :: Loading Images Dynamically In A Class That Creates A Custome Menu Item

Sep 3, 2010

I am loading images dynamically in a class that creates a custome menu item that is loaded into a custom menu. It works fine except the very first image never loads

[Code]....

View 8 Replies

ActionScript 3.0 :: SoundChannel In Class Only Plays Once

Dec 27, 2010

The soundChannel only plays once.Im guessing this has to do with using a class?[code]...

View 5 Replies

ActionScript 3.0 :: Make A Class That Plays An Animation When It Is Clicked On?

Dec 28, 2009

I am trying to accomplish the following:
 
In my Library, I would like to have a symbol that I can drag to the stage, and when I compile my flash movie and click on the symbol it plays a certain animation. I would prefer for the animation to be defined in the class rather than sit on the timeline.
 
I have tried various approaches to this and I keep hitting walls, so instead of running down more blind alleys I figured I'd just ask the question... what is the best approach in flash to accomplish this?

View 5 Replies

Create A Music Player In Flash That Creates A Waveform Of The Audio File?

Jan 16, 2010

I have got three screenshots below of Flash-based audio players on various websites that draw a waveform of the clip it is going to play and moves along while it is playing and also allowing the user to click on a point on the audio file and it jumps to that point.I have very little Flash knowledge but is this easy to achieve? I would like to just show the Flash file an mp3 and it draws the waveform. I understand this could be quite intensive on CPU so would there be a way of caching the waveform data so it doesn't redraw each time the file is loaded?

View 5 Replies

ActionScript 2.0 :: Importing Class - The Class Being Compiled - 'ImageLoader' Does Not Match The Class

Jun 25, 2007

I'm having some problems importing a class, the message that Flash gives me is this; The class being compiled, 'ImageLoader', does not match the class that was imported, '[URL]'. The only line of code in my flash movie is this: import com.martijndevisser.*; And yes, the class is in that folder The class is from here: [URL] I've used the class before and it works fine, I just dont know what to do?

View 4 Replies

ActionScript 3 :: Microphone Class - Number Of Audio Samples

Jul 7, 2011

In Java there is a method of the AudioFormat called
getSampleRate
This returns the number of samples per second. I was wondering what the best way to achieve this with the microphone in flash is. I am not sure if I need to add a SamplesDatatEvent and use extract() or ?? I need to know the number of samples per second from the audio coming into the mic.

View 1 Replies

ActionScript 3.0 :: Class - Load The Audio File In Frame

Oct 10, 2009

I made a doc class and a sound class. the sound class purpose is that if ever add sound i can just recycle easily the code to use and via the doc class just load it intot he correct frame. Issue: I made the sound class and it loads correctly for the first frame... But i want to add ANOTHER audio file, how would i alter my code setup so i can load the new audio file but instead on frame 1 always... i want to be able to load the audio file in frame 3 or 5 or 25.... How do i do that with the code i have setup??

[Code]...

View 1 Replies

ActionScript 3.0 :: Stream AAC Audio File Stored Locally Using NetStream Class?

Jan 25, 2010

I would like use NetStream class to stream AAC audio file stored locally on server (because i can't use Sound class, AAC not compatible) How can i do this ? (without flash media server)
 
I have tried using http protocol, no errors occured, but i receive no audio data.

View 13 Replies

Unload SWF Still Plays The .flv (audio)?

Jan 4, 2010

I have a captivate generated SWF file which has a .FLV inside it.In flash on click of a button I unload the movie(SWF), the video goes away but the .FLV still plays the audio.

View 2 Replies

ActionScript 3.0 :: RemoveChild But Audio Still Plays

Jul 16, 2009

I have as3 script that loads an external swf which contains flv video:

[Code]....

The movie clip is removed but the audio continues to play. Why is this? What can I do to make sure the audio is removed also?

View 10 Replies

FLVPlayback Plays Audio But No Video?

Jul 30, 2009

this one is really doing my head in and any advice (even vague thoughts) would be really great.I have an FLVPlayback component on the stage and I am loading 8 FLVs in to 8 separate video players within it. I then play the first one and when it ends I randomly select which to play next.Everything seems to work fine except that each time I run it one or two of the clips play back with only audio only and no video. It is not the same clip each time but whichever one it is will consistently fail to playback untill I re publish when it chooses a differrent clip to fail on.I am publishing for FP8 from CS4 on a Mac and it fails when I test movie as well as in FF and Safari.
 
If anyone has any ideas on this at all please shout them out or I am heading for the forrest never to return

View 3 Replies

SWF Intermittently Plays Wrong Audio

May 16, 2011

I created an interactive exercise to teach music. After the correct answer is given, the user has the option to click on a button and hear a specific sound (a chord played on the piano). The sound button appears only after they give the correct answer, and they can click on it as many times as they want. There are a series of these exercises, each one on a different frame and each one with a different sound.The sound files are called in the button code.

Here's the problem. In some of the exercises, if I keep clicking on the sound button, it plays the correct sound about 20 times in a row but then it will suddenly play a different sound (a chord from one of the other exercises). Then it goes back to playing the correct sound.

View 3 Replies

Ensure Full Audio Plays Before New URL Loads?

Nov 20, 2011

I have a few invisible buttons that link to URLs, and when clicked open the new URL in the same window and plays a sound.

Sadly, the URL loads before the sound is finished, making this pretty lame.

How do I ensure the full audio plays before the new URL loads?

View 13 Replies

ActionScript 2.0 :: SWF File Unload Still Plays Audio?

Jan 4, 2010

I have a captivate generated SWF file which has a .FLV inside it.In flash on click of a button I unload the movie(SWF), the video goes away but the .FLV still plays the audio

View 6 Replies

IDE :: Embed A 20 Sec Clip (with Audio) Plays Automatically?

May 9, 2010

Im making an animation to describe how a potential iphone app would work. Its going to be a 3 min clip not interactive at all, just plays right through showing how it would work. This is not for web. Just for presentation purposes.

By problem is this: Within the timeline, i need to embed a 20 sec clip (with audio) the plays automatically and when it ends the rest of the animation continues. I cannot for the life of me figure out how to do this without the audio and video being all messed or the video not exiting the screen once its finished. I hear all this talk of action script but have no clue where to start.

View 1 Replies

Flash :: "Instance Name At Design Time" Vs "Instance Name Added Dynamically" Vs "Variable Name In Related Class"

Nov 4, 2011

Say i have a movieclip named a_Mc ( ClassA ) I have a sub-movieclip named b_Mc ( ClassB )

CASE 1: Accessing the sub-movieclip b_Mc which is already present inside the a_Mc movieclip

( Since Flash IDE has "Automatic instance naming" OFF )

ClassA mentions the name of b_Mc as => var b_Mc:MovieClip;

NOTE HERE: That the variable name MUST BE same as the name of the instance on stage.

So i can access it as : trace( a_Mc.b_Mc);

[Code]...

View 1 Replies

Professional :: Flash Player 11.2.202.228 No Longer Plays Audio Flv

Mar 29, 2012

Installed the new flash player and all of a sudden my flv audio no longer played in an existing media player built using the FLVPlayback component.
 
Finally figured out that if I change the FLVPlayback component parameter "maintainAspectRaion" from false to true, the audio will play.

View 11 Replies

Professional :: Flash Player 11.2.202.228 No Longer Plays Audio Flv Either?

Apr 2, 2012

Audio flvs that previously would play fine no longer play. I get "NetStream.Play.Failed".This occurs when progressively playing over HTTP, i.e. starting NetConnection.connect(null) and then NetStream.play("http://url_of_my_flv");Regular RTMP playback still works.So, I've seen two posts with similar issues in the last day or so:

View 1 Replies

ActionScript 3.0 :: Netstream Audio Plays While Video Loading?

Jan 14, 2009

how to get flv's to load up dynamically using xml - it all works well apart from this one problem that i have.

when the thumbnail for the flv is clicked the preloader appears and the flv starts to load - but for some reason the audio begins to play almost immediately - then when the flv actually loads then the audio plays again whilst the initial (unwanted) audio carries on playing!

this is the script for the netstream:

[Code].....

View 1 Replies

ActionScript 3.0 :: FLV Player Still Plays Audio Of Video After I Navigate Away From It

Nov 21, 2010

In my main swf file i load external swf files for each section.. In my video section i load a swf that includes a flv player that plays flv's with sound!

when i go back to menu...or go to another section....sound is still playing! why? I was thinking maybe i need to add a stop all sounds actionscript when going back to menu?

View 5 Replies

Flash :: Create A Separate Class Then Create An Object Of That Class Within The Main Class?

May 17, 2011

I'm new to Flash AS3. I started making a game and I am a bit confused. Let's assume that I want to create a game that has multiple levels/modes, how can I do this in an object orientated way?

When i create games in other languages e.g. XNA C#, i create a separate class then create an object of that class within the main class and run the game based on a simple statement.

[Code]...

View 2 Replies

ActionScript :: Python - Using Dynamic Python Class Definition And Amfast Dynamic Class Mapping And Code Generation To Generate Class

Dec 19, 2011

I have an xml snippet that contains an object hierarchy:

doc = """
<RootObj val1="ValueOne" stat1="Stat1" stat2="Stat2">
<internalarray type="array">
<InternalObject val1="12" val2="12" />
<InternalObject val1="13" val2="13" />

[Code]...

View 1 Replies

Android :: WebView - SWF Plays Can Hear Audio But Screen Blank

Jul 8, 2011

I am trying to display local flash swfs in the WebView. I have WebView set up and it will happily display local HTML files, but when I try to display Flash, the screen is blank. The flash file is running as I can hear the audio. I have noticed that most swf players from the android market suffer the same issue.

View 2 Replies

ActionScript 2.0 :: Setting A Session Variable That Only Plays The Audio Once When Using The Site?

Apr 9, 2005

I am currently using to in a sound player in an on the homepage of an html/asp website. At the moment it plays some welcome audio when the visitor arrives on the site (index.asp), however it does get an little annoying when it plays everytime you go onto the homepage.

Is their any way of setting a session variable in actionscript that only plays the audio once when using the site?

View 1 Replies

ActionScript 2.0 :: Using SetInterval For Idle Timer That Plays Audio Clip

Sep 26, 2007

I have a swf that advances through a series of frames by pressing any key. I am trying to set up a timer so that on idle (no keypresses for X sec), it plays an audio clip.

My AS below works fine, but if you press keys very fast it seems to get out of sync and plays the audio almost randomly (at least faster than it should). Does anyone know what might be causing this? BTW, I have tried using a keylistener which seems to make it even worse by affecting the volume level randomly.

//ON THE INITIAL FRAME...
myInterval = setInterval(callback1, 20000);
function callback1()

[Code].....

View 1 Replies







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