Groups | Blog | Home
all groups > flash actionscript > october 2005 >

flash actionscript : Newbie needs help



johnciccolini
10/16/2005 8:07:25 PM
Hi all,
I'm building a very simple slide show with Flash MX 2004. I'm trying to
duplicate the slide show with controls at http://www.marcbaptiste.com.
I have created 3 scenes. Each scene has 2 photos, each on it's own layer. I
have another layer containing forward and back buttons. I'm having trouble
getting the button actions to work. I can add the actionscript for the forward
button with no problem (on (release) {gotoAndPlay("2");) with "2" being scene
#2. I can't get the back button to work. I've tried using "prevScene" but
that doesn't work: I just get a blank screen when I hit the back button when
testing the movie. I've also tried using "on (release) {gotoAndPlay("1"), with
"1" being the first scene. I'm stumped.
Any help would be greatly appreciated.
Thanks in advance,
John
GaryCCY
10/17/2005 12:00:00 AM
Hi

Its not a solution, but a suggestion. Most Flash developer will tell you, Do not use Scenes.
BeanishD
10/17/2005 12:00:00 AM
If you take a look at the Scene panel under Windows > Design Panels > Scene,
you'll see that each scene is named automatically as you create it. To jump to
scene one from scene two, use the following script (unless you have changed the
scene names, of course.)

on(release){
gotoAndPlay("Scene 1", 1);
}

Please note: The name of the scene you want to go to must be defined first,
inside quotations. Also, the comma goes OUTSIDE of the quotation marks. The
frame number is then defined afterwards, though this is not always necessary.

I'm also sorry nobody's responded to you since February. I'll assume you've
figured it out by now, though.
BeanishD
10/17/2005 12:00:00 AM
hahaha wow February...I read "Date Joined" as "Date Posted." Oh, and that
other guy's got a point. It may be easier just to compile the content onto a
single-scene timeline, and you tell the playhead to move to different frames
and stop there. gotoAndStop(framenumber);
johnciccolini
10/17/2005 12:00:00 AM
Thanks! I was screwing up the syntax in regards to the quotation marks.
Thanks again for the help.
AddThis Social Bookmark Button