A/S Question
- Started
- Last post
- 11 Responses
- spent2000
I need to drag a MC over another and have that second MC act as a button and switch instances, as well as play a sound. I know it can't be a button cus the setdrag interferes with it.
any help is apprecieted. my brain is toast
- ozhanlion0
you are fucked man
- spent20000
link to swf:
http://www.creativandco.com/symb…
- unfittoprint0
use a hitTest to check for a colission. If so, "grab" the draggable mc, disable it [mc.enabled=false] and trigger your action/sound.
- DutchBoy0
you want to make it work when hovering the toys over it?
- ozhanlion0
my god what's goin on here
- ozhanlion0
and what unfit says
- caseyc0
You need to check the _droptarget property of the clip being dragged, if it is the scanner thingamajig than trigger it's onRollOver method. Just remember that _droptarget is a string path and you need to use eval to match it to a movieclip instance...
drag_mc.onMouseMove = function(){
var drop = eval(this._droptarget);
var drop_mc = this._parent.scanner_thingy;
if(drop == drop_mc){
drop_mc.onRollOver();
} else {
drop_mc.onRollOut();
}
}
- spent20000
posting fla in thread fro unfit/casey
- function820
i posted this a bit ago to help out on another thread...
example:
http://www.uncredited.net/nt/dro…code:
http://www.uncredited.net/nt/ASd…just need to mod it to make it do exactly what you want, ie, play sound.
- ********0
if you want to load 25 jpegs from an external folder into different frames in a swf, how do you check when they're all loaded?
- Anarchitect0
spent, u have a lot of deprecated code in your file, function's code would suit you better.
You'll just have to add gotoAndPlay() within the:
if (eval(currentClip._droptarget) == _root.targetArea)to call your scanner mc and play the sound.
Rand: the best way is to have an XML file listing all your swf's filenmae and directory paths, calling it using flash's native XML object, within the onLoad event use a for loop [i==; i 'less' this.firstChild.childNodes.lengt... createEmptyMovieClips and ill'em with the corresponding swfs using loadMovie.