What is wrong with this button code? (short)

I’ve got a series of buttons that i’ve attached movies of moving words for the the rollover and rollout, and they work fine, but if i add any more ‘on’ handlers it just ignores it. Here’s the code:

[AS] on (rollOver) {
_root.empty_main_button.attachMovie(“resume_button_rollover”, “resume_main_over”, 0);
}
on (rollOut) {
_root.empty_main_button.attachMovie(“resume_button_rollout”, “resume_main_out”, 0);
}
on (release) {
gotoAndPlay(“resume”, 1);
}
[/AS]

like i said, the rollover and outs work great, but the button doesn’t goto and play where i want it to, it just restarts the main movie.

Using scenes huh?

not many of us do anymore. It seems like Flash really doesn’t like going to scenes… but it might just be a slight error. I assume that “resume” is a scene in the main timeline. As such I would suggest first, changing the script on the release to

_root.gotoAndPlay(“resume”);

if that doesn’t work… try setting a frame label to “resume” at the point where you want it to go.

Frame labels work much better than scene labels.

david,

thanks for the response. I am using scenes, this is just a simple little flash presentation i’m putting on cd showcasing my architecture studio projects. I wanted the projector to be one file so it is as idiot proof as possible, so the old architects i’m handing the cd out to wouldn’t have a problem. Is there a way to reference in all the different .swf’s, but then make the projector one file with them all embedded?

also, i tried the _root.gotoandplay(“resume”); and it didn’t work

but of course it works excellent if i make that scene resume.swf and _root.loadmovie, but now i’ve got multiple files… it’s still doable that way, but if i could have used the scenes, it would have been convenient.

The fla would be helpfull

eh…
I’m an architect by trade, and have only had access to flash for like a month, so i hate posting this hackjob to some pros… haha, but anyways. I’ve made changes to it, and don’t want to hack it down to get it small enough to attach, so here it is on some webspace:

kevp’s example for kirupa

originally i had scene ‘main’ and others (‘resume’ ‘works’ etc). And when i attached the rollover and rollout movies to a button, the link to move to the next scene wouldn’t work anylonger. So as a temporary answer, I’ve redid it so that there are little clips in my library and I attachMovie to empty clips existing in ‘main’… It still allows me to keep it to one file for ease of making a projector, but am i limiting myself by doing it this way?

while we’re at it, i’ve made it so that when a user clicks on a button, this orange panel drops down. How do i make it so that when the user clicks on another button the existing panel retracks away, and then the new panel drops down? it would really add to the seamlessness of the presentation…

[edit] btw, the file is 340k so sorry for the modem users [/edit]

Flash likes going to scenes, it just wont go to the scene and play it. It always stops. That can be kind of annoying.

I’ll take a look at the example when I get a chance Kepv.

Iammontoya… is that what’s wrong with the scene thing? I never really knew. I avoid multiple scenes like the pleague :stuck_out_tongue:

ya, i’ve done some basic little presentations before using all kinds of scenes and have never had a problem previously. This was all before i’d learned to attachmovie’s and using little things like rollovers and rollouts. Now i’d like to have my cake and eat it too :slight_smile: