Pause function works, but I loose soundTransform

I am stumped on pausing a sound and keeping the volume sound transform on play again.  Pause works, but when I play again it plays correctly from pause position; however, the sound transform vol reverts to 1 (100%)
//soundbed vars
var mySound:Sound = new theme();
var sndVol:SoundTransform = new SoundTransform(0.2);
var channel:SoundChannel = mySound.play(0,2,sndVol);
/pause function
musicOn_mc.musPause_mc.addEventListener(MouseEvent.CLICK,togMus);
function togMus(e:MouseEvent) {
var pausePosition:int = channel.position;
    if (musOn) {
        channel.stop();
        musicOn_mc.musPause_mc.gotoAndStop("off");
        musOn = false;
    } else {
//THIS IS THE PROBLEM
       channel = mySound.play(pausePosition);
        // ???? any idea how I would re-apply the sound transform?
//END OF PROBLEM
        musicOn_mc.musPause_mc.gotoAndStop("on");
        musOn = true;
Thanks

If you look in the Help you will see that each time you call play a new channel object is created and assigned the variable - so you lose the old transform. You just need to reassign it...
channel.soundTransform = sndVol;

Similar Messages

  • Pause function working with haptic joysticks.

    I've come into an internship, and have been working on some code. What is being done is information is read from haptic joysticks for transferal to different cRIO setups. The next thing I would like to be able to do is pause the application with one button press on the joystick while still reading for the a different button press to continue the application. From what I can see there is no easy way to continue reading data from the joysticks while also pausing the application without rewriting larger portions. Am I just missing something or is there an easier way?
    If anyone would like to look at the code, it is included. The test parts in question are in inner frame seven, as well as the bottom of the parent loop. The example in the bottom currently has a stop button for test purposes, but I would like to just have it be with one button press on the joystick.
    Attachments:
    NB Control 2.vi ‏91 KB

    You are right, there is no easy way to get to where you want to go.
    The first problem you will encounter is figuring out what the cde is actually doing -- and with the number of sequence structures you are using, that won't be easy. You also need to connect up your error clusters so you can tell if an error occurs.
    You have a lot to learn about LV and should go through some of the online tutorials, but to do what you want the approach I would start with is to create a loop with an event structure in it that has a timeout event. In this event handler, put all the logic that you want to be able to start and stop. Next, create a shift-register to hold the timeout value -- this way to "pause" the VI you just pass a -1 to the timeout  to disable it.
    So create two buttons called "Pause" and "Resume" and define separate value change events for them. In the Pause event handler, pass a -1 to the shift register. In the Resume event handler pass a number that is equal to the desired update interval (in msec). 
    That's the barebones approach at least.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Function works, but breaks used in Class

    I have this function I use over and over in my applications
    (Addins is but one item I have to do this to):
    private function doAddins():void {
    var _addIns:Array = [];
    var _len:uint = app._chosen2.length;
    for (var i:int=0; i<_len; i++) {
    var _m:String = app._chosen2
    .@sn;
    _addIns.push(_m);
    Where "_chosen2" is an ArrayCollection defined in the main
    application file. Obviously, it loops through this array collection
    and makes an array out of all the "sn" attributes. It works
    perfectly.
    So I figured I'd add it to my Utilities class file, as a
    static function, like:
    public static function getSNs(a:ArrayCollection):Array {
    var _arr:Array;
    var _len:uint = a.length;
    for (var i:int=0; i<_len; i++) {
    var _m:String = a.@sn;
    _arr.push(_m);
    return _arr;
    And then I call it like : Utitlies.getSNs(app._chosen2);
    But it bombs out with an error that I am trying to coerce an
    array out of an array collection. Why?

    In the second function, you are declaring the variable _arr
    as an Array, but you are not setting it. This could be part of it.
    var _arr:Array = new Array();

  • Re: Apex 3.0 Insert Function Works, but records can't be found

    i have an existing application that I created with Apex 3.0. It allows users to search for records using several different criteria and it allows them to update records.
    I added functionality that allows the user to insert a new record. The insert allows user to populate a dozen fields,. Behind the scenes it uses triggers to get the next value for the key and to set the update time stamp and user id. It also sets a flag that is used in the select query.
    The insert works fine. Whenever I add a record, I can view it using SQL developer.
    However if I try to search for a record that was inserted using the application, the application never finds the record.
    In SQL developer I run the same query that application runs. I always get the records that were added.
    If I compare records that were added by using the application with existing records on the table, the data looks similar.
    Any thoughts ?
    thanks
    Edited by: 975204 on Mar 29, 2013 1:22 PM
    Edited by: 975204 on Mar 29, 2013 1:23 PM

    yep
    I got it working that way
    The select query allows users to enter search criteria into text boxes. It also allows them to select a field from a list of values
    (lower(lastname) like '%' || lower(:P5_NAME) || '%')
    AND (lower(address) like '%' || lower(:P5_ADDRESS) || '%')
    AND (lower(title) like '%' || lower(:P5_TITLE) || '%')
    AND (lower(phone) like '%' || lower(:P5_PHONE) || '%')
    AND deptNo = decode(:P5_DEPT,'%null%',TRIM(lvl01),:P5_DEPT)
    I took these apart and tried the search criteria separately
    What I discovered was that for the list of values I had to add "or is Null"
    (lower(lastname) like '%' || lower(:P5_NAME) || '%')
    AND (lower(address) like '%' || lower(:P5_ADDRESS) || '%')
    AND (lower(title) like '%' || lower(:P5_TITLE) || '%')
    AND (lower(phone) like '%' || lower(:P5_PHONE) || '%')
    AND (deptNo = decode(:P5_DEPT,'%null%',TRIM(lvl01),:P5_DEPT)
    or deptNo is null)
    It works fine now, thanks

  • The keyboard functions work but fails to display in Windows 7

    I have the recent 15 inch, i7 Macbook Pro (2.2 GHz version). I had no problem installing Windows 7 using Bootcamp and have updated the Bootcamp after the installation via Apple Update.
    To clarify, what I mean by that is all the functions such as volume control, eject, and brightness control from the keyboard works. However, at the beginning of the bootcamp install, I was able to see the icons pop up on the display. Now, there are no icons anymore. I now have Windows 7 Professional SP1, and have my suspicion on the Windows update. Any ideas?

    Well...  this is what I found out and what I did to "fix" my problem.  First my situation was that I had 2 drives, a lite-on blu-ray rom drive that was supposed to basically read anything, and a pioneer blu-ray burner.  I was going to use the rom drive to do my reading and reserve the burner for just that, burning.  What I found out, because Encore would freeze when loading, was that Adobe uses a Roxio routine to go out and get the information about all the drive in the environment to know how to use said drive(s) for this session.  The Roxio routines hang in an endless loop, for me, on the rom drive.  When I go into device manager and disable the rom drive, Encore loads just fine and I can master... whatever, and burn or create ISO images and go on my merry way.  When done, I can re-enable the drive and use it as intended except for trying to use it in Encore.
    This happens in CS3, CS4, CS5, and I think I tried it in CS5.5.  Roxio never has "fixed" the problem.
    My fix to fix the problem.. I replaced the blu-ray rom drive with another pioneer burner.  Turns out the new drive was a newer version.  So I moved the older version pioneer to the lower drive letter and use it as the reader drive for anything and setup the newer pioneer drive as my burner drive.  Encore loads with both drives enabled, I can master anything, and eveything works fine.  I've given up trying to have a rom drive for "just reading".
    Also, given up testing to see if Roxio has ever "fixed" thier init routines for Encore.  It always works this way with 2 burners on my system.  One I use as a "reader" all the time which is also my backup burner and one as my "production" burner. And BTW, I usually build on ISO image with Encore and use Image Burn to burn my multiple copies output.
    This is my "fix"!!

  • JExport cdf function working - but changing essbase files ?

    Hello,
    we finally managed to get CDF JEXPORT function running
    (Link http://www.jasonwjones.com/?p=68 was very helpful)
    now we scheduled daily exports to txtfiles and oracle database - it's running well - we scheduled to export every night from testdatabase and productiondatabase -
    but I noticed, that it's now changing the essbase *.pag and *.ind files last-accessed-datestamps (not all of our 100 GB -but obviously those we fix the export to)
    as we run daily incremental backups and essbase has to be offline during that time, this causes us several hours of offline time every night - because additional 50 GB of data have to be secured - the dataexport command does not change the files but jexport does
    -> did anymody notice something like this ? jexport changing datestamps of *.pag and *.ind files ?
    my common understanding is that an export is reading data and should not change files - as we want to export attributes we can not use dataexport command
    of course I am aware of workarounds like: use dataexport command, do not export every day, buy a faster backupserver, run restructure so that the relevant data is in fewer datafiles - but still hoping that there is a better solution.
    regards
    Rodian

    Hi,
    thank you for being interested into the issue
    we use the new essbase / hyperion planning / epm 11.1.2.1 64 bit on windows 2008 R2-
    maybe you or somebody else has an idea or we really didn't see the easy way
    what we need is a fast export of essbase data combined with alias member names and attribute member names
    dataexport command seems not to allow to export essbase data combined with/sorted/fixed by attribute dimensions - we realized already that dataexport is much faster (15 min instead of 24 hours for the major export part - so we ended up with a combined approach already (it was already tricky to get jexport running exporting to oracle tables):
    1 dataexport script (15 min runtime for all real essbase budget data using dataexport to file and 2 jexport scripts (5 min each), which we actually just use to derive the corresponding attribute dimension values for those of the 5000 members, which are used for budgeting in the selected planning scenario
    We managed jexport to export to oracle database directly, while dataexport we managed only to export to file (so it needs another script to import into oracle database again)
    Furthermore, we needed also the alias values of each member - which dataexport and jexport did not deliver - so we had to use sql statements to derive it from the hyperion planning application oracle tables hsp_object and hsp_alias
    at the end, the result of the 3 calcscripts and the alias names from the hyperion planning oracle table have to be written to 2 txt files, which get delivered to SAP on daily basis - the reason why we ended up with such a wild mix of scripts is obviously that SAP and the other involved planning system defined the data to be delivered
    as we have only 2 interfaces and 2 planning/essbase applications and limited financial budgets, it appeared too big effort to invest time into ODI (still open, what the cost of this would have been, if the scripts could be scheduled and would be fast)
    all scripts are scheduled and run daily and are very reliable - with the only disadvantage, that the queried *.pag and *.ind (not all files change) files tend to change datestamp every night now.
    I clearly identified jexport the root of it.
    we managed outline extractor utility 11.1.2.0 running as well on 11.1.2.1 - but looks like this can not scheduled and allows only to export the pure value lists of attributes and members
    the only thing i could test is placing the jexport script into a hyperion planning businessrule instead of an essbase calc script and exporting to textfile only (but I expect same result)
    so the only remaining alternative might be to extract also the attribute dimension values (hsp_member_to_attribute) for our members from the hyperion planning oracle tables and combine them with our essbase data
    so what we actually miss is an essbase dataexport command, which allows to export essbase data with attribute values and member names from alias tables directly into oracle tables (ok, to a flat file would be ok as well)
    regards
    Rodian

  • After update to Firefox 8, the pause function on videos no longer works

    I updated both my desktop and laptop to Firefox 8.
    The laptop is a Toshiba and it's OS is Win 7 with Kapersky AV. The laptop has no problems.
    When using Firefox on the desktop, which is a clone, with Win XP as the OS, and Norton AV, all up to date, the pause function on videos often does not work.
    I have been able to play the same videos on this desktop computer using IE 8 and pause them with no problem.
    I need to have the pause function work, because I am interrupted a lot, and it can take me 3 hrs. to watch a one hour video due to that.
    Can anyone help? If not, I'll just have to use IE, though I much prefer Firefox. Thanks.

    The Statusbar is gone and the "lock" with it, as of Firefox 4.0. Security information about a web page is shown by the Site Identity Button.<br />
    The old padlock could give users a false sense that a site is secure by not supplying all of the information about a site and only showed that there is a secure connection that didn't guarantee that you are connected to the right server. The Site Identity Button was introduced in Firefox 3.0 to show more complete "identity" information for HTTPS web pages. <br />
    https://support.mozilla.com/en-US/kb/Site+Identity+Button
    You can add a padlock to the location bar with the Padlock add-on- https://addons.mozilla.org/firefox/addon/padlock-icon

  • How do you make the 'places' function work in iphoto

    `i have just imported a lot of old photos from my 2007 macbook onto a new macbook pro with ilife 09. `i am trying to make the places function work but can't get it to work. The 'i' icon does not appear in the bottom right hand corner of the events main photo as it's supposed too. Any suggestions?

    Simply open an event; select 1 or more photos and select the i in the lower right corner of a photo thumbnail. You will get the Geocoding window. Start typing the address/place/country in the location area. For detailed addresses you select new place. You can resize the window. Maps from google appears and you select the place it finds. You can even drag the pin to a specific area. Press ok and your done.

  • New (last night) 4s.  at home everything works but at the office, I can't seem to send or receive emails.  Don't know about texts yet.  I manually connected to my company's wi-fi network, have internet access and a good signal.  The phone function works

    Just set up my 4s last night - works fine at home but can't get or send email at the office.  Wi-fi connection working and signal is good and telephone and Internet functions working.  Manually set to my company's wi-fi. 

    Your company has most likely blocked the ports necessary to connect to mail servers outside the corporate network. Shut off WiFi and see if it works. If it does, you'll need to talk to your IT department about it.
    Odds are they are not going to change the policy without a valid business reason to do so.

  • Unable to "share" a photo. Get error message stating server is not responding. But all normal email functions work just fine.????????

    unable to "share" a photo. Get error message stating server is not responding. But all normal email functions work just fine.????????

    Just a quick bump... Anyone got any thoughts on this?

  • Searching a pdf file including both latin caracters and other (HERE: greek) . Entering words in English works but entering greek words the search function does not work

    in a serachable dictionnary ( old greek-English) in pdf format the search function works when entering English words but not when entering greek words using the polytonic Greek keyboard from Windows. Why ? Is there a solution to search for Greek words ?

    Try a copy/paste some of the Greek text out into Word. Does it display as expected in Word?

  • MS Access 2010 Iscurrentwebuseringroup function works in desktop but doesn´t in web

    Hi,
    i have a web DB in sharepoint online.  I need to know who is the current user to show a specific form.  The Iscurrentwebuseringroup("name of the group") function works fine in the desktop app (I use the function in a textbox) but when
    the app is open from the web browser don´t show the value (true or false).
    can you help me? 
    Thanks!!

    I have discovered the solution to this problem and am posting here in case anyone else experiences this issue.
    Under network preferences, I changed the service order of my network interfaces.
    The VPN interface is now placed above my everyday Airport interface.
    When not in use, VPN automatically places itself below the Airport service. When I connect with VPN, this service automatically returns to the top and I can connect correctly to my place of work (including network-restricted areas).
    Hope this helps anyone in a similar situation.

  • After updating OS X 10.8.5, bluetooth is not available in the menu bar. The Magic Mouse is recognized and working but the bluetooth mouse functions do not work.

    After updating OS X 10.8.5, bluetooth is not available in the menu bar.
    The Magic Mouse is recognized and working but the bluetooth mouse functions do not work.
    I have downloaded and installed 10.8.5 combo but it does not help.
    Menu bar - System Preferences/ there is no bluetooth item
    I restarted with cmd + alt + P + R it doesn't help.

    Did you try the suggestions from your other post on this?

  • HT201317 Is there a way to "stream" older photo's to my PC stored on my Iphone before I upset up "Photo Stream?  NOTE:  My Photo Stream "pushing function is working, but I can only push "new" photos to my PC.

    Is there a way to stream  "older" photos to my PC that were stored on my Iphone before I implemented "Photo Stream?  NOTE:  My Photo Stream "pushing" function is working, but I can only push "new" photos to my PC.

    It might not be streaming but have you considered copying the photos directly off the iphone onto your PC?  I plug my phone in via the USB cable like usual and in Windows Explorer, navigate to Computer\Apple iPhone\Internal Storage\DCIM\860xxxx  and there they are. Copy & paste and you have pictures.
    Hope it helps.

  • My AppleTV will not play anything over Air Play.  Every other function works perfectly, and my Internet/router are working at top speed.  I can watch HD Netflix and YouTube but nothing via my iTunes library on my MacBook or iPad.  All software is updated.

    Every other function works perfectly, and my Internet/router are working at top speed.  I can watch HD Netflix and YouTube but nothing via my iTunes library on my MacBook or iPad.  All software is updated.  The AppleTV will recognize that Air Play is trying to do it's thing, but with music files it sounds like they're skipping and video files just load endlessly. 

    I'm searching for an answer to almost the same exact problem, using almost the same exact hardware and software. Has an answer been found?
    The files that I'm trying to burn come from eMusic, and they are formatted mp3. Recently, (after the iTunes update to 9.2.3?,) they would not drag and drop from iTunes into Toast. From several different discussions I've tried working around this by dragging to the desktop first then dragging and dropping to Toast, going to Toast from a programmer's homemade help window, " iToons," and today, after talking with Apple support, going directly to Toast from my eMusic folder. Alas, all recordings do not perform like they use to. Sometimes they play and sometimes not. There is one I managed, that is listenable, but sometimes I have to put it in my car stereo over and over again as it gets ejected with an error code, sometimes, finally it takes it... Some of the recordings on other disks I've burned are not clean - they have white-noise sounds creeping in... I use to have none of these problems. One time as I was listening to a CD that managed to play, and it just stopped playing... Is there an answer out there to get back to how it use to be? Thanks for you help.

Maybe you are looking for

  • Cielo app for accepting credit card payments.

    Hi there, I don't even know if this is the right place, but if someone could help.... I'm form Brazil and a BB user for years, was looking for upgrading my 9900 to a Z10/Q10 phone. My company will start accepting credit card payments using smartphone

  • How to create HD Video for Web

    After watching HD movie trailers on the Apple Web site I was wondering if anyone has information on how I can create 480P Video clips of my own work for my website? At the moment, I use compressor and the settings for Large DSL. It's good, but I'd li

  • Product costing issues

    1)what is different bitwen with quantity structureand with out quantity structure? 2)what is valvated stocks and non valvated stocks? 3)what is the need of cost component structure , how many segments can be define in cost component structure? 4)how

  • Make symbol width equal to dynamically added content

    Hey everyone, I have a nav menu with 4 instances of a toggle button symbol that contains a text element name "label". After compositionReady I'm iterating over each instance and changing the "label" to another value that I load from an array. I'm abl

  • OK This might be a dumb question....

    I know that Appleworks is not going to be updated. I even have a copy of Pages already. My questions is this; I keep getting this: Exception Type: EXCBADACCESS (SIGSEGV) Exception Codes: KERNINVALIDADDRESS at 0x0000000017874000 Crashed Thread: 0 When