asteenberge
03-05-2007, 09:29 PM
I am having a serious issue that seems as though it should be ridiculously easy to fix, but it is giving me nothing but trouble. I have looked around allday and can't seem to find the answer. Any help you could give would be VERY appreciated.
I have created a file that loads an image from the library when the user presses a button on the main timeline. Now I would like to make this image draggable.
I have made this work very easily when the image appears automatically onLoad, but now i cannot seem to navigate to the instance of the image. Infact, when I rollover the image, I don't even get a sign that it is a btn. I know for a fact that my linkage identifier is set correctly, because I can drag the images when I have them appear on load instead of when I press the button. I have pasted my code below and would really appreciate the help!
Thanks a lot!!!
// ---------- btns ---------- //
btnApple.onRelease = function() {
_root.attachMovie("linkApple", "apple", _root.getNextHighestDepth(), {_x:300, _y:130});
};
btnBag.onRelease = function() {
_root.attachMovie("linkBag", "bag", _root.getNextHighestDepth(), {_x:400, _y:230});
_root.apple._alpha="50";
};
btnCone.onRelease = function() {
_root.attachMovie("linkCone", "cone", _root.getNextHighestDepth(), {_x:200, _y:200});
};
btnPlant.onRelease = function() {
_root.attachMovie("linkPlant", "plant", _root.getNextHighestDepth(), {_x:300, _y:300});
};
// ---------- drag controls ---------- //
_root.apple.onPress =
bag.onPress =
cone.onPress =
plant.onPress = function () {
this.startDrag();
this.swapDepths (_root.getNextHighestDepth());
};
apple.onRelease =
bag.onRelease =
cone.onRelease =
plant.onRelease = function () {
stopDrag();
};
I have created a file that loads an image from the library when the user presses a button on the main timeline. Now I would like to make this image draggable.
I have made this work very easily when the image appears automatically onLoad, but now i cannot seem to navigate to the instance of the image. Infact, when I rollover the image, I don't even get a sign that it is a btn. I know for a fact that my linkage identifier is set correctly, because I can drag the images when I have them appear on load instead of when I press the button. I have pasted my code below and would really appreciate the help!
Thanks a lot!!!
// ---------- btns ---------- //
btnApple.onRelease = function() {
_root.attachMovie("linkApple", "apple", _root.getNextHighestDepth(), {_x:300, _y:130});
};
btnBag.onRelease = function() {
_root.attachMovie("linkBag", "bag", _root.getNextHighestDepth(), {_x:400, _y:230});
_root.apple._alpha="50";
};
btnCone.onRelease = function() {
_root.attachMovie("linkCone", "cone", _root.getNextHighestDepth(), {_x:200, _y:200});
};
btnPlant.onRelease = function() {
_root.attachMovie("linkPlant", "plant", _root.getNextHighestDepth(), {_x:300, _y:300});
};
// ---------- drag controls ---------- //
_root.apple.onPress =
bag.onPress =
cone.onPress =
plant.onPress = function () {
this.startDrag();
this.swapDepths (_root.getNextHighestDepth());
};
apple.onRelease =
bag.onRelease =
cone.onRelease =
plant.onRelease = function () {
stopDrag();
};