Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-17-2007, 02:26 PM   #1
pjfarr
New Member
 
Join Date: Mar 2007
Posts: 21
Default Jumping to frame labels

I've been searching extensively for an answer to this and I'm beginning to think it may not be possible...

Is there a way to define the arrow keys on the keyboard to jump to the previous/next frame label? Note: not the next and previous frames, but the frames with labels attached only.

I have a video playlist with several items and I'd like the user to have the option of using the keyboard arrow keys to scroll up and down the list. I know how to use the on (keyPress) and gotoAndPlay functions, but I'd like to avoid having to enter the specific frame labels.

~P.J.F.
pjfarr is offline   Reply With Quote
Old 03-17-2007, 03:12 PM   #2
rokket
stockholms finest
 
Join Date: Mar 2007
Posts: 40
Default

I dont really understand why you need to use the labels at all. Do they fill any other purpose in the application?
rokket is offline   Reply With Quote
Old 03-17-2007, 03:23 PM   #3
pjfarr
New Member
 
Join Date: Mar 2007
Posts: 21
Default

It's a video playlist and for each item listed, there's a unique graphic that accompanies it when selected. i.e. clicking item #1 on the playlist starts video #1 (via import mx.video.*) and jumps to frame label #1 (via gotoAndPlay) where there's a graphic item to display only for that particular video. And so on for the other playlist items. I'm probably taking the long way around...
pjfarr is offline   Reply With Quote
Old 03-17-2007, 04:08 PM   #4
inhan
it's all about patience
 
inhan's Avatar
 
Join Date: Jun 2005
Location: istanbul
Posts: 6,696
Default

You can construct an array having your frame labels and write a function for the arrow keys to make it gotoAndPlay(labels[i]) on release.
__________________
Ali Inhan
Turkish graphic and web designer
an Apple fan
www.aliinhan.com
inhan is offline   Reply With Quote
Old 03-17-2007, 05:44 PM   #5
pjfarr
New Member
 
Join Date: Mar 2007
Posts: 21
Default

Thanks for your input Ali - I'm not that well-versed in ActionScript yet, so I'm trying to design this thing based on what my experience currently is.

It all works the way I want, until I got the notion to add keyboard navigation for the user.

I guess my first post should've given more detail: I'm using an external .as file to create the flvplayback components on-the-fly when the user clicks the video name (which is a button, linked to the .as file). There's also a lengthy if/else script that invokes the videos to play one after another in sequence. I'm almost certain the code (Key.isDown(KeyCode)) for keyboard navigation should go somewhere in there...

~P.J.F.
pjfarr is offline   Reply With Quote
Old 08-08-2007, 04:00 PM   #6
Caryn1980
Registered User
 
Join Date: Aug 2007
Posts: 20
Default Further question...

Quote:
Originally Posted by inhan View Post
You can construct an array having your frame labels and write a function for the arrow keys to make it gotoAndPlay(labels[i]) on release.
I'm wondering if I could use this for what i'm having trouble with. I'm making a presentation in flash with the arrow keys as navigation. I have it set up by section in my .fla I have an intro in the main timeline. After that, it stops at the last frame of the intro. On that frame, I have action script to then play a movie clip of the first section when the arrow key is pressed. Here is the code I used:
this.onKeyDown = function() {
if (Key.getCode() == (Key.RIGHT)) {
gotoAndPlay("greenBox_mc");
Key.removeListener(this);
}
};
Key.addListener(this);
So each section of the presentation has it's own movie clip that is accessed with the same script. My problem now is that in one of the movie clips I want it to stop at a point and wait for the key to be pressed and then move on still within that movie clip. I tried putting the same script on the frame in the movie clip, but it didn't work.

OR... am I better off using the suggestion and creating frame labels? My boss wants to use this presentation in the future but with changing images. So I need it as simple as possible. Any help is GREATLY appreciated.
Caryn1980 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubles with frame labels CavFish ActionScript 2.0 2 07-12-2005 03:29 AM
Problem with jumping to frame in movie clip dark530 Simple Stuff (Newbies) 2 12-12-2004 06:27 AM
Frame labels? Miss Phantom Simple Stuff (Newbies) 7 09-03-2004 11:15 AM
Frame labels ixlepixle ActionScript 2.0 4 07-27-2004 06:23 AM
script stops in a frame that has no stop(); flash_rocks ActionScript 2.0 0 01-09-2004 07:46 PM


All times are GMT. The time now is 09:49 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.