Hi all.
I’m not new to flash I’ve used it for years but I lost intrest since I wasn’t skilled enough to keep the filesize down… Basicaly all I managed to do is create long loads and crappy designs…
Anyway I’ve since then come a long way partly due to own intrest in design etc and the fact that I now study the subject on a fairly high level.
I’ve made a site with small draggable “popup” windows (not actual windows since they are objects in flash…) and I have a issue… I can drag em off the scene outside the edge.
I’ve atempted many things… A adaptation of the collision script found through search on Kirupa… (on colision it stopped dragging) Worked nice… untill you move the mouse real fast… then it can pass right through or partly through… and the fact that it’s stopdrag… it takes effort to get it from the edge… it’s stuck basicaly… I fixed it by making the on (press) change frame in a moveclip containing the border… had a side effect though… You can now drag the window out from the scene if you repeativly drag it towards the edge…
Is there a way to limit a movieclips possible X & Y possisions? (in both + & - range to make it a 4 cornerd block)
I also want the moveclip to keep moving up/down if if hits the right/left edge if you continue dragging it up/down (same with left/right edge also)
I tried the scrip from the “dynamic mask”:
onClipEvent (enterFrame) {
getlimits = _root.normalpic.getBounds(_root);
if (_root._xmouse>=getlimits.xMin && _root._xmouse<=getlimits.xMax && _root._ymouse>=getlimits.yMin && _root._ymouse<=getlimits.yMax) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
}
I changed the size of the “normal pic” and it works lovely… but it’s on enterFrame… and I need to react on on press and on release… :\ tried to addapt it but cant figure out how… and besides the script dont alow movement along the edges (like I described above) and if you move the mouse fast enough the window stops short of the edge…
Any help in this matter would be greatly appriciated… Just post the code and a short explenation I dont need a whole .fla
Demo of the site i’m working on: www.krill3.com there you can see the issue for yourselves (about me is the only window active) yes eatch window will have tabs and the map that shows isn’t the first tab I had in mind… just a test.