Copy link to clipboard
Copied
I know, I know...why aren't I using Powerpoint to do a slide show? Because I want to incorporate more detailed animation into the presentation that I can only do in Flash. My question is simply this: How do I simply make Flash move from one image to another via clicking? The script I was trying to use involved a stop on the frame and this:
on (release) {
gotoAndPlay(2) }
...on the image, which is a button. I don't get any errors upon export, but the functions still don't work. It remains stuck at frame 1.
I don't want thumbnails or anything in this. Just to stop on frame 1, click, then go to frame 2, stop, click. You get the idea. There will also be occasional animations and sounds happening over the images, which I imagine I can just use matching scripts for.
Can anyone suggest what actions I can apply to frames and/or clips/buttons to achieve the slide show look?
create a movieclip with alpha = 0 and place that over the stage, assign it an instance name (eg, mc) and use:
mc.onRelease=function(){
mc._parent.nextFrame();
}
Copy link to clipboard
Copied
just use:
this.onRelease=function(){
this.nextFrame();
}
Copy link to clipboard
Copied
Thanks kglad, but that code didn't seem to work. I get an error message with it about a syntax error. Do I replace "this" with something? And if I include
this.onRelease=gotoAndPlay(2),
... is the nextFrame part necessary? I only know extremely basic ActionScript and I've never seen that before. Also with the code you provided, Flash does not recognize the movie clip as something to click on.
Copy link to clipboard
Copied
Also, is that ActionScript 2? I wonder if that makes any differnce. I tried looking for the functions in that code and this is what I got from the actions index:
on (release)
{gotoAndPlay
nextFrame()}
No errors, but nothing moves when I click still. It looks mostly like the code you provided.
Copy link to clipboard
Copied
Sorry for all these messages, but I can't seem to edit my previous ones. Error messages I receive using the provided new code range from "Syntax error" to "Statement must appear within on/onClipEvent handler" to something about "onRelease" not being an existing function.
Copy link to clipboard
Copied
remove all the code in your fla.
click on the first frame of your main timeline.
in the actions panel, paste that code.
test.
Copy link to clipboard
Copied
That one didn't work either. No error messages, but it also doesn't move. But I had some luck with this code:
on (release)
{
_root.gotoAndStop(2);
}
I don't know yet how to make it change scenes, but it's definitely working for the slide show effect. Thanks very much for your help, though!
Copy link to clipboard
Copied
create a movieclip with alpha = 0 and place that over the stage, assign it an instance name (eg, mc) and use:
mc.onRelease=function(){
mc._parent.nextFrame();
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now