Flash8 :: Why Is The Movieclip(s) Carried Over To Other Frames

Jun 15, 2009

Im using this script on various movieclips in a game

Code:

onClipEvent (enterFrame) {
xplace = Math.round(_x);
if (xplace<10) {

[code]....

I use this so when characters move around movieclip it detects where it is and put the appropriate clip on top (so a character can move infront and behind objects). Theres a problem. The script works GREAT and does what its supposed to do. The problem is that every movie clip i put it on carries over to the next frame when the timeline is furthered. It doesn't help that its a clean frame (or even several frames ahead) the movieclips are still duplicated to the new frame and so on.

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Objects Carried Between Frames By GotoAndStop()?

Jan 15, 2010

I am creating a point and click game.In the bottom corners of the screen there are two arrows for changing the area. When these arrows are clicked, the only thing that is supposed to happen is a frame change. For some reason, objects are being carried from the frame they are supposed to be on to the frame that is changed to and they stack up each time the frame changes. I don't even see how this is possible without writing code specifically for it. Here is the code in one of the objects being transferred:

Code:
onClipEvent(load)
{
var DepthCorrection = 0;[code]...

Nothing in that could possibly make it move to a different frame and it has no instance name so nothing can reference it to bring it to one.Here is the code for changing frames:

Code:
onClipEvent(load)
{
var Frame = _global.Area + 1;[code]...

I've had problems with gotoAndStop() before where it went to the wrong frame and only displayed certain objects on that frame.

View 2 Replies

ActionScript 2.0 :: Flash8 - Reverse The Frames In A MovieClip By Buttons

May 14, 2009

My inquiry is, if I have a MovieClip with an animation, and I need to play this MovieClip by button, I know I need to use this action // on (rollOver) // telltarget() // play()

but if I want to rollout before the animation reach the last frame, for example the frames are 90 and I decided to rollout in 50.

How I can make the frames go backward to frame 0 after I rollout of the button ??

For your information I have MC flash 8 professional.

View 3 Replies

Flash8 :: Randomize Frames In Flash?

May 7, 2010

How to randomize them but with only selected frames For example i only want frame 2-9 to be randomize can i do such things?

View 2 Replies

ActionScript 2.0 :: [flash8] Linking To The Correct Frames

Dec 5, 2008

I am trying to make buttons (or maybe they should be movie clips) on my menue to link to the correct frame (about me, faqs, ect...).

View 2 Replies

Flash8 :: Playing Movie Clips On Different Frames From A Button?

Apr 9, 2010

I have a button which when pressed I need it to play a frame on the main timeline which contains a movie clip. I also want the same button to play another frame with another movie clip after the previous frame has finished playing. I have attached a sample file of what I am looking to d

View 18 Replies

Flash8 :: Disable The HitArea On Specific Frames Within A Movie Clip?

Jul 10, 2010

I have been having some trouble with a movie clip basically designed to act as a button for a store front for a website.This movie clip has, stored as the front of the movie (i.e. before you click in to edit the movie) the following code:

on(rollOver){
gotoAndPlay("Over");
}[code]..........

This gives the movie the hover over and out effect and animates the button so as once pressed the button expands to give a 'Product Details' view.However, when clicked the info shows up as it should but the hit area which I put into the Movie Clip is still on the info area so none of the contents on this new window are accessible and when the cursor leaves the designated info area the movie clip returns to its first stage as it would appear at the start of the animation.Is there any simple way to disable the HitArea on specific frames within a Movie Clip?

View 16 Replies

ActionScript 2.0 :: Goto When Action Has Been Carried Out?

Nov 30, 2004

how can I make a movie go to a next frame when an action has been completed? I would like to make an actionscript tween like below, and when the tween has been completed, I want the movie to go to a next frame

stop();
textTween = new mx.transitions.Tween(tekstMC, "_y", mx.transitions.easing.Regular.easeOut, 136.9, 600,1, true)
something like:"when action above has been carried out, gotoAndPlay(5);";

View 1 Replies

ActionScript 2.0 :: Goto When Action Has Been Carried Out

Nov 30, 2004

how can I make a movie go to a next frame when an action has been completed? I would like to make an actionscript tween like below, and when the tween has been completed, I want the movie to go to a next frame

stop();
textTween = new mx.transitions.Tween(tekstMC, "_y", mx.transitions.easing.Regular.easeOut, 136.9, 600,1, true)
something like:"when action above has been carried out, gotoAndPlay(5);";

View 1 Replies

ActionScript 3.0 :: Have A Movieclip Of About 50 Frames And Navigate Between These 50 Frames?

Jan 7, 2010

Is it possible to have an movieclip of about 50 frames and navigate between these 50 frames? As if u put a marker on frame 10 and one at frame 30 and if u use a button it plays to frame 10 and stops and use another button to go from frame 10 to frame 30 and stop... and reverse if u use the earlier button.

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

Flash8 :: Move A Movieclip (person) Towards Another Movieclip(ball)

Jul 7, 2009

I am looking to move a movieclip (person) towards another movieclip(ball). I can do that fine but the ball is constantly moving and that gives me a lot of trouble.

View 6 Replies

ActionScript 2.0 :: Flash8 Movieclip Area Movement - Restrict The Area In Which The Movieclip Can Actually Move ?

Apr 24, 2009

I have made a movieclip and gave the frame this actionscript:

------------------------------------------------------------
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {[code]........

it moves fine and stuff but i was wondering how can i restrict the area in which the movieclip can actually move ? my flash file is 550px X 400px and i want to make it so that it can only move in 300px X 200px of the file if you understand ?

View 1 Replies

Flash8 :: Continuous Spawning Of Movieclip?

Aug 29, 2009

i'm trying to achieve an effect in which a triangle movieclip (which expands and then dissolves) respawns itself continuously. I'm hoping to figure out how to tell flash to respawn a new instance of the 15-frame movieclip of the triangle, when the original clip hits frame 5. the next one would do the same, and so on and so forth.My research so far has led me to believe this has something to do with the 'addChild' function but i'm so far unsure of what to do with it

View 1 Replies

Flash8 :: Unable To Load Xml In Movieclip

Sep 4, 2009

I have a flash file which loads a movie clip on the click of a menu item.Now I am trying to add some dynamic data (xml) within this movie clip - In short I do have a dynamic tet box, and can access it as follows:

_level0.pages1.page.forumText.text

The problem is how and where do I load my XML. This is my code to load the xml data I tried to add it in the Frame for the movie clip and it came back with the following error :

**Error** Symbol=pages1, layer=Layer 3, frame=3:Line 21: Statement must appear within on/onClipEvent handler
headlineXML.load("FlashFile.xml");

[code]....

View 2 Replies

Flash8 :: Controlling Timeline From A Movieclip?

Sep 1, 2010

So im creating a site for a friend and I have placed the menu inside a movieclip so the buttons are inside the movieclip. This the script i have tried :

Code:
stop();
natural1.onRelease = function () {

[code].....

View 1 Replies

Flash8 :: Button Outside A Movieclip To "gotoandplay" Inside The Movieclip?

Aug 12, 2010

I have a frame with a movieclip in it (named "theclip" in the library and has the instance name of "guy"). The movieclip has two frames with stops on them. The second frame inside this movieclip has the label "guy2"

Now back in the basic frame i also have a button (outside the guy movieclip) that i'd like when i press it it jumps to the "guy2" frame of the "guy" movieclip.

Code:
on (release) {
gotoAndPlay("guy2");
}

what do i add to the script that makes it refer to the movieclip? Is there a line like the _root or _parent and so on?

View 1 Replies

ActionScript 2.0 :: Flash8 Linkage - Load To A Movieclip

Jul 6, 2009

i have a swf in my library that i want to load to a movieclip... I gave to that same swf the linkage name of: 1

[Code]...

View 1 Replies

ActionScript 2.0 :: Flash8 - Load A Movieclip From The Library?

Jul 7, 2009

Trying to load a movieclip from the library... BUT for some reason it just doesnt work... The linkage name that i use is "pic_1".

Code:
_root.mc_movies_area.mc_area_1.loadMovie("pic_1");

View 6 Replies

Flash8 :: Creating A Movieclip On The Frame With A Click?

Sep 18, 2010

Say that i have a variable called explosion when this variable is set to yes i'd like it so that whenever you press the screen with the left mouseclick it "creates" a movieclip where you clicked that in the library is named bomb (or duplicate the movieclip from off screen if that is easier)

View 2 Replies

ActionScript 2.0 :: Flash8 : Changing The Movieclip Size?

Feb 26, 2011

i want to make it so when the movieclip moves (arrow keys) closer to the top it gets smaller and moves slower, and when it gets to the bottom it gets bigger and moves faster.Here is a working code I have, but I need to think of something better.

Actionscript Code:
if (this._y < 700){this._xscale = 120;  this._yscale = 120;  _level0.speed = 3.6;}if (this._y < 650){  this._xscale = 115; this._yscale = 115  _level0.speed = 3.4;}if (this._y < 600){this._xscale = 110;this._yscale =

[code]....

the only problem with this is that it is by 50's. I figure I would need a formula

View 2 Replies

ActionScript 2.0 :: [Flash8] Scaling A Movieclip From 100%-70%-100% Using The X-axis

Aug 22, 2007

I am building a flash piece in which I need an object to move across the stage from right to left and scale from 100% just off the right side of the stage, to 70% in the middle of the stage and then 100% again just off the left side of the stage. Giving the illusion that it is moving in a circular pattern around the viewer. My goal is to get the scaling to be relative to the MC's x position on the stage. Moving it across the stage is the easy part, and I can scale the MC from 100% on the right to 0% on the left using an onEnterFrame function containing:

MC._xscale = MC._yscale = Math.round((MC._x/Stage.width)*100);

but I can't seem to figure the 100-70-100 deal out. I thought there might be a math function like sin, cos or tan that would really help out, but I can't seem to find anything out there

View 3 Replies

ActionScript 2.0 :: Flash8 Scrolling MovieClip: Loop Within Set Area?

Jul 29, 2009

I've got a movieClip that's scrolling across the stage that loops nicely (kinda like the many cloud animations out there).

I've set the clip up to stop it's scrolling on a rollOver, and start up again on the rollOut.

My problem is that after the rollOut the loop doesn't work. The movieClip just keeps travelling.

Code:
blue.onEnterFrame = function() {
blue._x -= 2;
if (blue._x<=-0) {

[Code]....

View 5 Replies

ActionScript 2.0 :: Flash8 Simple Button Not Working Within Movieclip

Mar 2, 2010

I have a simple getURL button within a movieclip within another movieclip. Does anyone have any clue why this isn't working? The button is in the top layer of the child movieclip, and the child movieclip is in the top layer of the parent movieclip, so what am I missing here? I attached a simplified fla to show the issue. In the end, the main red box will be a country on a map and the popup box will contain info about the country and links to pictures and sites.

View 4 Replies

Flash8 :: Movieclip Mask Making Text Invisible?

Jul 14, 2010

I have a movie clip which has a dynamic mask applied to it to provide a scroll effect.

The mask is generated with the 'create blank movieclip' method.

So the mask is a movie clip over a movie clip.

I hunted for invisible text last night and found this link [URL]

which implies it's to do with the mask being on a layer, but from what I can gather from reading the AS, it's not it's on a new blank movie clip.

Also many other links I found all imply it's an issue with dynamic text and the font needs to be embeded, but the underlying text is not dynamic, it's static normal text which has been used in a movieclip to create animated rollover/out effects.

So why is the text missing when the content is scrolled into view?

If you hover over where the text is supose to be, the animation plays and the text becomes visible?

Also the arrow graphic next to the text which forms part of the animation does display; it's just the text portion which is invisible?

View 2 Replies

ActionScript 2.0 :: Flash8 : Import An Ext Text Into A Textfield/movieclip?

Jul 21, 2010

I want to import a external textfield ( called text2 into a created textfield inside a movieclip. But fo some reasons it doesn�t work. I can�t see the text. but I load an image inside a mc and that work.

stop();
///create a movieclip////
this.createEmptyMovieClip("info",1);
info._x =270;

[code]...

View 5 Replies

ActionScript 2.0 :: Flash8 : Create A Movieclip In Which Different Colored Birds Are Flying?

May 19, 2009

I am trying to create a movieclip in which different colored birds are flying..I am tring to duplicate two or more MovieClips at the same time..but only either of them Works How should I modify the code so that I can achieve that ?

PHP Code:

function birds() {
for (m=1; m<=10; m++) {
firstEnem y= "bird"+1;

[code].....

View 2 Replies

ActionScript 2.0 :: [Flash8] - Resizing - Movieclip Resize On Center, But I Want Is On Left?

Apr 26, 2007

resizing movieclip using action script. I doing a resize on the width of the moviclip. What i got is the movieclip resize on center, but i want is on left. the code i use as below:

MovieClip.prototype.resizeMe = function(w) {
var speed = 3;
this.onEnterFrame = function() {[code]......

View 2 Replies

ActionScript 2.0 :: Flash8 :: Button In A Movieclip Linking To Another Frame In A Parent Clip?

Sep 10, 2009

A movie clip called "Symbol_4" contains all of the navigation and frames of my movie.inside of Symbol_4 is a MC called "bottom scroller" which contains "imgbar" which contains "bar" which has a bunch of buttons in it.I want those buttons to link to different frames in the main "Symbol_4" MC.

I've tried putting code on a button like this

Quote:

on (release) {
tellTarget (this._parent._parent._parent) {
}

[code]....

There are no errors in any of this code, but nothing seems to work?!

View 2 Replies

ActionScript 2.0 :: Flash8 MovieClip Recognition - Change A _root.mc.speed Property

Dec 30, 2009

I have two movie clips on stage, each with the same code, I have another movie clip that comes along and interacts with the two of them and changes properties to its speed and such. The problem is, it only seems to work one at a time, for instance I can't have both of the movie clips changing its speed, it works with one and then ignores the others code. *EDIT* I just ran a trace on the two mcs, I can confirm both of them know when the main one hits it, but because I'm trying to change a _root.mc.speed property in each one, it only accepts one of them and ignores the other for some reason :S If I use different properties in each it allows that.

View 5 Replies







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