Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
equinox007 webforumsuser@macromedia.com #1
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
-
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... -
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... -
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... -
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... -
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 -
Jack. webforumsuser@macromedia.com #2
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
-
equinox007 webforumsuser@macromedia.com #3
Re: Draging multiple instances of multiple objects
Thanks Jack,
presetting has worked!!
Cheers
Chris,
equinox007 webforumsuser@macromedia.com Guest



Reply With Quote

