Button press in child MC to go to frame in Main Timeline. How?

Posted by krust 
Button press in child MC to go to frame in Main Timeline. How?
May 07, 2010 08:06PM
Hello

I am attempting to create a button within a Movie Clip, which is contained within another Movie Clip.

I am trying to get this button to go to a specific frame in the main timeline but the FECgoToFrame option only lets me move within the MC timeline where the button is currently running.

How can I get this button to press and go to a specific frame in the main timeline?

Your help will be greatly appreciated... kinda stuck here :(



Edited 2 time(s). Last edit at 05/07/2010 08:08PM by krust.
Re: Button press in child MC to go to frame in Main Timeline. How?
May 11, 2010 08:24AM
kurst,

Simple, in flashEff panel on button tab->command tab-> add FECCallFunction.
In functionPath box write parent.parent.gotoAndStop method ( you have parent.parent.gotoAndStop because you are within 2 movie clips and timeline is two level up) then in parameter box write the frame where you want to go.
Hope this will help you.
Re: Button press in child MC to go to frame in Main Timeline. How?
May 11, 2010 08:34AM
Wow!

Nicelly done! Thanks a million for your help!
Re: Button press in child MC to go to frame in Main Timeline. How?
May 12, 2010 08:54AM
you are welcome!



Edited 1 time(s). Last edit at 05/13/2010 12:05PM by florodebat.
Re: Button press in child MC to go to frame in Main Timeline. How?
May 26, 2010 07:06PM
Hi,

For us REAL, I mean REAL Noobs to AS3 and flash, this tread almost answered my delimma, but not quite... or I'm just not using the FlashEff2 correctly (my guess)

Goals: I have 2

1. To fly in the word "Home" as a menu item and have it work as a button with rollover effect to take the visitor to the "home.php" page.

2. To fly in a "Replay" text at the end of the animation so that the animated banner/menu can be replayed.

Where am I?

I'm thinking both of these goals will be accomplished by the same method except one will use a link and one another method...but I'm a novice as AS3.

All of the flash is built using FlassEff2 (love it so far BTW) and the animation and fly in effects, timing etc...are all great. Just need to get the text buttons working now. All of the project is on frame 1 of the main timeline.

In the main time line I created a new layer and I have text that I have converted to symbol as a movie clip.

From the main time line I applied the FlashEff2 to the movie clip to get it to fly in, works okay.

Once inside the movie clip I made sure the text "Replay" was dynamic and embedded.

I dropped the FlashEff2button on top of the dynamic text.

In the flashEFF2 panel I went to the Command tab and added an FECCallFuntion
Then I put parent.gotoAndPlay in the function path box
Then I put 1 in the parameters box

When I test the flash everything appears correctly and the rollover effects work but nothing happens when I click the button...no replay.

Any assistance would be great as I'm on a hectic completion schedule for this animation.

Thanks,
Dennis P.
Re: Button press in child MC to go to frame in Main Timeline. How?
May 26, 2010 10:36PM
Update:

Okay, after reviewing much of the forums and the tutorials that came with the FlashEff I have gotten the button to work by:

1. Adding a blank frame on frame one and moving all the FlashEFF to frame two.
2. adding frames along the main timeline that are a bit longer than the total FlashEffects animations...so the button to replay now works.

NOW.. how do I get the fly in effect to work in conjunction with the button.

What I've done:

From the main time line I created the Text.
Converted it to dynamic text and embeded it.
Converted this text to symbol (movie Clip).
Set the fly in effect on the movie clip using FlashEFF (tested flash and worked okay)
Went inside the movie clip
Assured that the text was dynamic and embeded
Dropped the FlashEFF2button on top of the text.
Chose a preset and set the command > FECCallfunction to parent.gotoAndPlay
Set the Parameters to 1.
Went back to the main timeline and previewed the flash

Result: All the items appear on the stage, and some just flicker.

I do get an action script error in the output tab:

, Line1 5005: Unknown error optimizing byte code

If I go back inside the movie clip and remove the FlashEffect2button from the text the flash plays through okay. What am I overlooking here?

Thanks,
Dennis P.
Re: Button press in child MC to go to frame in Main Timeline. How?
May 31, 2010 02:10PM
user358685,

You will most probably have to place the text moviClip (which already contains the dynamic textfield with the button effect on it) together with the flasheff2 instance that is targeting it , into a new separate moviclip. Please follow the bellow topic in order to find how to fix that error.


[www.flasheff.com]

If this information does not helped you out, please open a new support ticket, attach the source files and I am sure that the technical department will provide a solution for you.

[www.jumpeyecomponents.com]
Re: Button press in child MC to go to frame in Main Timeline. How?
July 15, 2010 07:58AM
If anyone out there can offer some assistance for this, that would be great.

In my main movie, I have a movie clip located on Frame 1 with a stop action. Within that movie clip on Frame 1 is a button that appears at the end of the movie that I want to use to advance to the next movie clip - located on Frame 10 of the main movie's timeline.

For the button, I've used kneo's code from above -- parent.parent.gotoAndStop. In the Parameters, I put the number 10. However, I get this error:

ReferenceError: Error #1069: Property gotoAndStop not found on flash.display.Stage and there is no default value.
at com.jumpeye.flashEff2.command.callFunction::FECCallFunction/run()
at FlashEff2Button/pressCommandHandler()

I am not a coder, so I am totally in the dark.

Can anyone help?

Thanks.
Re: Button press in child MC to go to frame in Main Timeline. How?
July 15, 2010 01:16PM
zadon1728,

Did you try to use only one parent(parent.gotoAndStop)?
Sorry, you do not have permission to post/reply in this forum.