ActionScript 3.0 :: Script Works In One Frame, But Not With Frames Before It?

Sep 8, 2011

I'm trying to test a very simple function for an e-learning module that is to train people on using 'quick keys' or key combinations on their keyboard. Basically, I want to show them a command and have them practice. In the practice, they will be asked to use a command and then have to do it on their keyboard.I used the code below successfully with one frame and a couple layers. I created a text-area ("traceArea), put it on the stage, set up the event and function... it works great! (although I'm sure the code isn't very pretty) When anything other than ctrl-p is pressed, it traces the "Try again!" message and when ctrl-p is pressed, "Great job!" pops up.

stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, detectKey);
function detectKey(event:KeyboardEvent):void

[code]....

View 4 Replies


Similar Posts:


ActionScript 2.0 :: Function Only Works On The First 30 Frames Of The Scene?

May 11, 2005

I'm making a website to the company that I work and I'm having a problem.The function only works on the first 30 frames of the scene?!?! Strange!Here goes the .fla and if you see the "years bar" doesn't move has the other elements. But if you click on the [M Button] and next on the [P button] it works.Why does not work on the other buttons.

View 3 Replies

ActionScript 1/2 :: Buttons - Take The Movie Back To The First Frame And Works On The Third Frame

Jun 21, 2009

I've got a movieclip acting as a button. Code on the button itself handles roll-over/-out states, and I define an onRelease function in the main timeline as follows:

[Code]...

This code takes the movie back to the first frame and works on the third frame. For some reason, though, the same code on the fifth frame has no effect. The button doesn't do anything. I have tried using the same button, I tried inserting a new keyframe with a new button, renaming the button, etc. and for some reason I just can't get it to work on the fifth frame. If it helps to visualize, I am essentially making a menu. The first frame contains buttons to take you to submenus, located on following slides. This button to go back to the original menu is on each frame with a submenu, but for some reason only works on one of them.

View 1 Replies

ActionScript 1/2 :: Set Frames To Play Frame 1, Frame 3, Frame 5

Mar 13, 2011

I hope I can ask this correctly. I'll paraphrase.
 
press_mc.onRelease = function(){
mover2_mc.play()};
 
This is a snippet of some code I'm working on. Currently I have a mc that you press that plays another mc. That mc that reacts has 5 frames, each frame with stop(); on each frame. I do a normal play code because it lets me play through and cycle back to frame 1 after frame 5 (so if I click the mc it eventually cycles back to the first frame and starts the process over again). If I do a nextframe it stops at frame 5, so that's why I use play.
 
press_mc click on it and it tells mover2_mc to advance a frame and recycles back to frame one to redo the process.Can I tell press_mc to play and skip a frame or to have it play a list of frames that I tell? I can't do a _currentframe +2 because it'll halt at frame 5.

View 6 Replies

ActionScript 2.0 :: CS3 Reverse Frames - Functions Works Fine In The First Part But In The End Does Not

Oct 24, 2009

I have attached a .fla file where i have some problems. The revers functions works fine in the first part but in the end i does not. What should i do?

View 1 Replies

Frame Jumping - Click On Button 1 > Plays Frames 10 - 15 > Goes To Frame 20?

Oct 11, 2010

I have 5 different buttons for the navigation on my flash website.The first page is on frame one.When you click on any of the 5 buttons I want it to play frames 10 - 15 before moving to which ever frame the button 1-5 corresponds to. So:

Click on button 1 > plays frames 10 - 15 > Goes to frame 20
Click on button 2 > plays frames 10 - 15 > Goes to frame 30
Click on button 3 > plays frames 10 - 15 > Goes to frame 40 etc

How do I make this work?

View 3 Replies

ActionScript 3.0 :: Code Works On One Frame But Not The Other?

Mar 8, 2011

I have 2 frames in my movie, 2 buttons and a video.  On the first frame there is code for button #1.  On the second frame i have code for button #2 but I'd also like to appear on the first frame. The problem is that when I put the code for the second button on the first frame, the video won't play.  so I can only have it on the second frame.  I can't figure out why the code, which works when its on frame 2, then won't work on frame 1.  When I put the code on frame 1 it breaks the functionality and the video won't play.

[Code]...

View 8 Replies

ActionScript 3.0 :: Why Tween Motions Only Works When Called In Another Frame

Oct 27, 2009

Im doing a project that works with lots of tweens im having always the same problem when i call Tweens to execute in the same frame..The Tween most of the times freez before this motion end.I fixed the tween for the background... but for that i had to put the tween in another frame and call that frame from my home Frame..Now im trying to do some Tweens with some buttons, but it most of the time freez before the motion ends.Should i forget to use Tweens in the same frames?

View 1 Replies

ActionScript 3.0 :: SlideShow Navigation Works Until You Loop Back To First Frame?

May 23, 2010

I've got an interesting issue with the actionscript in my file. I've created a slide show with 27 labeled frames - they've been labeled "frame 1", "frame 2", "frame 3", etc... My issue is the first time everything works perfectly, if you hit next or previous. It goes to the correct frame. On the last frame if you click next it should take you back to "frame 1" and basically loop through all the frames again if you keep pressing next. The problem is it goes back to frame 1, and then next doesn't work on this frame. I don't understand what's going on considering the first time around - these frames work perfectly.Here's the code on frame 1:

Actionscript Code:[code]........

View 3 Replies

ActionScript 3.0 :: SlideShow Navigation Works Until Loop Back To First Frame

May 24, 2010

I've got an interesting issue with the actionscript in my file. I've created a slide show with 27 labeled frames - they've been labeled "frame 1", "frame 2", "frame 3", etc... My issue is the first time everything works perfectly, if you hit next or previous. It goes to the correct frame. On the last frame if you click next it should take you back to "frame 1" and basically loop through all the frames again if you keep pressing next. The problem is it goes back to frame 1, and then next doesn't work on this frame. I don't understand what's going on considering the first time around - these frames work perfectly.

Here's the code on frame 1:

ActionScript Code:
stop();
/*Navigation Code */
nextbtn.addEventListener(MouseEvent.MOUSE_DOWN, buttonNextHandler);

[Code].....

View 1 Replies

Frames :: Transitions From Page To Page And From Frame To Frame All In On Site?

Jan 29, 2010

how do transitions from page to page and from frame to frame all in on site, and i'm lost in the codes  this is an exemple that i did in attachment, i want to be able to click in the different buttons bur a lot of thinks do not work. In the portfolio section i create a move clip that works well alone, bur when i integrate it with the home intro it didn't work properly.  Hope that someone will be able to help me on that one, cause i think that this will help me a lot to understnad the basic transitions with buttons (frame to frame and page to page).

Attachments:
NextFramePratice copy.fla.zip (10.1 K)

View 2 Replies

ActionScript 3.0 :: 3 Same Buttons & 3 Different Frames But Each Frame?

Aug 25, 2011

I have 3 frames and 3 buttons. Each button takes you to their respected frame. However, I noticed that I cannot have 1 key frame of actionsript read the same on those 3 frames. Why? because if I jump from frame 1 to frame 2 or 3, then I cannot jump back. Instead, each frame has to have it's own actionscript. The only thing that would change is the method name. I find it tedious. Is that how  it is? This almost felt seem like it would be less tedious but even for 3 frames, I have to change each method name as I build more frames to navigate to. Check my example below:

[Code]...

View 1 Replies

ActionScript 3.0 :: Frame Content On Other Frames?

Sep 2, 2008

I have a project where I am using frames as pages for my website. I have a frame with a movie clip that has some AS that imports some things but the problem is that when I navigate to a new page/frame part of the movie appears on top of the other frame/page's content. How do make this stop when exiting that frame?Here is the code from the movie

ActionScript Code:
// Copyright flashmo.com
// Developed by Min Thu

[code]......

View 5 Replies

CS3 :: Go Back A Few Frames And Play A MC At A Specific Frame When Hit?

Jul 1, 2009

I'm using Flash CS3 and AC2... I have a button on my main TL and I want to go back a few frames and play a MC at a specific frame when hit.

View 3 Replies

AS3 :: Code In A Single Frame Or In Multiple Frames

Jul 25, 2011

I have a button that I want to work on multiple frames. Currently, I have a scene that automatically starts to play when the playhead enters the first frame (no stop command). I have an event listener in the first frame that listens for a click. After the click the user is supposed to go to another scene.

The problem is that the button is not working. I am assuming that the code in the first frame only applies to the first frame and I need to add additional code that applies as the playhead is playing across the multiple frames.

[Code]....

View 2 Replies

ActionScript 1/2 :: Frames Long With A Different Image On Each Frame?

Oct 24, 2009

I have a bit of an odd problem with attachMovie. In my library I have several movies all build up in pretty much the same way.They are a couple of frames long with a different image on each frame.They have a color layer at 70% as sort of an overlay. And on top of that a layer with a movieclip to serve as a mask for the overlay. On the stage I have a movieclip named holder to attach them to and a couple of buttons to do that.The buttons execute the following function:

[Code]...

The thing that happens now is that the gotoAndStop part works fine and the clip goes nicely through the frames but the animation of the mask doesn't work at all. I've checked the naming several times and when I place the clip directly on the stage the mask animation works fine. So somehow when I use the attachMovie command the link to the navmask instance gets either lost or it's not possible to animate it at all in an attached movieclip.

View 1 Replies

Professional :: Take Multiple Frames And Make It Into 1 Frame?

Dec 8, 2011

I created an animation in Flash that is 14 frames, I need it to be 1 frame long, but still have to have the animation. Is there any way to make it 1 frame and keep the animation?

View 2 Replies

ActionScript 3.0 :: Go To Random Frame (from A Selection Of Frames)

Nov 6, 2009

I need to tell a button to go to a random frame of 6 frames. Lets say these frames are 20 to 25.

Now I think I understand most of this except one thing. How do I change this script to pick a number from 20 to 25, rather than 1 to 10?

Here's my starting point:

ActionScript Code:
generateNew = function () {
n = Math.round(Math.random()*10);
};

[Code]....

View 2 Replies

ActionScript 3.0 :: Putting Actions On Frames Outside Of The First Frame?

Dec 12, 2010

I've heard a few things that people recommend not doing unless you absolutely need to. I'm new to actionscripting. I come from a PHP/Javascript background. I was wondering what kind of things are good and bad.I heard using scenes wasn't a good idea. As well I heard that putting actions on frames outside of the first frame isn't such a good idea unless you absolutely need to.I'm curious what good practice is for working with amfphp. Should I make an AMFPHP class in flash? Do I avoid putting functions into the frame actions

View 1 Replies

Professional :: Loading CSV Works On Enter Frame But On Button Click Text Disappears

Nov 17, 2010

I have a files that is loading and parsing a huge amount of data from a csv file and creating and plotting a graph using the data.  All is well if I have the file loaded on the first frame of the movie.  But if I pass in the URL by entering the file name in a text input field and clicking a button.  The X and Y axis values disappear as do intermittent notes placed above the bar graph.  I still see the x and y axis and it's hash marks and the bar graph (shapes)  but all of the text is gone.

View 3 Replies

Lock Frame Span When Editing Multiple Frames?

Aug 3, 2009

I'm referring to the span of selected frames when in "Edit Multiple Frames" mode.
(I've attached an image of the thing I'm talking about.) When I'm editing multiple frames, the multiple frame span "cursor"(?) always follows me around whenever I select a new frame on the timeline. Is there a way to lock it in place or prevent it from constantly changing whenever a new frame is selected?

View 2 Replies

ActionScript 1/2 :: GotoAndPlay Playing Two Frames When Reaching A Certain Frame?

Jan 29, 2011

Basically I have a MC called 'plane3.' Inside that MC is another MC called 'plane2.' Inside 'plane2' is an animation on frame 5.(inside the MC 'plane3' the MC 'plane2' is on a classic tween going side-to-side from frame 1 to 99, once it gets to frame 99 the code gotoAndPlay(1); makes it go on loop back to the beginning)My question is how would I go about: when you click 'plane3' it lets the tween continue playing until frame 10, then on frame 10, it gotoAndPlay (100); in the same MC and ALSO plays frame 5 from inside 'plane2'

View 5 Replies

ActionScript 3.0 :: AddFrameScript To Frames Based On Their Frame Name Instead Of A Number?

Nov 1, 2009

Can you add script to frames using addFrameScript by referencing the frame name? I'd like to know how if so

View 1 Replies

ActionScript 3.0 :: Pause First Frame For 20 Frames Before It Starts To Play

May 19, 2010

I am new to Flash and was hoping for some help with an actionscript 3 problem. I have imported an FLV onto my timeline and I wanted to pause the first frame for 20 frames before it starts to play.

View 2 Replies

ActionScript 2.0 :: NextFrame Equivalent To Move From One Frame To Two Frames On?

Aug 25, 2009

its my way of going around scripting lol. the reason i would like to know is coz the same movie clip will be used several times, but once a button inside this movie clip is clicked, i would like the playhead (on the root timeline) to move two frames forward.

Also, if im correct (if not, please tell me) nextFrame() goes to the next frame and stops? it deosn't play on? is there an equivalent that moves to the next frame and plays on?

View 2 Replies

ActionScript 2.0 :: CS3 Start Movie On Random Frame From A Selection Of Specified Frames?

Jun 3, 2010

I have a short movie which consists of 6 MCs. What I would like to be able to do is to start the movie on a random clip and then proceed as usual playing each consecutive MC. The movie then loops back round to frame 2 thus avoiding the random selector code which sits on the first frame of the movie.I have tried three different solutions of AS, two of which I got from a 2008 posting on this site from CBadger and although all versions work in Safari and v1 & 3 work in Google Chrome on the Mac. None of them work in Firefox on a Mac (the 1st version displays but doesn't randomise and v2 & v3 don't display at all) and I have not yet tested them on a PC.Here is the code that I have used for each version on the first frame in the root:

Array.prototype.shuffle = function() {
for (var ivar = this.length-1; ivar>=0; ivar--) {
var p = random(ivar+1);

[code]....

View 4 Replies

Professional :: Leaving A Frame Its Content Displays When Going To Earlier Frames?

Nov 28, 2011

Using CS 5.5, I am using a single scene with buttons that all appear on the first frame along with code snippet  AS also on the first frame that when clicked, takes the user to a different frame. Everything seems to work fine, except, after you go to frame 15 and click on one of the buttons that take you to one of the earlier frames, the text from frame 15 still displays on those earlier frames. The text on frame 15 is on a different layer and does not exist anywhere else until frame 15.

View 3 Replies

Actionscript 3 :: Flash - Access Display Object In Other Frames (aka A Frame Other Than One)

Apr 30, 2010

getChildByName('name') will work as long as that child is in the first frame.

View 3 Replies

ActionScript 3.0 :: External SWF Frame Rate Jumps And Skipped Frames

Feb 2, 2009

I seem to be having a very weird issue with AS3/Flash 9.

Let me paint the picture: we have a website that loads in 6 different icon buttons, each with their own animation for rollover/rollout. EVERY flash file and embedded timeline video for the icons is 30FPS. However, flash seems to sometimes make it's own decision on frame rate and suddenly the icons will speed up to what seems like 5x the normal frame rate (for example, running through the rollover animation in .5 seconds instead of 3 seconds.

View 0 Replies

ActionScript 2.0 :: Play Until Labelled Frame - Different Frames For Dfferent Buttons?

Jul 24, 2007

how to make a movie clip play UNTIL a certain frame depending on which button is pressed. Logically it would be called playuntilandstop();

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved