actionscript 2 - Flash AS2 - Drag multiple clips simultaneously -



actionscript 2 - Flash AS2 - Drag multiple clips simultaneously -

i have 2 interface panels on flash application. 1 main interface , other configuration panel. configuration panel invisible, while visible have it's position locked main interface drag @ same time.

the 2 movieclips attached so:

var m_main:movieclip = attachmovie("mainwindow", "m_main", getnexthighestdepth()); var m_settings:movieclip = attachmovie("settingswindow", "m_settings", getnexthighestdepth());

the m_main clip draggable , calls these 2 functions when dragging starts/stops:

function startdrag() { m_main.startdrag(false, m_borders.left,m_borders.top, m_borders.right, m_borders.bottom); if (m_settings._visible) { m_isdragging = true; locatesettingswindow(); } }

and

function stopdrag() { m_main.stopdrag(); if (m_settings._visible) { m_isdragging = false; locatesettingswindow(); } }

locatesettingswindow() is:

function locatesettingswindow() { var position:point = new point(m_main._x, m_main._y); m_settings._x = position.x - (m_settings._width + 15); m_settings._y = position.y; if (m_isdragging) { _global.settimeout(this, "locatesettingswindow", 10); } }

every solution i've found involves similar this. setting isdragging value true , changing sec clips x , y first clip. problem in of examples i've found, there level of delay in moving sec clip seems lag behind , sort of float loosely around first clip.

is there way m_settings more solidly locked m_main?

flash actionscript-2

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -