Copy link to clipboard
Copied
i'm trying to make a plug have to be moved to a outlet in order for the lightbulbs turn on, which is the next scene. anyone know how to have the dragged object need to be placed on outlet in order to trigger next frame? also if you know how to make the cord itself move like cord? it would help thxs
making a cord move like a cord may be difficult. in addition, i don't know how to do that without using code to draw the cord.
to trigger the next scene, label that frame and use a goto in a function called when the plug is dropped in the correct (eg, use a hitTestObject) location.
Copy link to clipboard
Copied
making a cord move like a cord may be difficult. in addition, i don't know how to do that without using code to draw the cord.
to trigger the next scene, label that frame and use a goto in a function called when the plug is dropped in the correct (eg, use a hitTestObject) location.
Copy link to clipboard
Copied
where would i put the location in the goto coding?
Copy link to clipboard
Copied
in your stop drag listener function you would use something like:
if(plug.hitTestObject(outlest)){
gotoAndStop('lightson');
}
Copy link to clipboard
Copied
Thank you it works perfectly.
Copy link to clipboard
Copied
you're welcome.