ActionScript 1/2 :: Put Another Set Of Actions In Frame 2 Of The Actions Layer?

Sep 29, 2010

1. Can i put another set of actions in frame 2 of the actions layer?i tested but it doesn't seem to work..it has 836 rows of code and it's getting annoying when tryin to search for a function..
 
2. I am not that familiar with classes, i usually put all the code into movieclips or in actions layer.. i am not sure if i can call a function from a actionscript class..
 
3.I am curios if there is any way i could specify an alternative for the if statement like in this pseudocode:
 
if ( apple is not clean BUT is tasty)
{
eat(apple)
}

View 5 Replies


Similar Posts:


ActionScript 3.0 :: Timeline Actions Ovverriding Actions In New Frame?

Jun 19, 2011

I have a series of frames one the timeline. Each frame has a graphic and a mouse click leads to the next frame. Think Myst.

[Code]...

When the middle frame is returned to, clicks no longer change anything. I believe that the actions of the 'left' frame are replacing the one's in the middle frame so then it is told to gotoAndStop to itself.

I'd like to know if that is indeed what is happening and how I can make it stop.

View 1 Replies

ActionScript 2.0 :: All Actions In Same Layer On MovieClip

Dec 19, 2010

I've read that it's easier to simply put all the actions that you will be using on one layer of the whole .fla, so it will be easier to configure and change settings. Well I've been trying to do that, and I'm kinda new at it, like I can get around with putting actions on movieclips, but now since I've started doing it this way, I've had some troubles... For example

ActionScript Code:
player_mc.onLoad = function(){
playerSpeed = 5;
playerHealth = 50;
player_mc.onEnterFrame = function(){
if(Key.isDown(Key.LEFT)){
[Code] .....

That's simply a character moving script, but it doesn't seem to be working for me, and I think it's because it's on the Actions layer and not on the movieclip...

View 3 Replies

IDE :: Compiler Errors - Actions / Labels Layer

Feb 7, 2010

I'm getting a compiler error in my flash website the error said,
Location: Scene 1, Layer 'Actions/Labels', Frame 1, Line 12
Description: 1120: Access of undefined property furniture
Source: furniture.addEventListener(MouseEvent.CLICK,clickS action);
What is up with this error. My instance name matches in my code and in my actions/labels layer, anyone know what else it could be?

View 1 Replies

ActionScript 2.0 :: The DNA Effect - Create A Layer And Name It Actions?

Apr 24, 2004

Taken from http:[url].....Creating the DNA effect like in the FlashBox banner.Create an object like the one shown below.Give it an instance name of dna1.You can use any colours but the colours I used are as follows: A radial gradient set with colours from left to right:

255.255.255 at alpha 100%
255,255,200 at alpha 50%
255,255,255 at alpha 100%
243,126,12 at alpha 40%
255,255,255 at alpha 0%

Now create a layer and name it actions. In the first keyframe give action:

Code:
for (i=2; i<30; i=i+1)
{
duplicateMovieClip ("/dna1", "dna" add (i), i);

View 1 Replies

ActionScript 2.0 :: CS3 Editting Script From Movieclip To Actions Layer

Dec 7, 2009

i'm currently having a small problem with some Actionscript 2.0 in CS3.I'm following a tutorial to make a simple maze like game URL...I'm currently at step 5 where it's coding the movement and wall detection.. The problem is the tutorial wants me to apply the code directly to the maze/wall movieclip. However as this is for a college project my lecturer will not accept actionscript directly applied to buttons or movieclips.. He basically wants all the script on a seperate actionscript layer. So basically what i'm asking is how and what part of the code do i need to change so it'll still work even though it's on a different layer from the object![code]

View 6 Replies

ActionScript 2.0 :: Editting Code From Movieclip To Actions Layer

Dec 7, 2009

i'm currently having a small problem with some Actionscript 2.0 in CS3. I'm following a tutorial to make a simple maze like game Tutorial here: [URL] I'm currently at step 5 where it's coding the movement and wall detection.. The problem is the tutorial wants me to apply the code directly to the maze/wall movieclip. However as this is for a college project my lecturer will not accept actionscript directly applied to buttons or movieclips.. He basically wants all the script on a seperate actionscript layer. So basically what i'm asking is how and what part of the code do i need to change so it'll still work even though it's on a different layer!

[Code]...

View 3 Replies

ActionScript 3.0 :: Object Created In A Frame's Actions Telling Parent Frame To Delete It?

Jan 21, 2009

I've got an object (an instantiation of my own class that extends Sprite) being created in the actions for a frame, like this:

Code:
import Scripts.CFoobar;
var foobar:CFoobar = new CFoobar();

[code]........

View 2 Replies

Extended Actions Frame Too Far (F9)

May 31, 2009

Don't ask me how, but I've made my Actions Frame way too long and I can't drag it up high enough to size it correctly. Consequently, I'm not seeing the end of my code without adding a whole bunch of empty space.

View 3 Replies

ActionScript 3.0 :: Stop All Actions In Frame?

Apr 30, 2009

I have a movie clip intro in frame 1 that skips to frame 2, contained in this function:

Code:
skipIntro_MC.addEventListener(MouseEvent.CLICK, introClick);
function introClick(pEvent:MouseEvent):void{
if(skipIntro_MC.visible == true && pEvent.target == skipIntro_MC)

[Code]......

Am I right in thinking this is happening because it's still trying to execute actions that were happening in frame 1 (fading in of movie clips using transitions) when it goes to frame 2? If so, how do I stop these actions so this error doesn't occur?

View 2 Replies

ActionScript 3.0 :: First Frame Of The Button Actions?

Mar 3, 2010

This is killing me, real simple. I have an mc that has 12 buttons on 12 layersall btns have alpha tweens for 10 frames so the appear like thisbtn 1 alpha fr 1 to 10btn2 alpha fr10 to 20btn3 alpha fr20 to 30 and so on.
 
at the end of the clip there is a stop.

[Code]....

View 1 Replies

ActionScript 3.0 :: Frame Actions On A Child?

Jul 13, 2009

This is just a stripped down version of my problem that im using for troubleshooting purposes. I thought id try and make up a basic script to get the core of it working and then apply it to the file that im having this problem with later just to simplify things.So what im trying to do here is that ive got a MovieClip in my library called mc_brian that ive exported for action script with the class of Brian. The mc_brian movie clip has 2 frames, both with stop actions on them.So ive created my variable newBrian and loaded the Brian class into it, positioned it and added it to the stage via the addChild display object.Then im assigning newBrian an instance name and tracing the instance name, which of course returns "brian1":

Code:
var newBrian:Brian = new Brian();
newBrian.y = newBrian.x = 100;

[code]......

View 1 Replies

ActionScript 2.0 :: Stop Actions At Certain Frame?

Aug 13, 2009

My flash movie has the following actionscript which makes several leaves fly across the screen....I would like to be able to stop this action completely once I get to a certain frame within my movie....

ActionScript Code:
kNbrLeaves = 30;
kLeafLayer = 100;

[code].......

View 3 Replies

Actionscript 3.0 :: Add Actions To A Button Not On Frame 1?

Jan 15, 2010

I am using an external .as file for my code. How do I add actions to a button that is not on the stage but its on another frame in the movie (one that user access later). What is the best practice to add actions to items not present at the start?
Of course I could make another copy of the button on frame 1 and add it off the stage in the invisible part. This is what I was doing till now. IS there another way to do this, a more ethical way?

View 2 Replies

ActionScript 3.0 :: Can't Select Frame In Actions Panel

Oct 29, 2011

For some reason, I can't select the current Frame in my actions panel. Therefore, all actionscript ends up in Frame1.

View 4 Replies

ActionScript 3.0 :: Frame Actions Not Working On Timeline

Feb 4, 2010

For some reason, I can't get any actionscript on the timeline to work. Even something as simple as stop(); on frame 1 of the movie has no effect. I don't get compiler errors either. Now I have noticed that in Edit-Preferences-Actionscript-Actionscript 3 Settings, the Source Path, Library Path and External Library Path are all empty.

View 4 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

ActionScript 3.0 :: Stop The Actions From Being Carried Over To The New Frame?

Jun 20, 2011

I have an event listener for a mouse click in one frame, then I go to another frame.There are no action so mouse clicking should not do anything, yet for some reason clicking the mouse does the same actions that the previous frame had.How can I stop the actions from being carried over to the new frame?

old frame:

ActionScript Code:
import flash.events.*;
stage.addEventListener(MouseEvent.CLICK, lakemiddle)

[code]...

then in frame 16:

ActionScript Code:
stop();

I want mouse clicking to do nothing on frame 16.

View 3 Replies

ActionScript 3.0 :: Enter Frame Not Performing All Actions ?

Mar 26, 2012

I had a simple swf with enter frame event that would move an object. everything worked ok , then I changed the framerate from 12 to 24fps. No everything is still working ok, execpt the movement in the enterframe event seems to be working at 12fps still...

ActionScript Code:
function performonenterframe(evt:Event):void{
character.x += 5;
trace (character.x);
}

the trace now would give me 5,5,5,10,10,10,15,15,15 etc...so the event is kicking in every frame but it is moving the character every third frame only...

View 2 Replies

Actionscript 3.0 :: Execute Actions That Were Happening In Frame 1?

Apr 29, 2009

I have a movie clip in frame 1 that skips to frame 2, contained in this function:

Code: Select allskipIntro_MC.addEventListener(MouseEvent.CLICK, introClick);
function introClick(pEvent:MouseEvent):void{
if(skipIntro_MC.visible == true && pEvent.target == skipIntro_MC)
{

[Code].....

Am I right in thinking this is happening because it's still trying to execute actions that were happening in frame 1 (fading in of movie clips using transitions) when it goes to frame 2? If so, how do I stop these actions so this error doesn't occur?

View 1 Replies

ActionScript 2.0 :: Create A Movie With Different Actions In Each Frame?

Apr 14, 2009

Lets say I have 5 instances of a movie named BB1,BB2, BB3, BB4 and BB5 and I want to say move them 5 pixels to the right. Is there a way to do this in one statement and not have to post it 5 times? asically how can I shorten this to one instance to affect all of them?

on (release) {
_root.BB1._x += 5;
_root.BB2._x += 5;
_root.BB3._x += 5;
_root.BB4._x += 5;
_root.BB5._x += 5;
}

Second question is, let say I want to create a Movie with different actions in each frame. then I want to continually call that one frame action from a button release. How would I go about this?Action on frame is: _root.MM._x += 5;

Button on stage to trigger this action over and over would be?. I've tried gotoandPlay but it only works once on (release) {

View 2 Replies

ActionScript 2.0 :: Clearing Actions On A Specific Frame

Feb 28, 2011

I have this timer code on the first frame of the movie.[code]And I want it to perform this timer until I press a button on the main stage.I found some information about clearing the actions from a movie clip but I didn't see much about clearing it from a frame.

View 2 Replies

ActionScript 3.0 :: Keep All The "actions" That Picture (layer) Has?

Oct 14, 2010

I have a template with some pictures in it; now I want to replace that picture with another picture but I want to keep all the "actions" that picture (layer) has. How do I do this? I tried a lot of times with the Swap-command but could not make it work.

View 1 Replies

ActionScript 1/2 :: Multiple Button Actions Not Working In Frame

Oct 10, 2009

In the first frame of an fla I have the code below, only the functions in red works. When rolling over the second only the first function in blue works but the mouse freezes when attempting to rollout (green). But if I remove the code from the first frame and code each seperate button the functions work.

Any reason for this
stop();
btn_shopping.onRollOver = function () {
gotoAndStop(2)_root.main_mc.gotoAndStop(1065);
} btn_shopping.onRollOut = function () {
gotoAndStop(1)_root.main_mc.gotoAndPlay(162);
} btn_pen.onRollOver = function () {
gotoAndStop(3)_root.main_mc.gotoAndStop(1066);
} btn_pen.onRollOut = function (){
gotoAndStop(1)_root.main_mc.gotoAndPlay(283);}

View 2 Replies

Flash :: Add A Symbol Definition To Actions Frame In Adobe?

Aug 9, 2011

this is a super newbie question, but i can't figure it out. I have a flash project(not mine), where i can find several symbol definitions in the Actions Frame. How to add symbol definitions there? I managed to create symbols by dragging (for example) items from library on stage and then pressing F8. I can get a reference on them in the Action Layer(frame 1) under Scene1, but i would like to know how to add these under Symbol Definition(s). Sorry for the question, but i am new to Flash Professional.

View 1 Replies

ActionScript 3.0 :: Way Of Importing Class Using Actions Panel On Frame 1.

Sep 16, 2009

Is there a way of importing my class using the Actions Panel on frame 1.[code]No errors but the constructor function does not run, how do I get this working? (Everything is fine when I use the Document Class box and typ in the name of my class - but I want to do this on the first frame of the main timeline).

View 5 Replies

ActionScript 3.0 :: Actions Vales From Movieclip To Main Frame?

May 21, 2011

If I create a movieclip and inside it I write some actions, for example set values to some variables, how can I retrieve those values to my main action script frame in the stage?

View 3 Replies

ActionScript 2.0 :: Access The Text Field Via Actions Frame?

Jul 28, 2007

I have a movie clip instance on the stage called textContainer_mc.

On frame 25 in this mc I have a dynamic text field with an instance name of infoText_txt.

Im trying to access the text field via my actions frame on the root timeline like this;

HTML Code:
textContainer_mc.infoText_txt.text="welcome";

The problem is if I put the text field on frame 1 of the textContainer_mc the text field shows but if its on frame 25 it doesnt.

I need it on frame 25 because I want the text to show up after an animation has played.In other words I want the textfield to stall from showing until the animation inside textContainer_mc has finished playing which takes 25frames.

View 2 Replies

ActionScript 3.0 :: Frame Actions Not Working On Child Movieclips

Mar 13, 2009

I've found the solutions for most of my many problems with as 3 but this one is really baffling The frame actions of child-movieclips of dynamically added movieclips are not firing! If I have movieclip, say "mc", which contains a child-movieclip "submc" which has a timeline animation in it with "stop();" on the last frame and I add "mc" on the stage via addChild() the stop action inside the sub movieclip will not work.

All the frame actions inside "mc" itself work. Everything works if I drag the movieclip onto the stage manually. Right now the only way I can see to stop a movieclip on its last frame is by using the ENTER_FRAME event, but that's awfully cumbersome.

View 9 Replies

ActionScript 3.0 :: Extending MovieClip Makes Clip To Ignore Frame Actions?

Feb 14, 2012

When we want to know if a MovieClip animation has ended, we use to listen the enter frame event and check if current frame is the final one (where the movieclip frame has a stop).

But we've thought on a new idea: to extend MovieClip and override stop method. In the override we dispatch an event indicating the animation is ended. So, we hope the clip to find a stop in a frame, call the overriden method and execute both, the super.stop() and the event dispatch.

View 6 Replies







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