Repeat/loop help

Hey everyone,
I have an Excel file that has 2 columns - A=date B=event. It's really long, and I was looking for ways to send this info to iCal easily. I'm pretty new to programming (mainly AS3), and this is what I've come up with:
tell application "Microsoft Excel"
repeat with i from 1 to 856
set calDate to value of (cell i of range ("A1:A" & i))
set calTitle to value of (cell i of range ("B1:B" & i)) as string
end repeat
end tell
tell application "iCal"
activate
set theCal to make new calendar at end of calendars with properties {title:"Calendar Title"}
tell theCal
set theEvent to make new event at end of events with properties {start date:calDate, summary:calTitle, allday event:true, status:confirmed}
end tell
end tell
This returns 1 event in iCal, but I need 856 events. Can I add the loopVariable to calDate & Title in some way like this so the script would store 856 calDates i could pass to iCal:
repeat with i from 1 to 856
set calDate(i) to value of (cell i of range ("A1:A" & i))
set calTitle(i) to value of (cell i of range ("B1:B" & i)) as string
end repeat
Thanks for the help

Camelot wrote:
I just don't know how to make calDate and calTitle arrays that hold all the data. suggestion?
That's trivial:
tell application "Microsoft Excel"
  set calDates to value of cells of range "A1:A856"
  set calTitles to value of cells of range "B1:B856"
end tell
Now you can iterate through those in iCal:
tell application "iCal"
  set theCal to (make new calendar at end of calendars with properties {Title: "Old Testament"}
  tell theCal
    repeat with i from 1 to (count calDates)
      set thisDate to item i of calDates
      set thisTitle to item i of calTitles
      set theEvent to make new event at end of events with properties {start date : thisDate, summary: thisTitle, allday event: true, status: confirmed}
    end repeat
  end tell
end tell
actually this throws an error:
iCal got an error: AppleEvent handler failed.

Similar Messages

  • Real Instruments play beyond end of repeated loop

    I've tried every google-fu trick I could think of to see if anyone else has had this problem.
    I record a real instrument (say an electric guitar riff). I drag/repeat/loop it 3 or 4 times. It plays properly.
    Then at some point I select it, and move it left or right.
    The part starts at the right time, but will repeat an extra time beyond the visible onscreen loop. Once this glitch occurs, neither resaving, shrinking/re-repeating, moving it around and then back to where I want it make the track end when it's supposed to.
    The only way I've found around it, is to end the repeat early and let the erroneous repeat play out, or just end the repeat entirely, and use cut'n'paste instead.
    This happens to me *all the time*... anyone else seen this or have a resolution?

    Thanks for the suggestions. I can't remember deleting any tracks... however, how would i check for "hidden" tracks?
    The funny thing is i can hear the effect returns for the real instrument tracks...tracks that are heavily reverbed i can hear a faint echo of the track. and like i mentioned the drum loop and software piano still play fine.
    And, I also see monitor activity in the real instrument tracks when i play the song. Everything looks normal, but of course, the sound isn't there.
    Thanks again for your help!
    Message was edited by: Ike the Longshoreman
    P.S. I just tried Unsolo all tracks and Unmute all tracks... still the same problem.

  • Repeat loops

    Within a repeat loop, I get creation dates of sequential files. I can get the creation date of the first file but then when it repeats it wont get the creation date of the next file. When i run it again i can get the creation date of the first two, but not the third. The next time i run it i can get the creation date of the first three but not the fourth, and so on.
    Does anyone know why this is happening and what can i do to get the creation dates the first time?
    Thank you

    Hello John,
    The part where I am having a problem is here.
    I perform some script that allows me to find these files and which files i need to use and then there is this..
    count folder folderList
    set folderCount to result
    set x to 0
    repeat until x = folderCount
    set x to x + 1
    set filePath to folderList & ":" & x & ".jpg"
    get creation date of file filePath
    set creationDate to result
    get date string of creationDate
    set dateString to result
    get time string of creationDate
    set timeString to result
    theres a lot more between this and the end of the repeat.
    It won't allow me to get the creation date out of the file filePath. so there for I cannot perform the rest of this. I thought it was a problem with the computer because what I have should run. It does not run the first time, it says that the creation date is missing value in the event log. Then I run it again and it gets the first files date, but not the second. then the next time it gets the first two and not the third and so on..
    thanks for all the help,
    David

  • Repeat loops and goto's

    Can I ask two questions please,
    Q1.
    is there a way of telling a repeat loop to 'step' over
    numbers, I cannot find anything in the help files that mention this
    at all....
    For example, repeat with i := 1 to 200 'step 2' This would
    result in values of 1, 3, 5, 7, etc etc
    For example, repeat with i := 1 to 200 'step 3' This would
    result in values of 1, 4, 7, 10, etc etc
    Q2.
    Goto commands in a calculation icon.
    I can only find a reference that will use the
    goto(IconID@"TARGETICON") Is there anyway I can use the goto
    command inside a calculation. I need to set up a logical test,
    basically to say that if this isn't true go back to here and do it
    again(a repeat loop won't work)
    One day I think I may just get the hang of
    this.........

    I didn't examine your code closely, but for the future, if
    you need to
    randomly pull values from a list and you don't want
    duplicates...
    Copy the list to a new list, then after you pull a value from
    the list
    within the loop, immediately use DeleteAtIndex to remove that
    value from
    the temporary list. So during the next iteration of the loop,
    the
    previously pulled value is not present to be pulled again.
    Erik
    The Pc Doctor wrote:
    > Many thanks for your suggestions, I think I just got
    caught up the my knowledge
    > of VB and the for next loop, the solution was so obvious
    now you mention it.
    >
    > The second one I've also solved by way of different
    Calculation icons. Here
    > is what I was doing (Please forgive the awful code, I am
    still new at this)
    >
    > The whole point of this is to select a chosen number of
    Questions from a list
    > of a certain amount of questions - the numbers are not
    known and is subject to
    > change.
    >
    > I would seed a random numbers (between 1 and QNo) into a
    list of up to Q0
    > numbers and then use the below code to check to any
    duplicate numbers. The
    > problem I had was finding a way of if I found duplicate
    numbers replacing them
    > and testing them again, and again until no duplicates
    exist.
    >
    > I put the below in it's own calculation icon called
    'CheckIt'
    > - - - - - -
    > SortByValue(QuestionStore, TRUE)
    > again := 0
    > repeat with i := 1 to Q0 - 1
    > if QuestionStore = QuestionStore then
    > QuestionStore := Random(1,QNo,1)
    > again := 1
    > end if
    > end repeat
    > - - - - - - - -
    > I then put the following in a following calculation Icon
    > - - - - - - - -
    > -- Test to see if we have duplicate numbers, if yes then
    go back to the check
    > random numbers Icon.
    > if again = 1 then
    > GoTo(IconID@"CheckIt")
    > end if
    > - - - - - - - - - -
    >
    > Well it works
    >
    > Thanks again
    >
    > Paul
    >
    Erik Lord
    http://www.capemedia.net
    Adobe Community Expert - Authorware
    http://www.macromedia.com/support/forums/team_macromedia/
    http://www.awaretips.net -
    samples, tips, products, faqs, and links!
    *Search the A'ware newsgroup archives*
    http://groups.google.com/groups?q=macromedia.authorware

  • Repeat Loop times out and I don't want it to

    Maybe there is a better way to do this but I want an action to take place whenever the modification date of a certain file changes. This is what I use but it errors because of a timeout after about 10 mins if the mod date doesn't change. I need this to be checking all the time.
    on idle
    tell application "Finder"
    set UpdatedOLD to modification date of file aFile
    set UpdatedNEW to modification date of file aFile
    end tell
    repeat while UpdatedOLD = UpdatedNEW
    tell application "Finder"
    set UpdatedNEW to modification date of file aFile
    end tell
    end repeat
    end idle
    How can I get this to work?

    Hello
    I think you have stepped on a land mine set by OSX 10.6.
    There's a fatal bug in Apple Event Manager in 10.6 such that one event in every 65535 events will be lost and never be replied, which will result in Apple Event timeout error on sender. This bug has been reported shortly after the 10.6 release and has not yet been fixed as of 10.6.2.
    In your current script, you're continuously sending event to Finder and sooner on later send an event with the specific event id that is doomed to be lost. Judging from the time till you see the time out error, that is 10 min, you're at most sending 65535 / 600 = 109.225 events / sec to Finder. You can reduce the number of events by inserting some delay, e.g. 'delay 1' in your repeat loop but it can only defer the failure.
    cf.
    Re: Timed Out (Silence)
    http://lists.apple.com/archives/applescript-users/2009/Oct/msg00117.html
    Re: spurious timeout on nth Apple event on Snow Leopard
    http://lists.apple.com/archives/applescript-users/2009/Nov/msg00041.html
    A better way to achieve your task would be to let a launchd agent watch the file.
    A recipe is as follows.
    1) Save a compiled script in :
    ~/Library/Scripts/launchd/watchdog.1.scpt
    with contents :
    --SCRIPT
    -- Here put your script that is to be triggered when the file is modified.
    -- e.g.
    tell application "System Events"
    display dialog "The file is modified." giving up after 10
    end tell
    --END OF SCRIPT
    2) Save a UTF-8 plain text file in :
    ~/Library/LaunchAgents/watchdog.1.plist
    with contents :
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>watchdog.1</string>
    <key>Disabled</key>
    <false/>
    <key>Program</key>
    <string>/usr/bin/osascript</string>
    <key>ProgramArguments</key>
    <array>
    <string>osascript</string>
    <string>/Users/USER_NAME/Library/Scripts/launchd/watchdog.1.scpt</string>
    </array>
    <key>WatchPaths</key>
    <array>
    <string>POSIX_PATH_TO_THE_FIILE</string>
    </array>
    </dict>
    </plist>
    *Change USER_NAME to your user name and POSIX_PATH_TO_THE_FIILE to the POSIX path to the file to be watched.
    3) Issue the following command in Terminal to load the launchd agent :
    launchctl load ~/Library/LaunchAgents/watchdog.1.plist
    Or
    3a) Log-out and re-log-in to load the launchd agent.
    *The name 'watchdog.1.plist' and 'watchdog.1.scpt' and the script's location '~/Library/Scripts/launchd/' are mere examples. You may change them as you see fit.
    cf.
    http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/m an5/launchd.plist.5.html
    http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/m an1/launchctl.1.html
    Good luck,
    H
    Message was edited by: Hiroto (fixed typo)

  • Nested Repeat Loops in Applescript

    The following code has two lists: myURLs and myIMGs. I want to loop through the sites listed in myURLs, take a screenshot, then save them in my Shared folder as the file name listed in myIMGs. So, google.com's image will be saved as "google.jpg", and so forth. The list in myIMGs corresponds to the list in myURLs.
    This is what I have, but it doesn't quite work. It loads the first URL from myURLs, takes a screenshot of it, but then loops through each file name in myIMGs and saves that one screenshot with all those various file names. Then, it loads the next URL in myURLs and does the same thing. How do I set the file names in the myIMGs list to correspond to the URLs being loaded from myURLs? I'm having trouble with the nested loops.
    set myURLs to {"https://google.com", "https://wikipedia.org", "https://bing.com", "https://apple.com"}
    set myIMGs to {"google.jpg", "wikipedia.jpg", "bing.jpg", "apple.jpg"}
    -- Sets settings of Safari without interferring with user's settings.
    repeat with myURL in myURLs
              tell application "Safari"
                        set myDoc to front document
                        set windowID to id of window 1
                        do JavaScript ("window.open('" & myURL & "','_blank','titlebar=0');") in document 1
      close window id windowID
                        set the bounds of the front window to {0, 20, 915, 812}
      delay 5
              end tell
    -- Screengrab, crop and save to Shared folder
              repeat with myIMG in myIMGs
                        do shell script "screencapture -o -l$(osascript -e 'tell app \"Safari\" to id of window 1') /Users/Shared/" & myIMG
                        set this_file to "Macintosh HD:Users:Shared:" & myIMG
                        try
                                  tell application "Image Events"
      -- start the Image Events application
      launch
      -- open the image file
                                            set this_image to open this_file
      -- get dimensions of the image
                                            copy dimensions of this_image to {W, H}
      -- Crops off the Safari header
      crop this_image to dimensions {W, H - 50}
      -- save the changes
                                            save this_image with icon
      -- purge the open image data
      close this_image
                                  end tell
                        end try
              end repeat
    end repeat

    Switch to an indexed loop and you don't need the extra repeat loop; you can run the two lists in parallel. See my changes in red:
    set myURLs to {"https://google.com", "https://wikipedia.org", "https://bing.com", "https://apple.com"}
    set myIMGs to {"google.jpg", "wikipedia.jpg", "bing.jpg", "apple.jpg"}
    -- Sets settings of Safari without interferring with user's settings.
    repeat with i from 1 to (count of myURLs)
              tell application "Safari"
                        set myDoc to front document
                        set windowID to id of window 1
                        do JavaScript ("window.open('" & item i of myURLs & "','_blank','titlebar=0');") in document 1
                                  close window id windowID
                        set the bounds of the front window to {0, 20, 915, 812}
                                  delay 5
              end tell
      -- Screengrab, crop and save to Shared folder
              do shell script "screencapture -o -l$(osascript -e 'tell app \"Safari\" to id of window 1') /Users/Shared/" & (item i of myIMGs)
              set this_file to "Macintosh HD:Users:Shared:" & myIMG
              try
                        tell application "Image Events"
      -- start the Image Events application
                                  launch
      -- open the image file
                                  set this_image to open this_file
      -- get dimensions of the image
                                  copy dimensions of this_image to {W, H}
      -- Crops off the Safari header
                                  crop this_image to dimensions {W, H - 50}
      -- save the changes
                                  save this_image with icon
      -- purge the open image data
                                  close this_image
                        end tell
              end try
    end repeat

  • Repeat loop in filemaker Pro 7 database

    How can I get my script to loop through a large FM database of records and change the data in a particular field as in the script below? I cannot figure out the syntax for the repeat loop...
    with timeout of "3000" seconds
    tell application "FileMaker Pro"
    go to database "CPA FM Log Copy"
    show every record of database "CPA FM Log Copy"
    set theCount to number of record of database "CPA FM Log Copy" as integer
    repeat with i from record theCount of database "CPA FM Log Copy"
    if field "ph" of record i of database "CPA FM Log Copy" is "NG" then
    set data field "ph" of current record of database "CPA FM Log Copy" to "Nice Going"
    else if field "ph" of record i of database "CPA FM Log Copy" is "EC" then
    set data field "ph" of current record of database "CPA FM Log Copy" to "Everything Cool"
    end if
    end repeat
    end tell
    end timeout

    Depending on the number of records in the database, this isn't the most efficient way of doing this.
    You should use a 'whose' clause in your script to narrow the FileMaker results to the subset of records you want to change, then change them all at once. This is far more efficient than looping through thousands of records in AppleScript looking for the ones you want.
    This should get you on the right track:
    <pre class=command>tell application "Filemaker Pro"
    go to database "CPA FM Log Copy"
    set theResults to every record of database "CPA FM Log Copy" whose field "ph" is "NG"
    set data field "ph" of every item of theResults to "Nice Going"
    set theResults to every record of database "CPA FM Log Copy" whose field "ph" is "EC"
    set data field "ph" of every item of theResults to "Everything Cool"
    end tell</pre>
    In this way you let Filemaker do the searching (which is what it's optimized for), and your script does the least work necessary.
    BTW, just so you know why your original script fails, it's because you say:
    <pre class=command>set data field "ph" of current record of database "CPA FM Log Copy" to "Nice Going"</pre>
    Note that you're always setting the 'current record'. This means that even if there are 1000 records in the database, you only ever set the first field. If you wanted to maintain the repeat approach this would have to change to something like:
    <pre class=command>set data field "ph" of record i of database "CPA FM Log Copy" to "Nice Going"</pre>
    so now it uses the loop iterator to track which record to change. An even better model that does use a scalar index is to do something like:
    <pre class=command>repeat with curRecord in every record of database "CPA FM Log Copy"
    if field "ph" of curRecord is "NG" then
    set data field "ph" of curRecord to "Nice Going"
    end if
    end repeat</pre>
    This nice thing about this model is that it uses FileMaker's internal references for records so that you know you're changing the right thing. This can be crucial if working in a multi-user database where there might be someone else is editing the data in parallel, changing theCount.

  • Slideshow Transitions When Repeating Loop

    Hello,
    I've created a slideshow using many photos that I want to repeat/loop indefinitely. I've fixed the transition at the end so it doesn't fade to black, however, when the last slide ends, it doesn't transition to the first slide as I wanted.
    All of the transitions are dissolves except for the cut transition from the last slide to the first slide. Any ideas how on how to make every transition a dissolve....even when repeating?
    Thanks so much....

    Anyone?

  • Interrupt repeat loops with buttons

    Hi,
    How do I make buttons available to the user while I run a repeat loop?
    I'm doing a shell script in the background and I'm using a repeat loop to read out the log of the results. Meanwhile, I want to have a Cancel button available to the user.
    The button however doesn't respond while the repeat loop runs, while the rest of my UI is in fact updating (based on the incoming log). I'm even using a one second delay at the beginning of the loop.
    I'm using AppleScript Studio in Xcode/Interface Builder.
    Thanks,
    JW

    1. Create a control in the window which has some sort of boolean property (if you are using a progress bar, then you already have one, since a progress bar can be indeterminate, and you can check this).
    2. Set the handler which shows the window (or alters the window when the process begins) to set this boolean property to a particular value
    3. Have the "Cancel" button handler invert the property
    4. Have the repeat loop check the property as part of its boolean condition (as in "repeat while x is true")
    Note that if the window is going to go away anyway when the process is complete, then you can use the window's title to indicate the status: set the title to "Cancelling..." and have the repeat loop check whether the title of the window is "Cancelling...".
    You could also just create a global within the script file, and have the repeat loop check the status of the global, but that tends to lead, sooner or later, to overlapping reuse of a single global value, which is a bug.

  • I updated my iPhone 4 software now it's turninng off and off and keeps repeating . HELP!

    updated my iPhone 4 software now it's turninng off and off and keeps repeating . HELP!

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.

  • Iphone stuck in infinite loop, HELP!

    my iphone after resetting all settings through settings>general>reset, is stuck in an infinite loop.
    it turns on, shows the apple logo, then about a minute later the loading symbol appears, after 10mins it quickly flashs black and then starts the loop again, i have left it for over 12 hours, to see if it will fix itself, but it wont.
    i cant get it into dfu or recovery mode, it wont even turn off until it runs out of battery and then repeats its loop. when i charge it it just starts the loop again!
    please i really need help, if i cant resolve this problem, im not going to buy the ipad and the iphone 4g as i planned to do so.
    please could anyone help!

    If you can't get your iPhone into DFU or recovery mode, there is a major problem. You can make an appointment at an Apple store if there is one nearby.
    This is a user to user help forum only, so doubtful if any fellow users will lose any sleep over your threat not to purchase an iPad or the next generation iPhone when released if this problem cannot be resolved. If not, more than likely there is a hardware problem or failure. If a problem arises with your PC that you cannot resolve, are you not going to purchase another PC either?

  • Nested Loop Help

    Hello,
    I have generated a simple VI, to make multiplication and division operations. I have the following operation performed with the following inputs.
    A1 has a value range from 1 -10 fixed
    A2 has an input range of 1 - 5
    A3,A4 are constants.
    so Result  = (A1*A3 ) / (A4*A2)*100 ,
    I want to  plot "Result Vs. A1" with a current value of A2, increment A2 and repeat the procedure. So I generate 5 graphs and display it in only one. I need to write a nested loop to perform this operation.however I am able to do it only once.
    I am trying to use for loop structure in one another but havent gone ahead in this.Any help will be appreciable..Thanks in advance.

    altenbach wrote:
    Dravi99 wrote:
    The Problem is that I want to plot the division result vs. the # of array out elements and i am unsuccessful at it. May be i am missing on the waveform graph properties.
    You should make the current values default before saving so we have some typical data to play with.
    Currently, your code makes very little sense, because the inner loop has no purpose.
    If you plot the division result versus array index (I assume that's what you want, I don't understand what you mean by "the # of array out elements "), you only have one plot. What should be on the other plots???
    Please explain or even attach an image of the desired output. Thanks!
    Thanks Altenbach for the inputs.
    I have made the values default. Srry for the previous one.
    Now the inner loop was placed so that i can create a 2D array.
    I need to plot the division result vs. the value of the element in the arry out. i.e. currently my array out has 0.0...,0.3 I want that to be the X axis.
     The graph plotted   is for 1st value of "in", this value will change like from 4.5 to 4.7 to 4.9, not necesarily in steps.
    Thus my one graph should have multiple plots of "in" which has the above mentioned axis.
    Hope this time i was clear in my msg. I have attached the modified VI.
    Attachments:
    For_loop_prob.vi ‏17 KB

  • Apple logo loop help

    My phone is stuck on a continuos loop of the Apple logo. My Iphone 5 running on IOS 8.3 won’t respond when i try to turn the phone on. I hit the power button multiple times and try everything but it will not turn on. When i plug it into a charger though, it shows the screen as if it were dead but charging,(the empty battery but no charger cord symbol) and switches to the Apple logo screen as if it were booting up after it was dead. It repeats this forever but sometimes im able to turn it on but after awhile it shuts off at full battery and repeats the loop. I’ve tried a hard reset and plugging it in to Itunes but neither helped. Any help would be appreciated.

    Connect it to your computer, and hold both the home and power buttons. When the Apple logo screen re-appears, immediately let go of the power button but continue to hold the home button. iTunes should open and your iPhone should enter recovery mode.

  • Repeated/Looping App Download Failures in iTunes

    All:
    My iTunes store has repeatedly failed to download a new app (Monkey Island) since late last week along with an app update for Beatkmaker which occurred Sunday evening.
    Behavior is as follows:
    Purchased app through App Store
    Download begins
    Download goes through to the end
    File apparently does not verify
    Download starts again automatically
    Continue loops of above.
    Steps I've taken follow:
    (1) Attempted downloads of the App from three separate internet connections - cable via Cox Communications, mobile wireless via a Sprint wireless modem, and my ATT 3G connection. Nothing. Zip. Nada.
    (2) Deleted iTunes from my hard drive and re-installed using the latest disc image from Apple (v8.2.1) - even though this was the version I already had on my computer.
    (3) Ran Disk Utility after booting from the OS-X CD and verified/repaired all permissions as well as verifying no problems with the hard drive.
    (4) If I allow my phone to attempt this, it runs the battery rapidly down to zero and actually heats the iPhone up to a point where I have to shut it down.
    (5) I still cannot get the download "shadow" icon off my iPhone.
    (6) I attempted to download seven iPhone App updates with the following results:
    PhotoBuddy - 1.2mb - SUCCESSFUL DOWNLOAD
    Pocket God - 10.3mb - SUCCESSFUL DOWNLOAD
    Star Hogs - 40.5mb - SUCCESSFUL DOWNLOAD
    Hear Planet - 1.1mb - SUCCESSFUL DOWNLOAD
    MyWeather - 3.7mb - SUCCESSFUL DOWNLOAD
    Beatmaker - 163.8mb - FAILED TO DOWNLOAD - BEHAVIOR IDENTICAL TO MONKEY ISLAND. Provided additional error message after three download loops:
    stopped (err= -1000000)
    (7) This would appear to me to be a problem from Apple's side with large file downloads via iTunes. I don't know what the size limit of a successful download is at this point (obviously somewhere between 40.5mb and 163.8mb).
    (8) Note above that I first purchased Beatmaker sometime in 2008 and there have been multiple updates of this App since then.
    (9) I've had no problems with app downloads and phone updates until the 3.0 iPhone update AND corresponding iTunes store update happened around 6 weeks ago. I had to take my wife's phone into an Apple store for it to be restored last weekend after unsuccessfully trying to update the phone from 3 different Macs and a PC.
    (10) Test downloaded a 285mb file from a non-Apple FTP server and it came through fine.
    I look forward to any help out there.....a real puzzler....Apple has not responded to the problem via iTunes store support yet....hence my posting here.

    Same here. 1g running 3.1.3.  Can't download or stream any podcasts though iTunes.
    I share the hope that this is just temporary.  This would be worse that merely abandoning the 1G.  This would be eliminating existing functionality.

  • Music Loop Help

    Okay what I have here is a real simple and fast loading
    script to stream a .mp3 file for music throughout the entire site
    I've built. What I need to do is make this music loop (repeat
    continiously) unless Stop is pressed. The whole fla file consists
    of 1 Frame with 2 Layers.
    1) The action Scipt Below.
    2) The control buttons.
    Is there an easy addition to add to my script to allow the
    music to loop.. Music plays on load. If somone presses "Stop" it
    stops. If somone presses "Play" it will play again and loop.
    Action Script:
    var tune:Sound = new Sound();
    tune.loadSound("breathe2.mp3", true);
    tune.start();
    play_mc.onPress = function() {
    tune.stop();
    tune.start();
    stop_mc.onPress = function() {
    tune.stop();
    Thanks for any help on this.
    Cheers!
    TRI0N

    Doesn't the sound object allow you to declare the number of
    times the music playing loops?
    tune.start(secondsOffset, loops);
    Just give it a number that will likely never roll over like
    100000
    tune.start(0, 10000);
    If your site music is say one minute in length then thats
    10000 minutes of play time.

Maybe you are looking for