Skip to main content
Participant
November 27, 2017
Answered

Need help triggering next Scene using A Dragged Object

  • November 27, 2017
  • 1 reply
  • 265 views

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

    This topic has been closed for replies.
    Correct answer kglad

    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.

    1 reply

    kglad
    Community Expert
    kgladCommunity ExpertCorrect answer
    Community Expert
    November 27, 2017

    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.

    Participant
    November 28, 2017

    where would i put the location in the goto coding?

    kglad
    Community Expert
    Community Expert
    November 29, 2017

    in your stop drag listener function you would use something like:

    if(plug.hitTestObject(outlest)){

    gotoAndStop('lightson');

    }