View Full Version : Frame Labels
K Rice
05-09-2002, 03:19 PM
I'm working w/Flash 5 in Windows.
I thought I had frame labels figured out, but I guess not.
I've made 3 different frame labels on 3 different layers, and I have 3 different buttons that go to the labels.
Right now, the 1st one works in the movie work area (with buttons enabled), but it won't work if I "Test Movie" (Ctrl-Enter). Otherwise, none of them work.
I've realized that you can set Actions in different places. Currently, I have my goto Actions set by right-clicking the button from the scene and choosing Actions from the pop-up menu. Then the code I have is:
on (release) {
gotoAndPlay ("adLayout1");
}
I've tried setting the Action with this code by going to the button editing mode (where it shows "up" "down" "over" etc.) and right-clicking there to set Actions. That didn't work either.
What am I doing wrong? heh. This seems so silly! It's gotta be something simple.
Thanks
hi
put all the labels on the same layer.
the put all the buttons on another layer.
right click on a button and bring up the actions window.
in there put
on (release){
gotoAndPlay (“framelabel”);
}
K Rice
05-10-2002, 02:28 AM
OK, that's really weird. So, all the buttons have to be on one layer, and all the frame labels have to be on another. I didn't know that.
Thanks a lot!
pinkaboo
05-10-2002, 09:27 AM
I don't think that they HAVE to be, you'll just find it easier to manage your file if you do it like that. Also, obviously, a frame can only have one label so if you put all your labels on one layer you won't be confused by having named the same frame several times or anything like that.
How are you getting on with button actions?
K
K Rice
05-12-2002, 03:26 AM
Sorry for the delayed response. I'm still confused, actually. I've got a few things going on at the same time here. I'll post here again if I figure this out, or if I can't.
I made this birthday card for a friend, and I can't seem to get the preloader to work. I've yet to make one work, actually. I have another post on this board about it. I've put a couple of frames at the first of my only scene instead of using two different scenes (someone much more experienced than me suggested I do it this way). The first one has:
ifFrameLoaded ("Scene 1", 103) {
gotoAndPlay ("Scene 1", 3);
}
in the actions on the actions layer of my scene. I put this little "loading..." message movieclip in that frame. The second keyframe has a stop() in it. I uploaded it to the Internet, but it just seems to skip it. The movie is definitely not loaded.
Thanks for asking about my progress. I visited your site. Very nice. I see your preloader works, too. hehe!
pinkaboo
05-12-2002, 09:00 AM
Hi I'm just about to toddle off out now but I'll just quickly give you a link to another thread that might help. I realise this other thread is talking about flash 6 but I think you should be able to work _frameloaded in flash 5 too. I can't remember to be honest.
If not, stick with your if Frame loaded and add an "if" "else" like in the example.
thread here (http://www.actionscripts.org/forums/showthread.php3?s=&threadid=11830)
simontheak
05-12-2002, 12:14 PM
Preloaders had me stuck for a while - seems like I was trying to do it the same way that you were ... and I've got to say that dedicating a whole scene to a preloader makes this much easier. You can do it with labels in one big scene, but it just make things clearer at the beginning to dedicate a whole scene to it.
1. Create a symbol with the text/animation that you want to appear while the page is loading (eg. Loading ...) and place an instance of it in the preloader scene.
2. Create a new layer on the main timeline and call it actions.
3. Place keyframes in the last two frames of your loading animation on the actions layer.
4. In the first of these, place the following ActionScript:
ifFrameLoaded ("sceneName",frameNumber) {
gotoAndPlay("sceneName", 1);
}
5. In the second keyframe type the following action:
gotoAndPlay(1);
And that's it. You've got two sets of actions. When Flash comes across the first one it checks to see if a certain frame in a different scene has loaded , if it has then it starts playing different scene. If it hasn't it goes on to the next frame where it's told to go back to the beginning of the preloader scene.
Anyway, hope that's some kind of help. Good luck with it. And don't forget that if you want to see it when you press CTRL + ENTER, then you'll probably have to use the Bandwidth Profiler.
K Rice
05-12-2002, 08:05 PM
My god! My preloader actually works! Thanks so much to Pinkaboo and Simon. Now I just have to get back to my original button issue to see if I can get that to work.
I'll post if I can't get it. Thanks again!:)
-Kelly
K Rice
05-12-2002, 11:13 PM
I made a smaller sample movie to try to figure out why my frame labels aren't working. I can get the last two buttons to work, but not the first one.
Hopefully, the picture will give away what I might be doing wrong.
I think I'm mostly confused about where, in the timeline, to put the button actions.
farafiro
05-13-2002, 05:26 AM
First, what is that Frame Actions that appears within the buttons layers
Ricod
05-13-2002, 08:23 AM
It's a little confusing ... U put frame actions there ? And then access those through your buttons ? If u use simple navigational actions, why don't you just put those on the buttons ? if u dunno how :
right-click the button-instance (if it's inside a mc, you'll have to edit it, to access the button instance)
select "actions"
to make sure you're on the button instance, select the "on" action in simple mode ... if its greyed out, it means you're on a mc instance, not the button.
K Rice
05-13-2002, 02:51 PM
I wish I could just post the actual movie for downloading. That would be so much easier for you guys to understand. I didn't see a way to do that.
On the btn 3 layer, I went to that first keyframe on that layer, and right-clicked my btn3 button on that layer. I went to actions for that button and put my gotoframe code for the instance(?) of that button. The button doesn't work. The second and third buttons do work, somehow. (hopefully, that answers your questions, Ricod)
If anyone wants me to email them the actual test movie, I'd love to. It's pretty small. It's tough to explain everything out. :)
pinkaboo
05-13-2002, 02:53 PM
can you not zip it up and attach it here?
K Rice
05-13-2002, 02:59 PM
Oh, hehe. Boy, do I look dumb.
pinkaboo
05-13-2002, 03:03 PM
ok, here is a VERY simple example, maybe it'll help you see how to organise your file and where to put the actions/labels?
K
edit - aha you posted your fla as I was posting this, I'll go take a look at your file for you now :)
pinkaboo
05-13-2002, 03:13 PM
nah you don't look dumb! it just takes a while to get acquainted with Flash ;)
ok. take a lookee at this, hopefully it's what you wanted, and you can play spot the difference! :)
K
K Rice
05-13-2002, 03:31 PM
Ah-ha! I get it now.
So, it's better to have the Stop's on their own actions layer, and you put the button's actions at the end of the motion tweens. Thanks so much, Pinkaboo! You're awesome! :D
Now I just have to apply this to my big movie!
-Kelly
simontheak
05-13-2002, 03:49 PM
Just downloaded your .fla - I'll have a look at it now. Am I right in thinking that you want the three buttons to go to three different pages (labels) when they're clicked?
simontheak
05-13-2002, 06:25 PM
Looks like you've had examples already, but I thought I'd post this one up anyway so you can compare it to the others and see which one you like best.
I don't know if this is what you meant - I hope it is. Basically you'd put all your actions on the timeline and none on the buttons themselves, which meant that nothing happened when you clicked on the buttons
I've redone it for you and uploaded it here so that you can see what's changed. It's clearer if you put all the actions on one layer and all the labels on the other. Infact I've kind of seperated the layers as much as I can so you can see how it's done.
The only actions you need on the time line are stop() commands at the end of each labeled section. The ActionScript on the buttons consists of
on (release) {
gotoAndPlay("labelName");
}
Let me know if this is what you meant. Hope it's some help.
K Rice
05-13-2002, 09:19 PM
Simon:
Yeah, yours is pretty much the same as Pinkaboo's, except you have the cool Alpha fade-ins. Neat! :) Thanks for posting your example! And, yes; that was what I meant. You have the right idea.
I think I have it working now. It's weird. I was using an image that I imported into Flash to use for my buttons. I think it was a .gif.
I was thinking of just starting over completely, but I ended up getting rid of the button image that I'd originally imported, and just typing in a number on each of the 3 buttons instead (numerals 1, 2 and 3 for each button). I was going to try to upload my actual movie to the forum. The movie was too big, so I was really only trying to reduce the file size.
I just happened to test my movie in Flash Player w/the number buttons before uploading it to the forum, and they work now! I thought that seemed a little strange.
Anyone have any ideas about why that button image didn't want to work, but when I take it out and type in a number, it does?
Thanks!
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.