Professional Web Applications Themes

Draging multiple instances of multiple objects - Macromedia Flash Actionscript

When I try this - dragging multiple instances of multiple objects onto a canvas area i have made the object instances dont stay around... For example, i have objects TEXTBOX, COMBOBOX and LISTBOX to be dragged out on the screen (at runtime). I first drag out TEXTBOX and place it where i want. I then proceed and drag out COMBOBOX onto the canvas along side TEXTBOX When i proceed to drag out the third item, LISTBOX, the TEXTBOX instance that i dragged out earlier has disapeared..... Why has this happened?? If i insisted and forced it, i could drag out ...

  1. #1

    Default Draging multiple instances of multiple objects

    When I try this - dragging multiple instances of multiple objects onto a canvas area i have made the object instances dont stay around...

    For example, i have objects TEXTBOX, COMBOBOX and LISTBOX to be dragged out on the screen (at runtime).
    I first drag out TEXTBOX and place it where i want.

    I then proceed and drag out COMBOBOX onto the canvas along side TEXTBOX

    When i proceed to drag out the third item, LISTBOX, the TEXTBOX instance that i dragged out earlier has disapeared.....

    Why has this happened??

    If i insisted and forced it, i could drag out onto the canvas multiples of each object , say 50 times and i will only have on the screen 38 items..... the vanishing items do not remain consistant...

    My Code is as below... Please help if you can!! I am short on Expertise....




    function dragalong() {
    this.startDrag();
    trace("Reconise " + this._name);
    loadElements(this._name);
    }



    function dropper() {
    this.stopDrag();
    delta_x = this._x - 307.8;
    delta_y = this._y - 41.6;
    txtname.text = this._name;
    txtwidth.text = this._width;
    }


    checkbox.onRollOver = function() {
    mycheckbox = attachMovie("CheckBox", "CheckBox"+o, o);
    txtname.text = mycheckbox._name;
    mycheckbox._x = this._x;
    mycheckbox._y = this._y;
    gotoAndStop(15);
    mycheckbox.onPress = dragalong;
    mycheckbox.onRelease = dropper;
    o++;
    };

    radiobutton.onRollOver = function() {
    myradiobutton = attachMovie("RadioButton", "RadioButton"+p, p);
    txtname.text = myradiobutton._name;
    myradiobutton._x = this._x;
    myradiobutton._y = this._y;
    gotoAndStop(15);
    myradiobutton.onPress = dragalong;
    myradiobutton.onRelease = dropper;
    p++;
    };

    listbox.onRollOver = function() {
    mylistbox = attachMovie("ListBox", "ListBox"+q, q);
    txtname.text = mylistbox._name;
    mylistbox._x = this._x;
    mylistbox._y = this._y;
    gotoAndStop(15);
    mylistbox.onPress = dragalong;
    mylistbox.onRelease = dropper;
    q++;




    Thanks so much in advance!!




    equinox007 webforumsuser@macromedia.com Guest

  2. #2

    Default Re: Draging multiple instances of multiple objects

    add traces to your code - trace("o - "+o); to ensure that unique depths are being set,
    if not, try presetting the increment variables o,p,q -
    Line#1 - o=1; p=1000; q=9000;


    regards
    Jack..
    Jack. webforumsuser@macromedia.com Guest

  3. #3

    Default Re: Draging multiple instances of multiple objects

    Thanks Jack,

    presetting has worked!!

    Cheers

    Chris,



    equinox007 webforumsuser@macromedia.com Guest

Similar Threads

  1. Multiple DW IDE Instances
    By kscap in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 5
    Last Post: October 26th, 01:40 PM
  2. Multiple Instances
    By hurricanefan in forum Coldfusion Server Administration
    Replies: 14
    Last Post: November 16th, 05:57 PM
  3. Paths on Multiple Instances
    By Lupus 23 in forum Coldfusion Server Administration
    Replies: 1
    Last Post: December 16th, 05:45 PM
  4. Please help: Prevent Multiple Instances
    By Jerry in forum PHP Development
    Replies: 1
    Last Post: June 7th, 08:42 AM
  5. MovieClipLoader: multiple instances
    By eussam in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 7th, 01:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139