Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Making a slide show with ActionScript

Guest
Jul 10, 2013 Jul 10, 2013

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?

TOPICS
ActionScript
942
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 11, 2013 Jul 11, 2013

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();

}

Translate
Community Expert ,
Jul 10, 2013 Jul 10, 2013

just use:

this.onRelease=function(){

this.nextFrame();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 10, 2013 Jul 10, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 10, 2013 Jul 10, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 10, 2013 Jul 10, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 10, 2013 Jul 10, 2013

remove all the code in your fla.

click on the first frame of your main timeline. 

in the actions panel, paste that code.

test.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 11, 2013 Jul 11, 2013

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 11, 2013 Jul 11, 2013
LATEST

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();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines