Draging multiple instances of multiple objects

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  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. Similar Questions and Discussions

    1. Multiple DW IDE Instances
      Not sure what topic this would fall under... We use DW to edit independant HTML files. Is it possible to launch separate instances of the DW IDE...
    2. Multiple Instances
      We have several IIS websites set up on our server and we want one coldfusion instance per website. We have an internal IP address assigned to each...
    3. Multiple Instances of controls
      I am new to Flex and thought it would be VERY exciting to redesign a .NET application using Flex. My application has a form page that uses...
    4. Please help: Prevent Multiple Instances
      Hi All, How can I prevent a script from running when a previous instance of the script had already been triggered and the script is running in...
    5. Multiple browser instances
      Ian.H wrote: So you're saying that there's no way at all of determining if a session has been spawned from another session ? Cheers Mike
  3. #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

  4. #3

    Default Re: Draging multiple instances of multiple objects

    Thanks Jack,

    presetting has worked!!

    Cheers

    Chris,



    equinox007 webforumsuser@macromedia.com Guest

Posting Permissions

  • You may not post new threads
  • You may 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