Sound class help?(oop)

hey,
i have got all my public vars for sound class but im having trouble on how i would execute them because i normal would use event listener but its OOP lol so how do you get that functionality :/
---code in star.as file:
package
    import flash.display.MovieClip;
    public class star extends MovieClip
        public var my_sound:MySong = new MySong();
        public var my_channel:SoundChannel = new SoundChannel();
        public function star()
thanks everyone

dont worry i learnt oop and made my own class here it is if anyone has the same problem!
Code:
package
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.media.Sound;
    public class SoundClass extends MovieClip
        var sound = new Sound  ;
        var mySound:MySong = new MySong  ;
        public function SoundClass()
            mySound.play();
Hope this helped somebody else

Similar Messages

  • Why Sound Class is greyed out?

    Hi, there
    I am trying to assign a sound class, but found it was greyed out. I'd appreciate if someone could help me to find a way...Thanks!

    I think you're right. The file I was working on was originally in AS2...Thanks a lot!

  • I have one of the old macbooks and wish to hook it up to my tv. do i need a mini dvi to hdmi adapter plus a 3 rca phono lead with a jack for the sound. please help as im useless at this stuff. cheers

    i have one of the old macbooks and wish to hook it up to my tv. do i need a mini dvi to hdmi adapter plus a 3 rca phono lead with a jack for the sound. please help as im useless at this stuff. cheers

    First we need to know which one of the 9 different models of MacBook you have. To see which model you have go to the Apple in the upper left corner and select About This Mac, then click on More Info (and then System Report if you’re running 10.7 Lion). When System Profiler comes up check the Model Identifier and post it back here.
    The Late 2008 model 5,1 Aluminum Unibody and the Late 2009 model 6,1 and Mid 2010 model 7,1 White Unibody have a Mini DisplayPort. The Early 2006 model 1,1 through Early 2008 model 4,1s plus the Early and Mid 2009 model 5,2s have Mini-DVI ports. Each would take a different adapter to connect with the TV.

  • I have just upgraded to 10.8 on my macbook pro and now I can't access itunes, videos and there is no sound - anyone help?

    I have just upgraded to 10.8 on my macbook pro and now I can't access itunes, videos and there is no sound - anyone help?
    It is an old macbook pro probably 6yo with the back lit keys - not under applecare anymore obviously. I downloaded the upgrade last night which took quite a while longer than it should have.
    Anyone else experienced this and can suggest something? many thanks Jo

    Run Software Update, wait till all the updates have finished downloading then restart the mac.

  • HT3986 i installed win 7 on my mac book, and the sound driver was installed successfully, but i don't hear any sound, please help

    i installed win 7 on my mac book, and the sound driver was installed successfully, but i don't hear any sound, please help

    Is the volume muted? Click on the volume icon in the system tray to see if it shows as muted. If that's the case, I know of a workaround to fix this because if you unmute the speakers now, the condition will come back when you reboot your computer. I don't know the exact steps off the top of my head at the moment as I'm not in front of my machine. Check this first and reply if muting was the problem and I will detail the steps needed to fix the problem.

  • Looking for information about AS3 sound classes in "audio" wrong places?

    I'm looking for in depth information about ActionScript 3.0 sound classes. No matter where I search I continually encounter the same sort of kindergarten level descriptions, which never teach more than what we can readily glean from Adobe's documentation. Someone must know where there a discussion that really gets to the heart of the matter.
    I've read Adobe's LiveDocs on the Sound, SoundChannel, SoundMixer, SoundTransform classes. Indeed, they provided me enough guidance to create my own streaming MP3 player, with volume, pan, my own custom mono mix, http request, a preloading animation, and peak meters ...
    Here's an example (in the last statement of the following code) where I understand the end effect, but I fail to comprehend what happens at the compiler level:
    var currentSoundSource:Sound = new Sound();
    currentSoundSource.load(new URLRequest("http://www.mySite.com/myRecording.mp3"));
    var audioChannel_01:SoundChannel = new SoundChannel();
    audioChannel_01 = currentSoundSource.play();
    Unfortunately the class definitions in LiveDocs are quite terse, and they're seemingly incomplete with respect to:
         •     advice on best practices
         •     a thorough coverage of class to class interactivity
         •     a description of exactly how audio streams/plays into channels
    ... and in certain cases it appears that Adobe's descriptions are not fully accurate.*
    Regarding best practices, at first blush I'm sure everyone ponders over the fact that SoundChannel and SoundMixer have a stop method while the Sound class does not.
    One assumes that this surprising design must bear some advantages. If so,  what are they? Where are the analog sound mixer analogies? What would be the disadvantage of a sound class with a stop method ...  particularly when they have their own play method?
    Where are the discussion of these concepts? (Even if Adobe hired the wrong guy to write its sound classes, there should be some follow through that thoroughly explains the existing situation.)
    Phrankie
    * Here's an instance where the docs appear to be partially in error. (Is "and play" mistakenly included in the following?)
    "The Sound class lets you lets you create a new Sound object [and] load and play an external MP3 file into that object."
    ... uh, mmmmmm ... we play an MP3 into a sound class object?
    Wouldn't it be more accurate to say the following:
    A soundChannel can receive the audio data from a sound class object. We can play a sound object into an SoundChannel and manipulate it by altering the SoundChannel's soundTransform property, and we can stop it with the SoundChannel's stop method. 

    check everything you can find written by tinic uro.  this will get you started:  http://www.kaourantin.net/

  • I have OS 10.9.4, and I can't change the basso alert sound for Reminders.  Works ok for the rest of the applications that use an alert sound.  Help?

    I have OS 10.9.4, and I can't change the basso alert sound for Reminders.  Works ok for the rest of the applications that use an alert sound.  Help?

    http://www.microsoft.com/mac/support
    http://answers.microsoft.com/en-us/mac/forum/macword?auth=1
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macword/microsoft-wor d-for-mac-2011-will-not-open-error/ecc42616-6f49-40bb-b8f5-e21c711ea359

  • About playing dynamic generated sound using Sound class

    Dear sir:
    The live doc of Flex 4 says:
    In Flash Player 10 and later and AIR 1.5 and later, you can also use this    class to work with sound that is generated dynamically.    In this case, the Sound object uses the function you assign to a sampleData event handler to   poll for sound data. The sound is played as it is retrieved from a ByteArray object that   you populate with sound data.
    and i read one article(the following link)
    http://www.kaourantin.net/2008/05/adobe-is-making-some-noise-part-2.html
    it said: The Sound class only support 44100 sample rate,32 bit,2 channel sound data, is that true?
    Then if i get one ByteArray( 8000 sample rate,16bit,1 channel), how can i modify it to let the Sound class play it?
    thanks..

    Worked perfectly.  Thank you thank you!
    Jen

  • Sound class

    Hi everyone. I'm creating an audio player which will receive
    xml information from a server and play the requested sone. I have
    all that set up. The only problem I'm having with is creating the
    progress bar while the sound is streaming. What happens is when the
    audio player is opened, the song starts playing because of the
    streaming property that I set in the actionscript, but the progress
    bar doesn't show up until the song is fully cached on the user's
    machine. So the effect is you don't see the progress bar when the
    audio player opens and the song plays. Instead the progress bar
    will appear a couple of seconds after the audio player starts
    playing. I've put the project up on my site, so you can take a look
    at it and see what I'm talking about,
    www.mark-yieh.com/airspun/newaudioplayer.html. If you know how to
    fix it please let me know. It will really be appreciated. Thanks.
    I've looked at all the event handlers in the sound class, but none
    of them let's me gather information from the sound file until it's
    fully loaded. For example, with the MovieClipLoader class, there's
    an onLoadInit handler and an onLoadStart handler and an
    onLoadProgress handler, but there's none for the sound class. Is
    there another solution?

    if you're attempting to get the sound.duration before it has
    loaded, then you'll find that this will only return the number of
    seconds downloaded so far. sound.position should work okay though.
    check out the comments in
    livedocs
    for sound duration for some handy ways to approximate this
    property during streaming.

  • I just rented a movie on apple tv and there is no sound! Help! I really wanted to see Crazy, Stupid Love tonight!

    I just rented a movie on apple tv and there is no sound! Help! I really wanted to see Crazy, Stupid Love tonight!

    Check your audio out and Dolby digital settings, try restarting the Apple TV by removing all the cables for 30 seconds.

  • I am trying to put sound fonts into a playable format in garageband. I followed all of the instructions on the sound font help page for Garageband, but I still cannot play the sounds, or get them to show up. Any suggestions?

    I am trying to put sound fonts into a playable format in garageband. I followed all of the instructions on the sound font help page for Garageband, but I still cannot play the sounds, or get them to show up. Any suggestions?

    Sorry, I was confused by your profile signature showing "GarageBand (Mac) '11".
    It is very similar in the newest GarageBand 10.0.2: 
    Enable Audio Units in the GarageBand Preferences > Audio/Midi.
    Create a software instrument track.
    Show the Smart Controls and click the button.
    In the Info panel scroll, to make the Audio Units brick visible and click the "Instrument" control.  Select "AuInstrument > Apple > DLSMusicDevice" and click it, to open the settings.
    This should show you a panel, where you can select a Sound Bank. Does that show your sound font?

  • Sound class pause

    Hi i have a flash presentation, which has a pause and play
    button.
    the pause button pauses my movie fine, except i have voice
    sound as a sound class, the sound starts to play, but i can not get
    it to pause or stop
    any ideas what i need to do?
    i have the following code

    no, your code above is not correct: your onRelease functions
    are written as such to be placed directly on your button objects
    and not on the root time line; additionally, the function
    volAdjust(), which is the function responsible for controlling your
    sound, is not present in your code at all.
    to fully understand what is going on, take five minutes to do
    this:
    1.) open a brand new flash document.
    2.) import a sound to your library ( file > import >
    import to library ), open your
    library ( f11), right-click on the sound inside your library
    and select linkage,
    check export for actionscript, make sure export in first
    frame is checked, and
    then enter, newWelcome , into the identifier text field.
    3.) draw a rectangle on stage and convert it to a movieclip
    (f8) - name it whatever you wish.
    4.) with the newly created movieclip selected, go to your
    properties inspector
    and enter the string, btnPlay , into the instance name text
    field.
    5.) open your library ( f11) and drag another instance of the
    movieclip you just
    created onto the stage.
    6.) with the newly dragged out instance of your movieclip
    selected, go to your
    properties inspector and enter the string, btnPause , into
    the instance name text field.
    7.) make a new layer above the one you have working in and
    name it actions.
    8.) lastly ,copy and paste the code i sent you into the first
    frame of the layer
    actions. (note: your movieclips, btnPlay and btnPause,
    should be on the first
    frame of your second layer ( the layer beneath your layer
    labeled actions ).

  • Sound application help

    here is another example of a sound application that does not work. can any one help me fix it??
    import java.awt.*;
    import java.applet.*;
    import java.net.URL;
    public class AnotherAudioAttempt{
      public static void AlertSound(){
        try{
          java.io.File file = new java.io.File("file:///home/nova812/myJava/audio/siren.au");
          AudioClip welldoneclip = Applet.newAudioClip(file.toURL());
          welldoneclip.play();
        catch (Exception e){}
      public static void main(String[] argz){
        AlertSound();
    }//end classRon_W

    I did try System.in.read() but it didn't work either. However, going the the archives here I found a version of the following code. finally some code that works. I modified it so that it would play a sound when the app starts. Althoug the code works, pushing the play sound button to fast will cause the app to not play a sound for a long time. some tweeking is needed.
    import java.awt.event.*;
    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    import java.io.*;
    public class PlaySound {
      public static void main(String args[]) {
      new PlaySoundFrame();
    class PlaySoundFrame extends Frame implements ActionListener {
      Button playSound = new Button("Play Sound");
      PlaySoundFrame() {
        super();
        /* Add the window listener */
        addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent evt) {
          dispose(); System.exit(0);}});
        playSound.addActionListener(this);
        add(BorderLayout.NORTH,playSound);
        /* Size the frame */
        setSize(200,200);
        /* Center the frame */
        Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize
        Rectangle frameDim = getBounds();
        setLocation((screenDim.width - frameDim.width) / 2,
        (screenDim.height - frameDim.height) / 2);
        /* Show the frame */
        setVisible(true);
        playSnd();
    public void playSnd(){
       AudioClip ac = null;
          try{
            ac = Applet.newAudioClip(new URL("file:///home/nova812/myJava/audio/siren.au"));
          catch(MalformedURLException mfe){
          System.out.println("BadURL!");
          if(ac != null)
            ac.play();
          else
            System.out.println("no sound!!");
      public void actionPerformed(ActionEvent evt){
        if (evt.getSource() == playSound){
          playSnd();
    }Ron_W

  • RemoveChild and Stop all Animation/Sound plz help!!

    Hey hope someone can help me out with this, been stuck on this for a while now and tried a number of different way but no luck so far.
    Im trying to removechild and at the same time stop all the on going animation and sound, in a way reset them so that if this child is added again it plays like it did the first time.
    I've tried these scripts but non work, either i get an error or the sound doesnt stop and the animations stack:
    //==================================================
    1.
    bgFarm.stopImmediatePropagation()
    2.
    while (bgFarm.numChildren != 0)
    bgFarm.removeChildAt(0);
    3.
    gameMain_Controls.islandBG.removeChild(bgFarm);
    ===================================================
    the bgFarm is added to the main background from another class
    thx, hope someone can help
    pavel

    If all are done in script things are easier but I assume you're using timeline MovieClips. Generally speaking, stop() stops the timeline and removeChild() removes a DisplayObject (such as MovieClip) from a DisplayObjectContainer (such as Sprite and MovieClip). As for the sound, if you manage it by script it's easy to stop a sound with SoundChannel.stop(), but if your sound is on the timeline you have not much control. Either SoundMixer.stopAll() (but this stops ALL the sounds) or set SoundTransform volume to 0.

  • Large App Design Class Structure - OOP or MVC?

    Helloooo Everyone!!
    I used flash a few years ago and am now getting into as3, I began watching hours of as3 tutorials and training in preparation to build a web app with multi user access and the structure of the design is a bit beyond my skills and need help please.
    My problem: I can design well in flash, love the graphic design tools and can draw the screens the way i want my app to look; i can build different library components and fla's and set up the project files.
    I best give a brief explanation of the system i want to design.....
    I am building an app, where different business types all work together on properties, repair projects and associated property data.
    For example a property owner owns a property, an agent runs the property for the owner and finds a tenant to live in the flat, the tenant who lives in the flat will use the online facility to tell the agent about repairs needed, or pay rent online, or check diary events such as when he needs to renew his tenancy or insurance. The repair the tenant requests will be authorised by the agent and a tradesman will then have to interact with the repair details and provide a quote or just carry out emergency work.
    First dilemma... Do i use MVC Architecture Or Object Oriented programming with custom classes.
         I was planning on the latter - OOP
         I cant quite get my head around how to think about structuring the folders and classes???
    For example. Do i build a class for 'Property' a class for 'projects' a class for 'project tasks' etc
    Is it that you think about Admin for example and build a class for invoices, a class for quotes.
    Different users will access the same property but see different information relavent to them only
    Could someone please mentor me through the design process? You can see the flash design at www.milesquicker.com/projectplanning
    I would be eernally grateful
    Miles

    MVC is an OOP Design Pattern.
    For a program like this i wouldn't use the MVC design pattern.
    I will probably create a class for each section in my application.
    Design Patterns are an advanced topic of OOP and i dought that you will be able to master it after watching
    a few tutorials, same goes for OOP. If you are just starting with programing i would suggest you to start with procedural programming
    and when you feel comfortable with that you can get into OOP although for an application like yours OOP will be the best solution.
    I dont know anything about your programming skills but the pull of an application like that they got to be really good.
    I would also suggest that you will look into flash and mysql because you will have to create databases that will hold the information.

Maybe you are looking for

  • ABAP HR How to create infotype with table control in it like Infotype 0008

    Hi Experts. I need help from u guys. My client requirement is to create custom infotype just like 0008 infotype which contain table control to save amount and wage types. I try to create infotype with table control using PM01, but that table control

  • Post processing of defect records from automatic Goods movement

    During the run of COGI transaction, we got the List of all goods movements with errors.The list of errors can be <b>saved at once</b> and the other option is <b>save for background</b> (when we choose option List-> Save-> Save at once or Save for Bac

  • Ppp0 interface not strarting ueagle-atm

    When I try to connect to internet using an old sagem f@st 800 with ueagle-atm the interface is not started. However the modem is operational /etc/ppp/peers/ueagle-atm user "fti/xu6rfh2" plugin pppoatm.so 8.35 noipdefault usepeerdns defaultroute persi

  • Can express vi handle large data

    Hello, I'm facing problem in handling large data using express vi's. The input to express vi is a large data of 2M samples waveform & i am using 4 such express vi's each with 2M samples connected in parallel. To process these data the express vi's ar

  • Missing SSIS Extension in Config Files

    As I understand it, in order to use an SSIS package as a data source in a report, I need to enable the SSIS extension in the RSReprotDesigner.config and RSReportServer.config files.  That extension is in neither of these files. I have SSIS running on