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

flash actionscript : Visited button not allowing revisit to frame


queensryche_05
6/10/2005 8:01:54 PM
I have the following actionscript on a button:

on (press) {gotoAndPlay("two");
}
on (release) {
_root.button_visited_video.gotoAndPlay("visited_videoinfo");
}

Basically what happens is that the blue button whe pressed goes to frame label
"two" and then changes to grey, which is exactly as it should to give it a
'visited" state (visited_videoinfo is a movieclip). Here is a .fla I found on
the internet along with sourcefile showing how i did the visited state for the
button:

http://www.biledge.com/crossed.fla

However let's say I navigate off that page but want to go back to frame label
"two" - it won't allow me to go to that frame. I'm stuck where I am until I
click on another non-visited button.

What am I doing wrong here?

Many thanks -
queensryche_05


kglad
6/11/2005 12:51:16 AM
queensryche_05
6/12/2005 12:00:00 AM
what do you mean by "... I navigate off that page...". ie, what's a page in flash?

No, all content is contained within one .swf - one scene.
kglad
6/12/2005 12:00:00 AM
queensryche_05
6/13/2005 12:00:00 AM
I have set up what is called a flash "flipbook". A flipbook is commonly used
in ELearning courses to have self-contained content placed on a single .html
page so that you don't have to navigate away from said .html document.

Let's say this flipbook is 5 pages long (again - all one .swf and all on one
scene). I have 5 buttons strewn across the top horizontally representing each
of the 5 .swf "pages" and for the sake of argument let's say they are called:
"Page 1", "Page 2", "Page 3", "Page 4" and "Page 5" - again note that all 5
buttons connect to "pages" within the .swf - not to other .html documents.

When I click on "Page 2" (which is normally a blue button) - it turns grey (to
show a "visited" state) and connects to "Page 2". When I click on "Page 3"
button, it turns grey and I am connected to "Page 3".

Here is where the problem lies...

Now that I am on "Page 3", if I were to click on the button for "Page 2" - it
doesn't go back to Page 2 - I am still stuck on Page 3 within the flipbook. The
same scenario applies whenever I click on a button in its "visited" state - it
won't allow me to go to that particular page within the flipbook.

Hope that helps -
queensryche_05


kglad
6/13/2005 12:00:00 AM
does your problem have anything to do with the link you posted to crossed.fla?
does your problem have anything to do with the code you posted?

it really sounds like you have a fla file that someone else made and you don't
understand how they made it. is that true? if so, post a link to your problem
fla.
queensryche_05
6/13/2005 12:00:00 AM
crossed.fla was a sample tutorial I based my "visited button" on that's all. I
just wanted to show you how i created those buttons using a combination of
buttons and movieclips.

Only problem I have is why the navigation won't work on the nav buttons. This
is a flipbook.fla I made from scratch, not someone else's work. All navigation
for buttons is built using actionscript code shown in original post.

If I am able to gotoAndPlay framelabel "two", I don't understand why changing
the state of the button turns off the navigation for the button once in the
visited state.

queensryche_05




queensryche_05
6/13/2005 12:00:00 AM
Figured out the problem...

The movieclips for the "visited" state didn't have a "gotoAndPlay"
actionscript applied to them. When they were in the "visited" state, there was
nothing there telling them where to go since they were now viewing the
movieclip for the "visited button" and not the original button which had
initial actionscript telling them to go to a specific frame and Play.

Thanks for trying to help me out kglad - preciate it.

queensryche_05


kglad
6/14/2005 12:00:00 AM
AddThis Social Bookmark Button