ActionScript 2.0 :: Flash8 Resetting MC's To Original Place?

May 16, 2009

Right now I am in the beginning stages and I have it set up so you can drag different sounds to the timeline (in the game, not in flash) and it'll snap in place which works perfectly.

But here's my problem: When I try to click the reset button the sounds snap to their original places (which sounds good right?) but then they tween back to where you dragged them on the in-game timeline.

I have put in various codes and no matter what I try, when I click the reset button, they always go back to where you dragged them to the timeline, making the reset button pointless.

Here's my code on the Flash timeline:

Code:
function dragSetup(clip, targArray) {
clip.onPress = function() {
startDrag(this);

[Code].....

I know, I know, that whole s(N) thing is very beginner but I didn't know what else to use, and it worked fine.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Resetting Objects To Their Original Location?

Sep 2, 2009

I am making a presentation where the user can click and drag cubes around the stage. I was wanting some kind of reset function where the cubes would tween back to their original co-ordinates rather than just jumping back to frame 1 when they were all in order.

View 2 Replies

ActionScript 3.0 :: Resetting All Buttons To Original State?

Jan 27, 2011

I have the code below and am trying to set up a "reset" button that takes all the buttons back to its "up" state or original state. And I can't seem to get it to work. The last selected button remains in its "down" selected state.

This the code that sets up the buttons' up/down/over/out states:
var selectedButton:MovieClip = null;
setupButton( one_btn );
setupButton( two_btn );
setupButton( three_btn );
setupButton( four_btn );
[Code] .....

View 10 Replies

Actionscript 3.0 :: Resetting An Object Back To Original Position?

Dec 11, 2010

I have a movie clip for each piece of clothing that will be used to attach on the dog. These movie clips click and drag to add clothes onto a target and it automatically resets back to its original position each time you grab a different selection of clothing. All of my objects go the original position except for one. The "julyDress" movie clip automatically pops up to the top of the page and does not reset to the original position.

Below is my code:
stop();
var startJulyXPos:Number = JulyDress.x;
var startJulyYPos:Number = JulyDress.y;

[Code]......

View 1 Replies

ActionScript 2.0 :: Particular Menu Script - Buttons Come Back To Original Place?

Sep 3, 2003

[URL] I need to know the script they have used for the 'when , how' buttons. I know its controlling movie clips using buttons. How do the buttons come back to original place?

View 5 Replies

ActionScript 2.0 :: Flash8 - External Swf To Retain Its Size In The Center Of The 800x600 Original Movie

Mar 11, 2009

My original movie is 800x600 and my external swf is 700x525... I'm using the following script on a keyframe... loadMovieNum("123.swf", 1); ... and under normal circumstances this would work fine... however... I need the 700x525 external swf to retain its size in the center of the 800x600 original movie... right now it's edge to edge and showing what's going on 'offstage' in the external swf! What scripting am I missing? I'm using Flash 8 on a Mac.

View 2 Replies

Flash8 :: Mouse Over A Certain Place To Get Text?

Apr 9, 2009

I'm working on someone's Flash project and my task is to add roll over text to all the buttons in the project. The problem is I can't use the actual buttons because the are underneath some other animation. What I want to do is to add roll over text using the coordinates of the button but not the actual button.

View 7 Replies

ActionScript 2.0 :: [Flash8] Place Image From A Xml Search?

Dec 7, 2005

I am working on a new project, and I need a search engine to look for data and display images and data, I read this senocular tutorial, but I'm too bad for these things and I can't still manage how to load an image.

View 6 Replies

ActionScript 2.0 :: [Flash8] Place An External Swf File On It In A Desired Position When The Corresponding Page Is Being Loaded + Scaling

Aug 18, 2006

I have a flash file (a flash navigation bar actually, which gets loaded in all the webpages inside the website). What I am trying to do is place an external swf file on it in a desired position when the corresponding page is being loaded. I am using FlashVars (variable name -> 'movieName') to pass the name of the movie clips. These variables are read by the navigation swf file and the corresponding swf file should be loaded in the area specified. Now, to create a container, I am using createEmptyMovieClip() method which will host all the external swf files.

The swf files are all being loaded but with a lot of problems. First, no matter what I try, the swf file comes at a fixed place (which is way off from where it is supposed to be). I have tried checking if the container loaded the movie before fixing its position but it changed nothing. Although it did change the position of a weird background colour box I am getting when the movie starts loading - which brings me to the second problem.

A rectangular box flashes once when the external swf is loaded, and its position is being affected by whatever I am setting the _x & _y values of the container movies to. I have no idea why it is happening as it doesn't happen when I test that swf seperately.

[Code]...

View 1 Replies

ActionScript 2.0 :: Bitmap Data - Place Smoke Effect At Specific Place

Feb 1, 2011

How to make this smoke effect work without mouse input. I am trying to have it spill from the end of a cannon, & my attempts to modify the position have resulted in all my bitmaps shifting. I changed this
doTrail(_root, _xmouse, _ymouse, currentBitmap);
To this
doTrail(_root, _x=80, _y=100, currentBitmap);
[Code] .....

View 0 Replies

ActionScript 2.0 :: Duplicate A Movie Clip And Then Place It On A Certain Place On The Stage Set _x And _y?

Apr 8, 2005

how can i duplicate a movie clip and then place it on a certain place on the stage

View 5 Replies

ActionScript 3.0 :: Place A Scrollpane In A Specific Place On Stage?

Aug 21, 2010

I've used .x = and .y = with the position I want and the pane continues to show up in the top left corner instead. What am I doing wrong?

View 2 Replies

ActionScript 2.0 :: Place Hundreds Of Instances Of One Movieclip On Different Place?

Mar 7, 2008

how can we place hundreds of instances of one movieclip on different place?

for exemple, pacman:

how should i code the placement of all the money?

i would go:
_root.attachMovie(
_root.attachMovie(
_root.attachMovie(

but that's not the good solution is it?

there must be a code to do that without hundreds of lines of code.

View 3 Replies

Variable Changing But Then Resetting

May 25, 2011

I'm very new to Flash, but I have been learning loads and getting some good results so far. Browsing these forums has been a massive help. However today I have hit a problem in what should be almost the simplest line of code I know how to write (variable = x), and could do with some advice. I have a simple program containing a button which will change a variable when pressed. There is also a text-box that will output that variable. However when I press the button, the variable will change, but then immediately revert to it's previous value.

[Code]...

View 3 Replies

ActionScript 3.0 :: Variable Resetting Itself?

Jan 1, 2011

I made a simple class that's keeping a history of strings, updating it with a push() method (like an array) and with a possibility to navigate with next() and previous().Therefore my class has an array and a integer indication the current position in the array. (See full code below)Now something very strange is going on. When coming into the push() method the position variable has some value, which I can change, but everytime I try to read that variable, it gives me a 0. I've never had this kind of problem before and I simply cant find out what's wrong.The push() method

ActionScript Code:
public function push(entry:String):void [code]......

View 3 Replies

Actionscript 3.0 :: My Score Keeps Resetting

Jan 14, 2010

I have a character on the stage in my fla that when hitting a particle created in an a particle.as removes the particle. I have the code for removing the particle and also a score counter that adds one everytime a particle is removed (located in my particle.as). My problem is the score keeps resetting or I get sporadic results (not sure which) for example here I traced the results[code]...

View 1 Replies

ActionScript 2.0 :: Resetting The Scrollbar?

Mar 11, 2004

How do you reset the scrollbar in Flash? (I'm using the component, not a cusom scrollbar.)If you go here, scroll ALL the way to the bottom and then click on "Donations" - you'll see the scrollbar stays in place.How do I get it to refresh each time new text is loaded? I've tried refreshPane() and a few other things, but nothing works.

View 7 Replies

ActionScript 2.0 :: Resetting Comboboxes?

Jul 16, 2003

How do you reset combo-boxes?I have this form with combo-boxes and input textfields, and I want a button that can reset the form.The input textboxes are easy:TextBox1.text = "";

View 5 Replies

ActionScript 3.0 :: Combo Boxes Resetting?

Jan 26, 2009

I have created a menu for an online café. The displayarea is limited, so the menu items need to scroll within a frame ofsome sort.

View 4 Replies

ActionScript 1/2 :: Resetting Operations In Particular Frame

Nov 6, 2009

I've created a application where the viewer could change colours, add text, add logos, rotare them, etc... How do I create a reset button which resets everything to back normal in a specific FRAME? What functions do I have to use?
E.g.
Frame 5 is used to Add colours and text, etc...
Frame 10 is used to Add logos,scale them, rotate them, etc...
I need a reset button in Frame 5 to make only the things which were changed back to normal.

View 1 Replies

ActionScript 1/2 :: Tween Class Not Resetting Y Value

Jan 11, 2011

I am trying to move a movieclip down using Actionscript. Then when a user fires a back event [which is successfully firing] the movieclip is then required to go up again. The code is:

trace("fholder _y org: " + folioholdermc._y);
// THIS COMES OUT TO BE -601
var yDown1:Tween = new Tween(folioholdermc, "_y", Bounce.easeOut, -601, -449, 3, true);
trace("step 1 called");
trace("fholder _y down1: " + folioholdermc._y);
[Code] ......

View 3 Replies

Actionscript 3 :: Resetting Objects In Flash CS5?

Mar 16, 2011

I'm making a simple platform game in Flash CS5 and Actionscript 3.0. When the player loses all their lives, I want it to redirect the player to a "Game over" screen where they can select a "Try again" button to restart the game.

Set everything (player, background, etc) to visible = false
Set "Game over" movie clip to visible = true (it is invisible during gameplay)

Have the button in the "Game over" movie clip hide the movie clip then re-show all the gameplay elements.Reset position of player to start, set score to 0, lives to 3, etc..It's probably not a very good way of doing this but if it works, then I'm happy. I just want the "Game over" screen to show briefly and if the player clicks the "try again" button, they can play from the start.

Now, the problem with my implementation of the above is that when I set all the gameplay elements to visible = true after having them set to false, the game has stopped.. keyboard input doesn't reactivate and the game elements are shown but aren't active. Is there something about the visible attribute I don't know? Does it mess with the "state" of an object? Here's some snippets of code from the Actionscript file...

if(lives >= 0) {
//print number of lives
}[code]..........

View 2 Replies

ActionScript 2.0 :: Resetting X And Y On Draggable Movieclips

Feb 3, 2009

I've got 6 draggable movie clips that snap to a target - which works fine. If they don't hit the target area they snap back to their starting point- which also works fine.

My problem is that they can all be dragged to the target one after another, but I only want one movieclip to be at the target at any one time.

So,when I start dragging a new clip toward the target I want the movieclip thats already on the target to reset itself to it's starting position, thus being replaced by the incoming clip.

I want this to happen for all the draggable clips.

function dragSetup(clip, targ) {
clip.onPress = function() {
startDrag(this);
this.beingDragged=true;

[Code].....

View 3 Replies

ActionScript 2.0 :: Stop Animation From Resetting?

May 22, 2010

I'm making a flash game. when i open the dresser drawer, then leave, then come back the drawer is closed.

how can i make it so when i come back the drawer is still open?

View 1 Replies

ActionScript 3.0 :: Resetting A Class Instance?

Dec 29, 2010

im creating this game. I have a main class, which I use to call the menu class and the actual game(board) class.

I got the game working, but now when I try to reset the instance of the board, it doesnt actually execute the constructor again. So I get a fresh board, but the variables aren't reset.

ActionScript Code:
public function Resetboard(event:Passboolean){
board = null;
board = new Board();
application.addChild(board);
}

View 9 Replies

ActionScript 2.0 :: Resetting Multiple MovieClips?

Jan 24, 2011

I've created this simple birthday game where the concept is to blowout 30 candles in 15 seconds.The candles are movieclips so that when they are clicked on, they blowout. However,when the option to "try again" begins, the candles are still out.

View 9 Replies

ActionScript 2.0 :: Sound.position Not Resetting

Oct 25, 2005

Just to start off, this isn't exactly an inquiry to a problem. It is moreso of a posting of a bug (or assumed bug) in the Flash player and how to get around it. Though if anyone else has a better method then share. Ok, well I very rarely ever work with the Sound() object in Flash, and I found myself working with it today. I was having a problem and I could not pinpoint it for the life of me.... my code appeared correct in every aspect.

After tracing many sections of my code to find out where it was going wrong I realized... that for some reason when you use Sound.stop(), the Sound.position doesn't get reset... it instead just increments from where it left off. This is quite annoying. And being that Sound.position is a read only property you can't reset it yourself. The only solution I have found for this is to delete or overwrite your Sound() object with a new Sound() object. Anyone know if this is indeed a bug, or if there was some reason Macromedia did it like this?

View 9 Replies

ActionScript 2.0 :: Resetting Movieclip States?

Jan 16, 2006

I know there are similar questions here that have been answered, but after trying to make sense of it, I still can't get this to work.Based on an array, I attach a number of MovieClips from the Library.On release they go to a certain frame, representing the "pressed" state of the button.The problem is, that I can't figure out how to reset the last pressed button back to it's original state...Here is the Actionscript code I have so far:

ActionScript Code:
stop();
daCap.play();
scrollUp._visible = false;[code]......

View 5 Replies

ActionScript 2.0 :: Resetting Movieclips Position?

Sep 7, 2006

I have a setup where a girl is holding a card on there are words on each card and as time goes by they fall to the ground. The problem I am running into is that the cards never go back into the loop of cards, once they are out I am just left with a blank card. How could I have it reset this?

Code:
//CLASS IMPORTS
import mx.utils.Delegate;

[code].....

View 1 Replies

IDE :: Scrollpane: Resetting Scrollbar Position?

May 18, 2009

In my main .fla I have a scrollpane which opens an external SWF, inside this external SWF I have 5 frames, each with a 'Next' button at the bottom, the problem is when the user clicks the 'Next' button the the scrollpane doesn't change the position of the scrollbar, so essentially the user is looking at the bottom of the next frame. Is there any way to reset the scrollbar position from either the external SWF (linking to the main SWF), or with some code in the main SWF?

View 3 Replies







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