MouseDOWN after sound has Completed plz help!

Hey there, hope someone could help me out, im sure there is a simple solution to this problem.
This what I would like to happen:
ROLL OVER - the btn plays a sound
MOUSE DOWN - plays the animation
Im trying to get the animation to play only after the sound has been finished. But here is the problem; you roll over the btn and the sound starts, and u click in the middle of the sound playing, is it possible the animation to only start after this sound finshes?
here is the code that im trying but it doenst work:
import flash.media.Sound;
import flash.media.SoundChannel;
var Sound_Timer:Timer = new Timer(1000,1);
var looksLal: that_Layla =new that_Layla();
var looksLal_Channel:SoundChannel;
var looksLal_Transform: SoundTransform=new SoundTransform();
var sndOne:Boolean = true;
var anim:Animation = new Animation  ;
var btn:btnObj = new btnObj  ;
var clickVar = 0
addChild(btn);
btn.x = 500;
btn.y = 350;
addChild(anim);
anim.x = 0;
anim.y = 0;
btn.addEventListener(MouseEvent.MOUSE_DOWN,btn_click);
function btn_click(e:MouseEvent):void
clickVar += 1
if (clickVar == 2)
anim.play();
btn.addEventListener(MouseEvent.MOUSE_OVER,roll_Over);
function roll_Over(e:MouseEvent):void
if (sndOne == true)
clickVar = 0
sndOne = false;
looksLal_Channel = looksLal.play(0,1);
looksLal_Transform.volume = 1;
looksLal_Channel.soundTransform = looksLal_Transform;
looksLal_Channel.addEventListener(Event.SOUND_COMPLETE, snd_Done);
function snd_Done(event:Event):void
Sound_Timer.addEventListener(TimerEvent.TIMER_COMPLETE,sndPlay);
Sound_Timer.start();
function sndPlay(event:Event):void
sndOne = true;
clickVar += 1
if you can help id rly appriciate it
thx pavel

here is a sample for you :
import flash.media.Sound;
import flash.media.SoundChannel;
var looksLal: that_Layla =new that_Layla();
var looksLal_Channel:SoundChannel;
var looksLal_Transform: SoundTransform=new SoundTransform();
var sndOne:Boolean = true;
var clickVar = 0;
addChild(btn);
btn.x = 500;
btn.y = 350;
btn.addEventListener(MouseEvent.MOUSE_DOWN,btn_click);
function btn_click(e:MouseEvent):void
looksLal_Channel.addEventListener(Event.SOUND_COMPLETE, snd_Done);
btn.addEventListener(MouseEvent.MOUSE_OVER,roll_Over);
function roll_Over(e:MouseEvent):void
trace("play");
clickVar = 0;
looksLal_Channel = looksLal.play(0,1);
looksLal_Transform.volume = 1;
looksLal_Channel.soundTransform = looksLal_Transform;
function snd_Done(event:Event):void
//anim.play();
trace("ok");

Similar Messages

  • 3G iphone won't sync or backup after os4 upgrade! Plz help!

    Today is the 1st time I've tried to sync & backup my iphone since updating to the recent os4 software. My phone keeps rebooting in the middle of backing up! I've run a diagnostic and all is well. I've tried restarting my pc but no fix. Everything seems fine up until the backup part then I notice the phone with that circle thingy then it makes that chime sound when u plug it up to charge. So it starts to sync & backup then reboots itself over & over. Has anyone else experienced this problem? Can somebody plz help me? Thanks for any assistance.

    rtaylor671,
    Try resetting the sync history by going into iSync.
    You can get there from your applications folder.
    Once you open iSync, go into the preferences of iSync and reset the sync history.

  • My APTV 3 restarts by itself after the last update. plz help me

    Netquark Sep 16, 2014 8:42 AM   
    Hello my APTV 3 restarts by itself after the last update.
    I restore my APTV with pc and it does not work.
    if I unplug the cables after 30 minutes, it works, but once sleep if you restarts the problem comes back. plz help me
    Apple TV

    Did you successfully restore the Apple TV?
    Apple TV (2nd and 3rd generation): Restoring your Apple TV

  • Got Noise in the Speaker after plugging external display. plz help.

    Hi guys, i just bought the apple Mini DisplayPort to VGA Adapter, but as soon as i plug it in, i got annoying noise comes out from my speaker.
    im using M box Mini as my audio interface.
    at first i thought it might be the wiring noise, so i moved the M box away from the external display, and moved the usb cable to varies position, but didnt work..
    guys plz help. the noise is just there constantly never give me a break!! really driving me crazy!! cant work with that noise,. plz help guys

    sorry
    i was getting confused with this rig i got here fsb should have been 166 for athlon 2600.    as for the not display no boot i just had to wait a little longer as the capitors kept on for ages eventually reseting the bios settings allowing boot.
    just tested the radeon seems to be running ok now - no crashes so far maybe 1.9 fixed it
    cheers

  • K7N2G Sound problem! PLZ HELP!

    hi!
    While i am watching moviesor playing games  on my PC,after like 10 minutes the sound disappears.
    i am using the integrated sound device with the newest update and WIndows XP. WHat the problem can be.
    please help!

    try using th realtek drivers..........here is link to a post that may hlep you
    http://www.msi.com.tw/program/service/forum/index.php?threadid=14649&boardid=14&styleid=1
    let me know if it helps......GL

  • Facebook app not working and my blackberry world has completely disappeared, help please!

    Hi guys, I'm in a real stooper, my facebook app. Was due an upgrade but soon after the upgrade it stopped working and everytime I click on to the icon it crashes the phone so I have to switch it on and off again to get it working, it then displays an error message. I've also noticed that my blackberry app. World icon has totally disappeared.
    I really hope someone can give me some advice as I don't really know where to go from here and who to contact, please help!!
    LauraXX

    hi there
    use the browser to go to facebook and log in scroll down to the bottom of the page and down lowd the app from there
    after take your bt3 out  after botting  your  app will work

  • My macbook cam is not working after i reinstalled it plz help?

    i just reinstalled my macbook os x 10.8.2  but i found out that my camera is disable not working with FaceTime and messenger  plz kindly assist me on how to make my cam start working again please someone should help me ...........

    Are you sure you are running 10.8.2 or is it 10.8.5. There was an issue with 10.8.5 and the recent supplemental update should fix that camera problem.
    If it is 10.8.2, I'm not sure what is wrong. Might try an SMC or NVRAM reset.

  • Loose sound on games, PLZ help

    i download games but on a lot of games i loose sound, they will play for a while then the sound will go, its only on the games, sound works fine on everything else. thanks for any help

    This may help:
    iOS: Troubleshooting applications purchased from the App Store

  • When im trying to buy an app it says "your purchase could not be completed" PLZ help

    When im trying to buy an app it says "your purchase could not be completed"HELP HELP HELP

    Contact iTune Support
    https://ssl.apple.com/emea/support/itunes/contact.html

  • Today, i can't update J2SE 6.0 completely. plz help me.

    Today, i received a information for updating J2SE 6.0. And when i try to update it, there was a wrong message.
    Because my jdk is with Simplified Chinese Language, so, i think the wrong message above mean that:
    "Can not run convert propgram, Plz confirm if U've already set valid path of convertor."
    I really have no idea about this trouble.
    Thanks alot!
    Rick

    You might want to check java.com for FAQ info, or contact
    the help desk (email response) team there.
    Today, i received a information for updating J2SE
    6.0. And when i try to update it, there was a wrong
    message.
    Because my jdk is with Simplified Chinese Language,
    so, i think the wrong message above mean that:
    "Can not run convert propgram, Plz confirm if U've
    already set valid path of convertor."
    I really have no idea about this trouble.
    Thanks alot!
    Rick

  • I need help with 845 pro MS-6529 Mainboard and drivers for sound!! PLZ HELP

    I have a 845 Pro MS-6529 Mainboard and i recently just scrubbed my computer and reinstalled windows ME. But i need to re-install the driver for sound because i can't hear anything    but when i downloaded it , the files did not work and i've tried redownloading and etc and any other way possible the computer says there is no new driver software on the computer for it. I could swear though that it seems like the download is missing a file or something? could someone possibly download the software quickly for windows ME 845 Pro MS-6529 Mainboard sound driver and check for me in any way? i would b greattttlyyyy thankfull to anyone who could help!!! thanx!

    Hi,
    On-Board sound is enabled in bios?????
    Also, you will need to update Direct-X for all features too work........
    Del

  • I want compaq Presario SG1105IL sound drivers.. plz help

    i want compaq Presario SG1105IL sound drivers, I am unable to locate on HP's site...

    Hi,
    Please go to this site, select the right Operating system, you should get what you want
    Good luck,
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • I know this must sound stupid, but plz help

    Okay, heres the deal. I have my library on my Sony Viao. I just got my Mac. Im trying to transfer the library from my Pc to my Mac. I have an AirPort network set up and a .Mac account. What would be the best way to transfer my library and all my songs to my Mac. Thanks

    This is a good general guide at this link that touches on moving music as well:
    How to Move to a Mac - Get your stuff from your PC to your new Mac
    There are also these guides:
    How to move music between authorised computers
    Networking with a Windows PC
    Don't forget by the way if you have purchased any tracks from the iTunes Music Store to deauthorise your old PC if you are disposing of it so you don't use up your 5 allowances How to move music between authorised computers
    Another way would be to copy your music directly from the iPod. There are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod, this is just a selection. Have a look at the web pages and documentation for these, they are generally quite straightforward. I use Senuti but check the others out and choose whichever you are happy with.
    Senuti Mac Only
    iPodRip Mac Only
    PodWorks Mac Only
    iPod.iTunes Mac Only
    iPod Access Mac and Windows Versions
    YamiPod Mac and Windows Versions
    PodUtil Mac and Windows Versions
    iPodCopy Mac and Windows Versions

  • Hello... i cant bwoser blospot on my browser .blogspot site not appearing on my broswer plz help

    recent i added an custom domain on my blogspot site as www.allfreeebooks.net
    but on my browser this site not showing as direct url . loading loading then spot that page .
    i can access my blogspot account , can post too . but when i try to see my page on my browser not opening and cant see .
    Note : with pagewash can see page . but direct with url my site cant see . and not opening .
    sometimes can see for few min after then same problem
    plz help me ...
    one more .. not opening any blogspot site on my web browser. i have removed cookies , tried with everything .. but nothing happened .
    plz help

    If you previously used a different domain for that website then Firefox may still have old content in the cache.
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    You can remove all data stored in Firefox from a specific domain via "Forget About This Site" in the right-click context menu of an history entry ("History > Show All History" or "View > Sidebar > History") or via the about:permissions page.
    Using "Forget About This Site" will remove all data stored in Firefox from that domain like bookmarks, cookies, passwords, cache, history, and exceptions, so be cautious and if you have a password or other data from that domain that you do not want to lose then make a note of those passwords and bookmarks.
    You can't recover from this 'forget' unless you have a backup of the involved files.
    It doesn't have any lasting effect, so if you revisit such a 'forgotten' website then data from that website will be saved once again.

  • I have a new iPad wi-fi lte 16gb.when I try to sync thru I tunes it keeps on accessing I tunes stores.i have windows xp service pack 3.after running diagnostics it showed iTunes secure connection failed.unable to sync completely even once. Plz help.thanks

    I have a new iPad wi-fi lte 16gb.when I try to sync thru I tunes it keeps on accessing I tunes stores.i have windows xp service pack 3.after running diagnostics it showed iTunes secure connection failed.unable to sync completely even once. Plz help.thanks

    I'd try the following document: 
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

Maybe you are looking for

  • F-48 advance payment againest po

    *Hi Experts,* *I have created one purchase order in me21n, paid advance through f-48, then subsequently migo, miro completed.in f-53  remaining payment also made . so entire process completed  for that particular po.* *once again i tried advance paym

  • How can I show 2 fields in a Listbox ?

    In my datatable I have a field "firstname" and a field "lastname". How can I manage to get "firstname lastname" shown in the listbox?

  • How to view next document

    Hi Evrybdy Can you help me to view accounting document. when I go through Vendor open items and select one open document and see document overview, The layout of document overview is ALV classic list (Printable format) Now I want to view next open it

  • Display Color/Resolution Issues on Macbook 2.1 running 10.6.8

    My macbook 2.1 (late 2006) is having display color issues. Computer starts fine but when it loads the desktop, the display seems to be mismatching colors and at a very low resolution. The error can be corrected by plugging in/unplugging an external d

  • OIM 11gR2 GTC recon mandatory mappings

    Hi, I am trying to create a GTC for recon with ODS. Are there certain mandatory mappings to be done between ODS and OIM data fields ? Kindly share Best Regards, Varun