Menu button problem!

Hey

It is simple one but i cant figure it out how to do it.

I am doing flash and i have 5 buttons(home,photo,description,service and contact).

Let say my “Home” total timeline is 1-150. In the Home.swf, it run from Frame1 to 100 and then repeat to the beginning. When i click button photo, i need it to start from Frame 101-150 before it go to photo.swf. After reaching Frame 150, it go to photo.swf

Can you do that?? How to do it? Can you reply this and write action script. Is it action script write in the button’s action or somewhere?

on Frame 100 add this…

gotoAndPlay(1);

On your button add

on (release) {
gotoAndPlay(101);
}

(depending on what you want it to do you can use gotoAndStop(101) )

As for frame 50… I am assuming you are using loadMovie()

_root.container.loadMovie("photo.swf");

If the clip you are loading your movie into has the instance name “container” (no quotes)

Yes, it is what i thought…but it does not work? it does not go to frame 101 when i click the button…it straight go to photo.swf

you can use gotoAndStop(101) to make it stop at 101

or you can add a stop() action to the frame to make it stop on that frame (I still recommend using gotoAndStop even if you do put a stop() action on each frame).

gotoAndStop 101???

i do try it but it does not work still.

i think you are lost.

I repeat my question again "when i click a button, it go to Frame 101 and play till to the end of the Frame 150. And then it go to photo.swf. "

I dont want it stop at Frame 101.:-\

i can email you my file if you like to have a look and edit for me. give me your email address if you want.

Ok… so you don’t want it to stop at 101, but you don’t want it to play 150 yet.

Then just add a stop() at frame 149 and use gotoAndPlay(101) then.

you go wrong again, buddy…

My total Frames are 150!

Remember it play From Frame 1 to 100. When it reach to Frame 100, it go to Frame 1 again. So it is repeating.

When i click a button, it go Frame 101 and play until the end of the frame ( Frame 150 ).
no repeating OR going back to Frame 1 or 101.*

After reaching to Frame 150, it go to next external swf (photo) if i click photo button.

Do you get my question now?

Ok…

Repeat from frame 100 back to 1

On frame 100 add a gotoAndPlay(1)

On button to play frame 101

on (release) {
gotoAndPlay(101);
}

This will play 101 and keep playing until 150.

Ok so I have been wrong, the basic idea is still there, and it is even simpler than what I was saying.

You can send me your .fla if you would like my e-mail is lost at lostinbeta dot com (spam reasons on why I won’t put it, spiders search the board and spam your e-mail… it is a pain)

Yes buddy… now you do understand my question =)

But you forget the button.

code:

on (release) {
gotoAndPlay(101);
_root.container.loadmovie (“photo.swf”);
}

I used that code at above. It wont work go to Frame 101 and play. ok, i will email you. If you need other files, let me know.

Anyways, i sent the files, it is not actual what i want. It is just a case.

The orginal one is gotoAndPlay (299).
I hope you make sense.

Ok, I see your buttons are in an index.fla file

and your animation is in homepage.swf.

and your photo is of course photo.swf.

Now on your button directly, you have the load movie command.

Since you attach it to the same clip the photo.swf replaces the homepage.swf.

What I am wondering is… what exactly did you want your button to do? Did you want your button to play the photo fade animation of homepage.swf and then load photo.swf?

YESSSS, buddy…

When i click photo button, i want my homepage’s animation to play at Frame 299 till the end and then load photo.swf

Sorry I am not too good to explain.

I am not good at explanations either.

I will see what I can do, but as for now I have to go. I will work on this later though :slight_smile:

Check your e-mail…

Problem solved :slight_smile:

GLAD… thx buddy :beam: I owe you a beer :stuck_out_tongue:

I have visited your website. It is great site, and it seem like you work in flash but it is html. Am i right? when i click experiment button, it rolling to the right and then click home, rolling to the left.

Once again, thx buddy

Yeah, my site uses a lot of Javascript and some DHTML :slight_smile:

I learned those before I started AS (well I learned very little DHTML, but I am thinking about taking it up again).

No Problem…

what is the difference between dhtml and html?
"d" stand for database?**

you should start learn XML and i think it is hard to use.:rambo:

*Originally posted by so9 *
what is the difference between dhtml and html?
“d” stand for database?

you should start learn XML and i think it is hard to use.:rambo: **

d stands for dynamic

h88

Yep…

Dynamic Hypertext Markup Language.

It is like Actionscript for HTML (it is harder to utilize, but now that I know a bit of AS, I might get back into it).

hey lostinbeta

Remembered, i click photo button, my animation of homepage fade out and load photo.swf.

Now, the problem is that when i am at photo page, and i click home button, my animation of photo won’t fade out. It staight away go to homepage.swf, how do i fix it?

Hrmm, I didn’t know there was a fade out animation for photo.swf.

You never sent me the .fla.

Have your home button do the same thing as you about button.

Have it gotoandplay the fade out animation (by targeting _root.container)… then do the variable thing I did with the photo.swf (the action for actually changing that is on the last frame of homepage.swf)