Highlighted

Goto previous frame or next frame not working

New Here ,
Oct 08, 2012

Copy link to clipboard

Copied

I'm using flash professional to build mobile application.

I have goto and stop frames on frame 1 and they work fine.  When I go to frame next frame and try to add go to previous frame from a button it doesn't work.  I don't get errors or anything it just doesn't work.

Someone please help.

TOPICS
Development

Views

3.5K

Likes

Translate

Translate

Report

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

Goto previous frame or next frame not working

New Here ,
Oct 08, 2012

Copy link to clipboard

Copied

I'm using flash professional to build mobile application.

I have goto and stop frames on frame 1 and they work fine.  When I go to frame next frame and try to add go to previous frame from a button it doesn't work.  I don't get errors or anything it just doesn't work.

Someone please help.

TOPICS
Development

Views

3.5K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 08, 2012 0
Engaged ,
Oct 08, 2012

Copy link to clipboard

Copied

Can you post some code. Is your movie clip multiple frames? If you have gotoAndStop(2) on frame 1 then the movie clip jumps to frame 2 then when you do prevFrame from 2 it auto fires the gotoAndStop(2) function that you have on frame 1 so it looks like you are stuck on 2 when in reality it did execute the function to go to 1 but then automaticallly was advanced back to 2.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 08, 2012 0
New Here ,
Oct 08, 2012

Copy link to clipboard

Copied

yes I have multiple frames.  Frame 1 is 1-10, frame 2 is 2-10 etc.....

This could easily have 50 frames or so because the app has tons of pages.  Here is the code:

/* Stop at This Frame

The Flash timeline will stop/pause at the frame where you insert this code.

Can also be used to stop/pause the timeline of movieclips.

*/

stop();/* Click to Go to Frame and Stop

Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.

Can be used on the main timeline or on movie clip timelines.

Instructions:

1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.

*/

w1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);

function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void

{

    gotoAndStop(12);

}

/* Click to Go to Frame and Stop

Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.

Can be used on the main timeline or on movie clip timelines.

Instructions:

1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.

*/

traffic.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_2);

function fl_ClickToGoToAndStopAtFrame_2(event:MouseEvent):void

{

    gotoAndStop(92);

}

beauty.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_4);

function fl_ClickToGoToAndStopAtFrame_4(event:MouseEvent):void

{

    gotoAndStop(25);

}/* Click to Go to Frame and Stop

Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.

Can be used on the main timeline or on movie clip timelines.

Instructions:

1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.

*/

video.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);

function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void

{

    gotoAndStop(35);

}/* Click to Go to Frame and Stop

Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.

Can be used on the main timeline or on movie clip timelines.

Instructions:

1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.

*/

news.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_6);

function fl_ClickToGoToAndStopAtFrame_6(event:MouseEvent):void

{

    gotoAndStop(55);

}/* Click to Go to Frame and Stop

Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.

Can be used on the main timeline or on movie clip timelines.

Instructions:

1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.

*/

grant.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_7);

function fl_ClickToGoToAndStopAtFrame_7(event:MouseEvent):void

{

    gotoAndStop(75);

}/* Click to Go to Frame and Stop

Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.

Can be used on the main timeline or on movie clip timelines.

Instructions:

1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.

*/

p1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_8);

function fl_ClickToGoToAndStopAtFrame_8(event:MouseEvent):void

{

    gotoAndStop(85);

}/* Click to Go to Frame and Play

Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and continues playback from that frame.

Can be used on the main timeline or on movie clip timelines.

Instructions:

1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.

*/

gossip.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_11);

function fl_ClickToGoToAndStopAtFrame_11(event:MouseEvent):void

{

    gotoAndStop(11);

}

Here is the code to the next frame but it won't do anything:

bk_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToPreviousFrame);

function fl_ClickToGoToPreviousFrame(event:MouseEvent):void

{

    prevFrame();

}

Once I get out of the the first page or frame I notice when I hover over the button it notices that it's a button but it won't click to go to next or previous frame.  None of the button actions work once I get out of the first page.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 08, 2012 0
Engaged ,
Oct 08, 2012

Copy link to clipboard

Copied

Hmm, here is what might be up. On frame 1 you have your symbols on the stage and they are labeled, gossip, p1, grant... but maybe as you hop around the different frames your symbols on the stage loose their identifiers and therefore flash knows not what to assign those listeneres too. Make sure all your symbols have proper lables on all the frames. Best way to do this is to keep symbols that will be present through out the app on a separate layer and have that layer stretch beginning to end instead of having a key frame for each frame of the app. And you might also only have the actions layer on the first frame so on all other frames there is no code whatsoever and everything just comes to a hault.

Also your code is so messy, delete the code snippet instructions it will make it much easier to navigate around.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 08, 2012 0
New Here ,
Oct 09, 2012

Copy link to clipboard

Copied

I've tried that, but it still won't work.  I've even used the format from this video. http://tv.adobe.com/watch/mobile-applications-101/designing-a-mobile-app-in-flash/

Can you think of any other suggestions?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2012 0
New Here ,
Mar 30, 2020

Copy link to clipboard

Copied

your_button_name.addEventListener(MouseEvent.MOUSE_DOWN, your_handler_name);function your_handler_name(event:MouseEvent):void {

movie_clipe_name.nextFrame();

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 30, 2020 0