| Author |
relative path is not working properly
|
|
| mballom3 2005-05-21, 11:18 pm |
| Hi,
I tried a drap and drop code with my movie clip. Everything is okay as long as
i use absolute path to refer to it, but when i change everything to relative
path, test movie, i can't drag.
Any one has an idea what could be going on?
| |
| apodkolinska 2005-05-22, 7:21 pm |
| can you show the code?
| |
| mballom3 2005-05-22, 11:23 pm |
| Hi apo
Here is the code:
this.mymovie_mc.onPress = function() {this.startDrag();
};
this.mymovie_mc.onRelease = function() {this.stopDrag();
};
Doesnt work until i change THIS to _ROOT i.e:
_root.mymovie_mc.onPress = function() {_root.startDrag();
};
_root.mymovie_mc.onRelease = function() {_root.stopDrag()
};
Then i an drag when testing movie.
| |
| Jeckyl 2005-05-23, 7:31 am |
| your 'corrected' code will drag the whole movie .. it is unlikely that that
is what you want to do.
--
Jeckyl
| |
| mballom3 2005-05-23, 7:34 pm |
| Apo,
to your first question it was instance name indeed. For the test you suggested
here is what trace(this) returns: _level0.clip_mc.
clip_mc is the instance name of my clip.
I tried something that worked (tho i dunno why it worked lol): On the first
frame of main timeline,
clip_mc.onPress = function () { this.startDrag();
};
clip_mc.onRelease = function () { this.stopDrag();
};
Seems like i didnt need to enter complete target path like (this.clip_mc =
function) right?
Also i have another question (more theoritical): in previous tutorials i did
when starting flash they taught to insert a button into a movie clip in order
to make drag and drop items. Well here i see that we dont even need to embed a
button, whats the difference betwen both approaches?
Thanks again
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |