Skip to main content
Inspiring
February 24, 2011
Answered

I need to get the invisible button to go to a frame

  • February 24, 2011
  • 1 reply
  • 842 views

I am narrowing it down a little.

I have invisible buttons on a movie clip that is loading swfs onto a parent movie clip. I hope I am current in the terminology. Are a parent and root the same? Is saying root absolute and parent relative? I'm digressing.

So, this this._parent.gotoAndPlay("contact form"); is going to the keyframe named "contact form" and it will stop there. What I want to happen, is, I want the other invisible button named aboutmeMC2 to go back to the keyframe named "skip" so my contact form will no longer show up and it will load the external swf.

I hope that's clear.

Thanks

Actionscript Code:
on (release) {

    this._parent.gotoAndPlay("contact form");
    aboutmeMC2._root.gotoAndPlay("skip");

}
This topic has been closed for replies.
Correct answer Ned Murphy

Maybe you should settle in to getting away from placing code on objects and use the timeline instead.  Placing code on objects is a discouraged practice.  When you have the code in the timeline, not only is it easy to find, things are clearer as far as how to go about targeting objects.

Instead of using

on(release){  // or on(anything...)

     ...

}

give the object an instance name and use timeline code instead...

objectName.onRelease = function(){

     ...

}

1 reply

Ned Murphy
Legend
February 24, 2011

Your description is confusing, so I will just hazard a guess that what you want would be...

on (release) {
    _parent.gotoAndPlay("contact form");
    _root.aboutmeMC2gotoAndPlay("skip");
}

_root points to the main timeline of a Flash file.  _parent refers to the timeline of whatever contains the object who's _parent is being targeted

Inspiring
February 24, 2011

No that's not working. It should but it's not.

I want it to load the external swf. When I tell it to go to the "skip" label in the parent timeline, that's where this code is. So maybe it should tell it to load the external swf?

By the way, thanks for the feedback. You're the only person out of any of the forums to answer so far.

this.CreateEmptyMovieClip("blank_mc",10);

with(blank_mc){

_x = -450;

_y= -225;

0;

}

loadMovie("welcome.swf",blank_mc);

stop();

Ned Murphy
Ned MurphyCorrect answer
Legend
February 24, 2011

Maybe you should settle in to getting away from placing code on objects and use the timeline instead.  Placing code on objects is a discouraged practice.  When you have the code in the timeline, not only is it easy to find, things are clearer as far as how to go about targeting objects.

Instead of using

on(release){  // or on(anything...)

     ...

}

give the object an instance name and use timeline code instead...

objectName.onRelease = function(){

     ...

}