Randomly play single item from array?

Super rookie here to Flash.
Is there some basic AS3 code to have, when the swf loads, a single video play from a collection of videos in an array? And can said code also apply to sound without video?
I just found out the tutorial I was using to randomize doesn't work with audio - as it just plays everything at once - you might 'see' one video - but you hear all them.
So from what I am reading, I need to us an array (that seems simple enough), but I don't want to play all the clips - I want it to randomly select and play one. Not sure exactly how I set up the video playback area (so the video plays where I want, at the size I want).
Also, I have other pages that are just audio - does audio need some sort of player or something for this?
ty

The length part of that code is the length property, which is like any other property for any object in the sense that you use the word as shown "length" (not its value like you tried) and it will hold the value of that property.
To keep the size of your file down, do not import the files into your fla, just load the selected one from where they are dynamically when the file is running.  The video will stream from its external location and your swf file will be happier for it. To get the FLVPlayback to play the video you need to assign it to the source property. 
var my_videos:Array=new Array ("cat1.flv","cat2.flv"); // actual filenames
var randomIndex = Math.floor(Math.random()*my_videos.length);
yourFLVPlaybackName.source = my_videos[randomIndex];
You should look up the FLVPlayback component in the help documents and familiarize yourself with all of it is properties, methods, and events.  In fact, you should learn to do this for any object you want to use in your designs.  Every class of object that you will use in a design has those three elements, properties, methods, and events, that not only define the object but are also your keys to making use of them.  So anytime you wonder how an object works, the first thing you oughta do is look it up in the help documents to see what properties, methods, and events support it.  Hopefully repetition of the words properties, methods, and events in this paragraph will help drive home the point that the help documents are an excellent resource to find information you need to make things work (properties, methods, events... and sometmes CONSTANTS)

Similar Messages

  • Get random, non-repeating items from array

    Hello!
    I am making a 20-question, multiple choice quiz. Each question is randomly selected from an array, and each time the user clicks on the right answer another randomly-selected question comes up. I haven't been able to figure out how to make it so the questions already selected don't repeat. I have tried pushing the selected items into an array and then using $.grep and an if statement to check if the next randomly selected question is already in the new array or not, but I couldn't seem to get that to work.
    My code in the compositionReady panel is:
    var arr = ['Symbol_1', 'Symbol_2', 'Symbol_3', 'Symbol_4', 'Symbol_5', 'Symbol_6', 'Symbol_7', 'Symbol_8', 'Symbol_9', 'Symbol_10', 'Symbol_11', 'Symbol_12', 'Symbol_13', 'Symbol_14', 'Symbol_15', 'Symbol_16', 'Symbol_17', 'Symbol_18', 'Symbol_19', 'Symbol_20'];
    sym.setVariable("arr", arr);
    arr.sort(function() {return 0.5 - Math.random()});
    arr.length = 20;
    var ques = Math.floor(Math.random()*100)%arr.length;
    for (i=0; i<20; i++){
              sym.$(arr[i]).hide();
              sym.$(arr[ques]).show();
    and each time the correct answer is clicked I run this:
    sym.getComposition().getStage().$("try_again1").hide();
    sym.getComposition().getStage().$("correct1").show();
    sym.getComposition().getStage().getSymbol("correct1").play();
    var arr = sym.getComposition().getStage().getVariable("arr");
    var ques = Math.floor(Math.random()*100)%arr.length;
    for (i=0; i<=20; i++){
    sym.getComposition().getStage().$(arr[i]).hide();
    sym.getComposition().getStage().$(arr[ques]).show();
    Any insight into this would be much appreciated!

    Hi, bettiesac212-
    Okay, I took a look at your project (including the project files was very helpful, by the way).  So what's going on is that you included my code snippet in the midst of all of the other stuff that was going on in your file.  There are a lot of questions that I had when looking at your code, like:
    what's "e"?  Where did that come from?
    why did you do an array.sort at the beginning?
    why do you assign arr.length?  it's a property of arr already, so there's no reason to assign it
    Anyway, I cleaned up the code a little bit and put my snippet in.  I did leave some of it "as an exercise to the student," to paraphrase some of my old textbooks, but hopefully the console log will show you that usedArr is now a randomized array that you can save.  If you save a variable that has the index, (aka "which question am I on?"), then you can look up where you are right now, add one, save that variable, and look up the next item in usedArr and know that it's properly randomized.
    For those who are looking for an answer, this is the code I ended up using:
             var usedArr = new Array();
             var currentIndex = 0;
             while (currentIndex < 20) {
                var randNum = Math.floor((Math.random() * 100)) % 20;
                if (usedArr[randNum] == undefined) {
                      // we can place an object!
                      usedArr[randNum] = arr[currentIndex];
                      currentIndex++;
                // by not incrementing the currentIndex, we basically force it to draw again
             for (i = 0; i < usedArr.length; i++) {
                 console.log("usedArr index " + i + ": " + usedArr[i]);
             // you can save your new array and just iterate through it each time
             // you say "next question"
    ... which I believe is more or less what I posted in my previous answer.  Bettie, I'll send you a link to your project files via private message in a few minutes.
    Thanks,
    -Elaine

  • Deleting a single item from the trash.

    Hello
    Is there a way to delete a single item from the trash, while leaving all other items in the trash?

    I don't believe so and I'm not sure why you would want to.
    Items should not be placed in the Trash unless you intend to delete the items. The Trash is not designed for and should not be used as a temporary storage location.

  • Remove item from Array

    Hi,
    Can i remove a single item in my array or remove all elements???
    Tnx all
    Beck74

    This is a quick way to remove an element. It avoids looping which avoids an ArrayIndexOutOfBounds check with every iteration. Also, arraycopy is native which means that it is very efficient and suitable for large arrays.
    public class arraytest
        public static int[] remove(int _i, int[] _a)
         int[] b = new int[_a.length-1];
         System.arraycopy( _a, 0, b, 0, _i );
         System.arraycopy( _a, _i+1, b, _i, b.length-_i );
         return b;
        public static void main(String[] args)
         int[] a = {1, 2, 3, 4, 5};
         // remove element 3
         int[] b = remove(3, a);
         for( int i=0; i<b.length; i++ ) {
             System.out.println( b[i] );
    }

  • Cancel single item from material document

    Hi. Let's say that on material document there are:
    MATNR 1 - 5 items
    MATNR 2 - 10 items
    I need to cancel only 1 item from MATNR 1. So after that operation document should be:
    MATNR 1 - 4 items
    MATNR 2 - 10 items
    In MBST transaction there is no possibility to do such thing. You can only calncel the whole line (in that case 'MATNR 1 - 5 items').
    Is there some possibility to customize MBST to fit my requirements? Or maybe there is some other transaction which give me opportunity to cancel only 1 item? Please give me some tip. Greetings. P

    Hi Piotr,
    MBST transaction has the possibitly of selecting the individual line items. By default all the line items are selected. Please deselect all line items & then select only line item & press enter. Finally save.
    Regards
    Chetan
    PS:Reward points if this helps.

  • How to empty single items from trash

    I'm new to mac and how to do general things.  I'm having difficulty deleting individual items from my trash.  In addition, I'm having a hard time finding my trash

    Trash Bin is on your Dock (last icon on the lower-right).  You cannot delete individual files from the Trash Bin like you can on a Windows machine.  The trash is treated differently on a Mac and the idea is, you shouldn't be filing stuff in there that you don't want deleted entirely.  Start treating it like your trash bin in your house.  You don't go in there and pick and choose what needs to go out to the street and you shouldn't be doing the same with your trash on a Mac either.
    A work around for this would be to take out what you don't want deleted permanently when you empty and put it somewhere on your desktop, then empty the trash of whatever is left in it that you wanted deleted and then move the other items back to the trash, but ultimately, this is too convoluted.  Just make it a habit of treating it like I said above.

  • Removing Items From Array Collection

    Hi. I have an array collection which is made up of items
    defined in class PlayListEntry. I want to remove all the items that
    have the value of property select set to false. This is what i have
    come up with, it works fine, but only removes half the items at a
    time. I think this is because when you remove and item with
    removeitemat() it shifts the index of the items. How can i get
    around this?
    Code
    private function removeitems():void{
    for each (var ple:PlayListEntry in songCollection){
    if (ple["select"] != true){
    songCollection.removeItemAt(songCollection.getItemIndex(ple));
    }

    Here's a sample application I wrote that achieves what you're
    looking for.
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable] private var medalsAC:ArrayCollection = new
    ArrayCollection([
    {Country:"USA", Gold:35, Silver:39, Bronze:29, select:true},
    {Country:"China", Gold:32, Silver:17, Bronze:14,
    select:true},
    {Country:"Russia", Gold:27, Silver:27, Bronze:38,
    select:true},
    {Country:"USA2", Gold:35, Silver:39, Bronze:29,
    select:false},
    {Country:"China2", Gold:32, Silver:17, Bronze:14,
    select:false},
    {Country:"Russia2", Gold:27, Silver:27, Bronze:38,
    select:false},
    {Country:"USA3", Gold:35, Silver:39, Bronze:29,
    select:true},
    {Country:"China3", Gold:32, Silver:17, Bronze:14,
    select:true},
    {Country:"Russia3", Gold:27, Silver:27, Bronze:38,
    select:true}
    private function filterItems():void {
    for(var i:Number = 0; i < medalsAC.length; i++){
    if(medalsAC
    .select == false){
    // => Remove item
    medalsAC.removeItemAt(i);
    // => Refresh collection so it see's new change.
    medalsAC.refresh();
    // => Start at beginning and keep looking
    i = 0;
    ]]>
    </mx:Script>
    <mx:Button x="10" y="10" label="Remove False Items"
    click="filterItems()"/>
    <mx:DataGrid left="10" right="10" top="35" bottom="10"
    dataProvider="{medalsAC}">
    <mx:columns>
    <mx:DataGridColumn headerText="Country"
    dataField="Country"/>
    <mx:DataGridColumn headerText="Gold"
    dataField="Gold"/>
    <mx:DataGridColumn headerText="Silver"
    dataField="Silver"/>
    <mx:DataGridColumn headerText="Bronze"
    dataField="Bronze"/>
    <mx:DataGridColumn headerText="Select"
    dataField="select"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>

  • How to make a single item from a folder in the bookmarks toolbar a new tab?

    so i reorderd my bookmarks into folders and for quick access have the folders in the bookmarks toolbar. great i thought. but for any reason i can´t get a single bookmark out of such a folder to get a new tab in addition to existing tabs. command clicking the wanted bookmark always replaces the open tab.
    it seems so basic but i can´t find a way. searched the web, this forum.
    is this by chance not possible?
    thanks for any hints

    Hi clueblast!
    Yes you're right if you would command click it loads into the same tab. The way you can do it is just command T before you select your bookmark so the bookmark will open in the new tab you just created. You probably already know that but that's what I can think of...
    Reg

  • Getting a single value from an array collection

    I have an array collection that was created from an XML file
    through the HTTP Service. One of the nodes in the XML file was
    product_number and I can display all of the items in this node in a
    datagrid so I know the array has the name of the node in it.
    I would like to be able to retrieve a single item from the
    array collection (e.g. a product_number = to xxx) and assign it to
    a variable.
    I would also like to be able to assign all the items in a
    particlur column (e.g. all product_numbers) to separate variables
    at the same time.
    Any help would be greatly appreciated.

    You can apply a filterFunction.
    Or you can do it the brute force way: loop over the elements,
    and test for the value you want.
    As far as putting values into variables, I am not sure what
    you want.
    And this is not a Flex Builder question and should go in the
    General Discussion forum.
    Tracy

  • How to remove item from my array

    hi, I have one array with items. now I want to remove all items from array. How it can be possible ?

    You're welcome.
    I have noticed a few silly mestakes in my posts. You probably caught them, but just for clarity:
    1. yourArray.length without brackets ();
    2. < instead of <= in the loop conditions;
    3. when looping with pop() function, the initial length of the array has to be saved in a variable and this variable should be used in condition, because with each loop the length of array changes:
             var arrayLen:int = yourArray.length;
              for (var i:int = 0; i < arrayLen ; i++)
                   yourArray.pop();

  • MD randomly dropping partition from array

    Hello, folks! I am having some trouble with MD randomly removing a partition from one of my RAID-1 arrays. So far this has happened three times over the past couple weeks, but it only happens on boot.
    I have two 3TB WD SATA hard disks containing two RAID-1 volumes set up as follows:
    /dev/sda1 FAT32 EFI System Partition (250MiB)
    /dev/sdb1 Reserved Space (250MiB)
    /dev/sda2 Disk 0 of /dev/md0 with v0.90 metadata (250MiB)
    /dev/sdb2 Disk 1 of /dev/md0 with v0.90 metadata (250MiB)
    /dev/sda3 swap partition 0 encrypted with dm-crypt mapped to /dev/mapper/swapA (8GiB)
    /dev/sdb3 swap partition 1 encrypted with dm-crypt mapped to /dev/mapper/swapB (8GiB)
    /dev/sda4 Disk 0 of /dev/md1 with v1.2 metadata (2750GiB)
    /dev/sdb4 Disk 1 of /dev/md1 with v1.2 metadata (2750GiB)
    /dev/md1 is encrypted with LUKS and mapped to /dev/mapper/root
    /dev/mapper/root is the only volume in the LVM volume group rootvg
    the volume group rootvg currently has three logical volumes
    logical volume root is mapped to /dev/mapper/rootvg-root and is the file system root
    logical volume home is mapped to /dev/mapper/rootvg-home and is mounted /home
    logical volume var is mapped to /dev/mapper/rootvg-var and is mounted /var
    I also wrote this initcpio hook (I call it 'secdec'), with a bit of help from the Arch Wiki, which decrypts /dev/mapper/root, optionally with a openssl encrypted key file on a USB memory stick:
    run_hook ()
    local keyCopyDec keyCopyEnc keyMountPoint maxTries retryDelay \
    shutdownOnFail
    # customizable ############################################################
    keyCopyDec="/crypto_keyfile.bin" # temp storage for decrypted key data
    keyCopyEnc="/crypto_keyfile.enc" # temp storage for encrypted key data
    keyMountPoint="/ckey" # key storage device mount point
    maxTries=3 # max number of decrypt attempts
    retryDelay=2 # delay in seconds between retries
    shutdownOnFail=0 # shut down computer if decrypt fails
    #+0=yes, 1=no
    # /customizable ###########################################################
    local abortMsg passPromptKey passPromptVol passWrong secdecFormat \
    shutdownMsg
    local E_NOFILE
    local KEY NOKEY SSLKEY
    local CSQUIET OIFS
    local cryptDev cryptName keyDev keyFile keyFs keyType pass passPrompt \
    success tries
    abortMsg="Aborting..."
    passPromptKey="Key passphrase: "
    passPromptVol="LUKS passphrase: "
    passWrong="Invalid passphrase."
    secdecFormat="secdec=cryptdev:dmname:keydev:keyfs:keyfile"
    shutdownMsg="Shutting down computer. You may try again later."
    E_NOFILE=66
    KEY=1
    NOKEY=0
    SSLKEY=2
    OIFS=$IFS
    [ "$(echo "${quiet}" | awk '{print tolower($0)}')" == "y" ] && \
    CSQUIET=">/dev/null 2>&1"
    askForBooleanInput ()
    # Ask the user for boolean input.
    # $1: The question to pose.
    # $2: A string containing single characters, separated by spaces, which are
    #+keys pressed that would return boolean true (0).
    # $3: A string containing single characters, separated by spaces, which are
    #+keys pressed that would return a boolean false (1).
    # Returns 0 if the user presses a key that generates a character found in
    #+$2.
    # Returns 1 if the user presses a key that generates a character found in
    #+$3.
    # Returns 2 if an incorrect number of parameters was provided.
    local keyin
    [ ${#} -ne 3 ] && return 2
    echo -n "$1"
    while true; do
    read -sn1 keyin
    case "$keyin" in
    [$2]) echo "$keyin"; keyin=0; break;;
    [$3]) echo "$keyin"; keyin=1; break;;
    *) echo -n -e "\a";;
    esac
    done
    return $keyin
    askForPass ()
    # Ask the user to enter a pass{word|phrase}.
    # $1: The prompt to display.
    # $2: The name of the variable to assign the input pass{word|phrase} to.
    #+For example, to assign to $pass, $2 should be "pass".
    # Returns 0 on success or 1 if there is a parameter error.
    [ ${#} -ne 2 ] || [ -z "${1}" ] || [ -z "${2}" ] && return 1
    read -rsp "$1" "$2"
    echo
    isSsl ()
    # Examine a file for indications that it is SSL encrypted.
    # $1: Path to the key file to examine.
    # Returns 0 if the file appears to be SSL encrypted, 1 if the file does not
    #+appear to be SSL encrypted and $E_NOFILE if $1 is not a regular file.
    [ ! -f "${1}" ] && return $E_NOFILE
    [ "$(dd if="${1}" bs=1 count=8 2>/dev/null | \
    awk '{print tolower($0)}')" == "salted__" ]
    getKey ()
    # Attempt to find and copy a key from $keyDev to $keyCopyEnc.
    # $1: Path to the device containing the key data.
    # $2: Name of file system containing the key file.
    # $3: Path to the key file, relative to $4.
    # $4: Mount point of partition containing key file.
    # $5: Path to temporary copy of key file.
    # $6: Boolean value indicating whether to allow user the opportunity to
    #+switch key devices before attempting to find a key. This is useful if
    #+a key has already been tried and failed. The user could switch memory
    #+devices before trying again. 0=true, 1=false; default is false.
    # Returns one of $KEY, $NOKEY or $SSLKEY depending on what was found.
    local result wait
    if [ -z "${6}" ] || [ ${6} -eq 1 ]; then wait=1; else wait=0; fi
    mkdir -p "$4" >/dev/null 2>&1
    while true; do
    if [ ${wait} -eq 0 ]; then
    askForBooleanInput \
    "(S)earch for key or (R)evert to LUKS passphrase? " "s S" "r R"
    if [ ${?} -eq 0 ]; then result=$KEY; else result=$NOKEY; fi
    wait=1
    else
    result=$KEY
    fi
    if [ ${result} -eq ${KEY} ]; then
    if poll_device "${1}" ${rootdelay}; then
    mount -r -t "$2" "$1" "$4" >/dev/null 2>&1
    dd if="$4/$3" of="$5" >/dev/null 2>&1
    umount "$4" >/dev/null 2>&1
    if [ -f "${5}" ]; then
    isSsl "${5}" && result=$SSLKEY
    else
    err "Key $3 not found."
    unset result
    wait=0
    fi
    else
    err "Key device $1 not found."
    unset result
    wait=0
    fi
    fi
    [ -n "${result}" ] && break
    done
    return $result
    # If the secdec kernel parameter was not specified, inform the user, but
    #+allow init to continue in case another hook will work.
    if [ -z "${secdec}" ]; then
    echo "Missing parameter: $secdecFormat"
    return 0
    fi
    # Make sure required kernel modules are available.
    if ! /sbin/modprobe -a -q dm-crypt >/dev/null 2>&1 || \
    [ ! -e "/sys/class/misc/device-mapper" ]; then
    err "Required kernel modules not available."
    err "$abortMsg"
    exit 1
    fi
    if [ ! -e "/dev/mapper/control" ]; then
    mkdir -p "/dev/mapper" >/dev/null 2>&1
    mknod "/dev/mapper/control" c \
    $(cat /sys/class/misc/device-mapper/dev | sed 's|:| |') >/dev/null 2>&1
    fi
    # Parse the secdec kernel parameter, check it's format, make sure $cryptDev
    #+is available, and that it contains a LUKS volume.
    IFS=:
    read cryptDev cryptName keyDev keyFs keyFile <<EOF
    $secdec
    EOF
    IFS=$OIFS
    if [ $(echo "${secdec}" | awk -F: '{print NF}') -ne 5 ] || \
    [ -z "${cryptDev}" ] || [ -z "${cryptName}" ]; then
    err "Verify parameter format: $secdecFormat"
    err "$abortMsg"
    exit 1
    fi
    if ! poll_device "${cryptDev}" ${rootdelay}; then
    err "Device $cryptDev not available."
    err "$abortMsg"
    exit 1
    fi
    # Inform the user that $cryptDev doesn't contain a LUKS volume, but allow
    #+init to continue, in case another hook can handle this.
    if ! /sbin/cryptsetup isLuks "${cryptDev}" >/dev/null 2>&1; then
    echo "Device $cryptDev does not contain a LUKS volume."
    return 0
    fi
    # Attempt to open the LUKS volume.
    tries=0
    unset keyType
    while true; do
    success=1
    # Attempt to copy a decryption key.
    if [ -z ${keyType} ]; then
    getKey "$keyDev" "$keyFs" "$keyFile" "$keyMountPoint" \
    "$keyCopyEnc" 1
    keyType=$?
    elif [ ${keyType} -eq ${KEY} ]; then
    getKey "$keyDev" "$keyFs" "$keyFile" "$keyMountPoint" \
    "$keyCopyEnc" 0
    keyType=$?
    elif [ ${keyType} -eq ${SSLKEY} ]; then
    if askForBooleanInput "(U)se a different key or (T)ry again? " \
    "u U" "t T"; then
    getKey "$keyDev" "$keyFs" "$keyFile" "$keyMountPoint" \
    "$keyCopyEnc" 0
    keyType=$?
    fi
    fi
    # Open the LUKS volume.
    if [ ${keyType} -eq ${NOKEY} ]; then
    askForPass "$passPromptVol" "pass"
    /sbin/cryptsetup luksOpen "$cryptDev" "$cryptName" "$CSQUIET" <<EOF
    $pass
    EOF
    success=$?
    [ ${success} -ne 0 ] && err "$passWrong"
    else
    if [ ${keyType} -eq ${SSLKEY} ]; then
    askForPass "$passPromptKey" "pass"
    /sbin/openssl aes256 -pass pass:"$pass" -d -in "$keyCopyEnc" \
    -out "$keyCopyDec" >/dev/null 2>&1
    if [ ${?} -ne 0 ]; then
    rm -f "$keyCopyDec" >/dev/null 2>&1
    err "$passWrong"
    fi
    else
    mv "$keyCopyEnc" "$keyCopyDec" >/dev/null 2>&1
    fi
    if [ -f "${keyCopyDec}" ]; then
    /sbin/cryptsetup --key-file "$keyCopyDec" \
    luksOpen "$cryptDev" "$cryptName" "$CSQUIET"
    success=$?
    fi
    fi
    [ ${success} -ne 0 ] && err "Failed to open LUKS volume."
    tries=$(( $tries + 1 ))
    [ ${tries} -ge ${maxTries} ] || [ ${success} -eq 0 ] && break
    sleep "$retryDelay"
    done
    if [ ${success} -eq 0 ]; then
    if [ ! -e "/dev/mapper/${cryptName}" ]; then
    err "LUKS volume was opened, but failed to map to $cryptName."
    err "$abortMsg"
    exit 1
    fi
    echo "LUKS volume opened."
    else
    if [ ${shutdownOnFail} -eq 0 ]; then
    echo "shutdownMsg"
    poweroff -f
    fi
    exit 1
    fi
    The failing array is /dev/md1 and mdadm is reporting the following:
    mdadm --detail /dev/md1
    /dev/md1:
    Version : 1.2
    Creation Time : Wed May 30 18:50:05 2012
    Raid Level : raid1
    Array Size : 2921467179 (2786.13 GiB 2991.58 GB)
    Used Dev Size : 2921467179 (2786.13 GiB 2991.58 GB)
    Raid Devices : 2
    Total Devices : 1
    Persistence : Superblock is persistent
    Update Time : Wed Sep 12 03:34:52 2012
    State : clean, degraded
    Active Devices : 1
    Working Devices : 1
    Failed Devices : 0
    Spare Devices : 0
    Name : archiso:1
    UUID : 8ad37e84:f7261906:da3d317e:24080362
    Events : 44661
    Number Major Minor RaidDevice State
    0 8 4 0 active sync /dev/sda4
    1 0 0 1 removed
    mdadm --examine /dev/sda4
    /dev/sda4:
    Magic : a92b4efc
    Version : 1.2
    Feature Map : 0x0
    Array UUID : 8ad37e84:f7261906:da3d317e:24080362
    Name : archiso:1
    Creation Time : Wed May 30 18:50:05 2012
    Raid Level : raid1
    Raid Devices : 2
    Avail Dev Size : 5842934631 (2786.13 GiB 2991.58 GB)
    Array Size : 2921467179 (2786.13 GiB 2991.58 GB)
    Used Dev Size : 5842934358 (2786.13 GiB 2991.58 GB)
    Data Offset : 2048 sectors
    Super Offset : 8 sectors
    State : clean
    Device UUID : abba1dc3:3fadf7a7:be452bb5:b8bbe97b
    Update Time : Wed Sep 12 03:37:48 2012
    Checksum : aad3e44b - correct
    Events : 44729
    Device Role : Active device 0
    Array State : A. ('A' == active, '.' == missing)
    mdadm --examine /dev/sdb4/dev/sdb4:
    Magic : a92b4efc
    Version : 1.2
    Feature Map : 0x0
    Array UUID : 8ad37e84:f7261906:da3d317e:24080362
    Name : archiso:1
    Creation Time : Wed May 30 18:50:05 2012
    Raid Level : raid1
    Raid Devices : 2
    Avail Dev Size : 5842934631 (2786.13 GiB 2991.58 GB)
    Array Size : 2921467179 (2786.13 GiB 2991.58 GB)
    Used Dev Size : 5842934358 (2786.13 GiB 2991.58 GB)
    Data Offset : 2048 sectors
    Super Offset : 8 sectors
    State : clean
    Device UUID : 09a09f49:b329feaa:3341111b:47b484fe
    Update Time : Wed Sep 12 01:50:34 2012
    Checksum : 1cdc19c0 - correct
    Events : 42869
    Device Role : Active device 1
    Array State : AA ('A' == active, '.' == missing)
    cat /proc/mdstat
    Personalities : [raid1]
    md0 : active raid1 sda2[0] sdb2[1]
    204736 blocks [2/2] [UU]
    md1 : active raid1 sda4[0]
    2921467179 blocks super 1.2 [2/1] [U_]
    unused devices: <none>
    This is md log info of the first reboot after my first recovery:
    Sep 9 20:18:03 localhost kernel: [ 1.784225] md: raid1 personality registered for level 1
    Sep 9 20:18:03 localhost kernel: [ 2.552971] md: md1 stopped.
    Sep 9 20:18:03 localhost kernel: [ 2.553418] md: bind<sdb4>
    Sep 9 20:18:03 localhost kernel: [ 2.553574] md: bind<sda4>
    Sep 9 20:18:03 localhost kernel: [ 2.554080] md/raid1:md1: active with 2 out of 2 mirrors
    Sep 9 20:18:03 localhost kernel: [ 2.554093] md1: detected capacity change from 0 to 2991582391296
    Sep 9 20:18:03 localhost kernel: [ 2.566266] md1: unknown partition table
    Sep 9 20:18:03 localhost kernel: [ 2.617922] md: md0 stopped.
    Sep 9 20:18:03 localhost kernel: [ 2.618382] md: bind<sdb2>
    Sep 9 20:18:03 localhost kernel: [ 2.618525] md: bind<sda2>
    Sep 9 20:18:03 localhost kernel: [ 2.619175] md/raid1:md0: active with 2 out of 2 mirrors
    Sep 9 20:18:03 localhost kernel: [ 2.619203] md0: detected capacity change from 0 to 209649664
    Sep 9 20:18:03 localhost kernel: [ 10.933334] md0: unknown partition table
    And this is the next time I rebooted:
    Sep 10 19:59:07 localhost kernel: [ 1.780481] md: raid1 personality registered for level 1
    Sep 10 19:59:07 localhost kernel: [ 2.806037] md: md1 stopped.
    Sep 10 19:59:07 localhost kernel: [ 2.806345] md: bind<sda4>
    Sep 10 19:59:07 localhost kernel: [ 2.806888] md/raid1:md1: active with 1 out of 2 mirrors
    Sep 10 19:59:07 localhost kernel: [ 2.806898] md1: detected capacity change from 0 to 2991582391296
    Sep 10 19:59:07 localhost kernel: [ 2.820308] md1: unknown partition table
    Sep 10 19:59:07 localhost kernel: [ 2.956599] md: md0 stopped.
    Sep 10 19:59:07 localhost kernel: [ 2.957149] md: bind<sdb2>
    Sep 10 19:59:07 localhost kernel: [ 2.957269] md: bind<sda2>
    Sep 10 19:59:07 localhost kernel: [ 2.958086] md/raid1:md0: active with 2 out of 2 mirrors
    Sep 10 19:59:07 localhost kernel: [ 2.958100] md0: detected capacity change from 0 to 209649664
    Sep 10 19:59:07 localhost kernel: [ 11.742281] md0: unknown partition table
    In between these two boots there are no reports of md failures. For some reason, its just dropping the second partition.
    I just did a restoration earlier today and on the very next boot, md refuses to use /dev/sdb4. Once I booted, I checked update times (not the ones listed) and /dev/sda4 and /dev/sdb4 were about 4 minutes apart. Since it takes only about a minute for Arch to reboot, including me typing my openssl key password, Arch was running for about 3 minutes without updating. I'm assuming this is of some significance since /dev/md0 reports perfect synchronization.
    All of this has been working very well for me for about 6 months now. Both hard drives, which I bought at the same time, are about 9 months old. I checked both drives using smartctl, and both report SMART enabled and passed. SMART attribute data doesn't make a lot of sense to me and I haven't looked up the format, but the reallocation event value is the same as the day I bought the drives, so I'm kind of assuming things are ok there, or at least bad sectors aren't being created.
    I hope I've provided all required details here. Any help would be appreciated.
    Last edited by cng1024 (2012-09-13 00:02:43)

    It would seem that nobody has any ideas about why this may be happening. I've done a complete diagnostic of both hard disks and both passed. I then downloaded the latest iso, formatted and reinstalled, but that failed after one reboot.
    I have a theory as to why it may be happening, but I haven't tested it yet. Perhaps someone can tell me if I may be on the right track here. I got to wondering what happens during shutdown. The root fs remounts ro during shutdown, but it does remain mounted which means everything under that, my logical volumes, LUKS and RAID are all still open when the system halts. I saved my original configs before I reformatted and it turns out I forgot to add the shutdown hook to the initcpio image which means my RAID wasn't being stopped before halt.
    I'm going to try a few experiments to see if adding the shutdown hook makes a difference. Hopefully I'm right, and I'll update either way, but I'd still appreciate it if someone with a bit more experience could weigh in on this.

  • I'm getting this error message  "This computer is no longer authorized to play purchased items that are on the iPod '___'s iPod.' Would you like to authorize this computer for items purchased from the iTunes Store?" I have authorized the computer.

    I just purchased songs on itunes, I can play them on my windows 7, but when I try to sync the ipod, I get the error "This computer is no longer authorized to play purchased items on "Stephanie's ipod" Would you like to authorize this computer for purchases from the itunes store.  When I authorize it, it says it is already authorized. Then the process starts all over again. Help.

    You can't change the Apple ID that the Authorize dialog comes up with by default. It's showing you that Apple ID for a reason: it means that the items you want to play were purchased using that Apple ID and therefore you need to authorize your computer with that Apple ID. Changing the Apple ID given completely defeats the entire purpose.
    If you don't know the password to the given Apple ID, then you will no longer be able to play those items.

  • This computer is no longer authorized to play purchased items that are on the iPhone. Would you like to authorize this computer for items purchased from the iTunes Store?

    My itunes on my iMac for the passed few weeks now keeps on comming with the message "This computer is no longer authorized to play purchased items that are on the iPhone. Would you like to authorize this computer for items purchased from the iTunes Store?"
    or "This computer is no longer authorized to play purchased items that are on the iPad. Would you like to authorize this computer for items purchased from the iTunes Store?"
    This while everything was working fine.
    Please advise what I can do with this message.
    When I press autorize, it comes up with a unknow appleID. When I use apple ID's that work - it comes with the message that the computer is autorized. but then the autorization message comes back.

    You can't change the Apple ID that the Authorize dialog comes up with by default. It's showing you that Apple ID for a reason: it means that the items you want to play were purchased using that Apple ID and therefore you need to authorize your computer with that Apple ID. Changing the Apple ID given completely defeats the entire purpose.
    If you don't know the password to the given Apple ID, then you will no longer be able to play those items.

  • TS1389 This computer is no longer authorized to play purchased items that are on the iPod “Mac0217’s iPod”. Would you like to authorize this computer for items purchased from the iTunes Store?

    This computer is no longer authorized to play purchased items that are on the iPod “Mac0217’s iPod”. Would you like to authorize this computer for items purchased from the iTunes Store?
    If you do not authorize this computer, 117 songs, including “Der Kommissar”, will be removed from the iPod.
    I have authorized the computer but keeps giving me the message above.
    I recently had my mother board replaced but my hard drive was spared.  Ever since the replaced mother board I been getting this message.

    You can't change the Apple ID that the Authorize dialog comes up with by default. It's showing you that Apple ID for a reason: it means that the items you want to play were purchased using that Apple ID and therefore you need to authorize your computer with that Apple ID. Changing the Apple ID given completely defeats the entire purpose.
    If you don't know the password to the given Apple ID, then you will no longer be able to play those items.

  • How do I removing a specific item from an Array?

    Hi there.
    I am having an array of movieclips and when my circle(controlled with the keyboard) hitTests true with one of the movieclips inside that array i want to remove that movieclip from the array so when i hitTest it again it returns false (I hitTest using a "for in" with that array).
    How do i remove a specific item from within an array?
    Can someone help me? Thanks a lot.

    i haven't noticed anyone showing deference because of the points.  in fact, i've seen some people (a minority, to be sure) be just obnoxious about it.  i never encountered that before:  some people feel they have power because they can dole out points.
    but overall i agree with you:  the loss of the list of threads i am participating in, along with the most recent posters name, is a significant drawback of the new forums.  and there's nothing new in these forums that offsets that drawback.
    in addition, i think we've lost way more than 1/2 the older threads.  that's a lot of information that's no longer available.

Maybe you are looking for

  • Audition CS6 midi controllers

    I am beyond frustrated that Adobe has always dropped the ball when it comes to midi controllers. I use a very popular widely used controller; AKAI MPK. Other programs like FL studios have a generic interface for midi controllers that you can assign.

  • Two public classes in one source file

    Can anyone please explain what is the exact reason why the java source file name should be same as the only allowed public class name in the source file. Answer only if you know the correct answer. No gusses please. I read the other postings on this

  • Jsf install error

    I am trying to use jsf with JBOSS, i copied all my jar files, and reference in my web.xml ect. but when i try to start my server, it says javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception      org.jboss.web.tomc

  • Is anyone else having a problem when sending the first email of the day from iCloud?

    For the past week I startup my iMac and send an email via my iCloud account. I finish typing it out, it says the whole time that it is saving the message. I hit send, the task bar comes up and shows that the meessage has been sent. I look in the 'sen

  • UI Mass Command opening new window

    Hi all, I need your help. I would like to create new UI Mass Command which will open new IE window. For better understanding of my problem: I've created UI Mass Command which take selected resources and add them to ZIP archive. The final ZIP stream I