Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Jumping Back



i finally figured out how to make my button, which is inside a movie clip, jump to the next scene. but how to i make it jump back??? i tried labelling the frame in the prev. scene and then telling it to go there, but that didn't work. i'm sure this is really simple and i'm just not doing something right...
help!!!
emily (again)



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 04-17-2005, 12:22 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Jumping Back
i finally figured out how to make my button, which is inside a movie clip, jump to the next scene. but how to i make it jump back??? i tried labelling the frame in the prev. scene and then telling it to go there, but that didn't work. i'm sure this is really simple and i'm just not doing something right...
help!!!
emily (again)

2 Swf Files - Jumping Back And Forth?
I am kinda new to scripting and would like to know if this is possible. Here is my situation, I have two movies (swf files). The first file, which is the main part of the site, has 6 different scenes. The second swf file has 1 scene. On the first swf file you can click a button and it will take you to the second swf file, which is not connected to the first swf file. (The browser takes u to the second swf file through a url.) (on the first swf file, you click a button and on that button I have an action script with the url of a new swf file, which is the second one) But here is my question, can you make the second one go back to the first one in a certain section. For example, When you move to the second swf file and the user wants to go back to the first one in a certain point is that possible?

Let’s say I am at the second swf and I want to go back to scene 3, frame 1 (1st Swf file) and the url to the first swf file is: http://www.firstswffile.com. How would I do that?

Thanks

Slide Not Stopping, And Jumping Back...
Hi

I'm quite new to using flash, but have done a few site by learning through total training dvds, and have created a few sites using the flash slides. On my latest one though, I have currently done 3 slides (intro, home and about). For some reason when I enter the 'about' slide it stays on it for a while, then jumps back to the home slide. I have a stop action on the 'about' slide in the correct place. Does anyone have any ideas why this would be happening? Any help greatly received.

Kind Regards
KM

Problem With Scenes Jumping Back To The Start
im making an rpg style game and have a part where the main character collides with a telephone mc which ive set to jump to another frame later in the scene which is a telephone convo. when i test the scene on its own it works fine although when i test the whole movie it jumps back right to the begining of the game when i collide with the telephone. the scene im working in is scene 2 and the scene its jumping back to is scene 1 frame one.

heres the script ive used:

if (_root.phone.hitTest(_x, _y, true)) {
_root.gotoAndPlay(120);
}

i dont understand why its doin that?
any suggestions?

cheers

Problem With Scene Jumping Back To Begining
im making an rpg style game and have a part where the main character collides with a telephone mc which ive set to jump to another frame later in the scene which is a telephone convo. when i test the scene on its own it works fine although when i test the whole movie it jumps back right to the begining of the game when i collide with the telephone. the scene im working in is scene 2 and the scene its jumping back to is scene 1 frame one.

heres the script ive used:

if (_root.phone.hitTest(_x, _y, true)) {
_root.gotoAndPlay(120);
}

i dont understand why its doin that?
any suggestions?

cheers

Jumping From Movie Clip, Back To Scene
wussup people?
arite, ive got a flash site in which i have a scene wit a movie clip. now, thing is that i have a back button in the movie clip which when u click, it is suppose to jump back to a navigation bar that is in the scene. but keep in mind at all times that the movie clip is in a layer which is in the scene. i thought it'd work just fine by using the goto and play option for the end of the clip when it finishes, and make it go back to the scene, but instead of going back to the scene, the clip just repeats itself, and goes to the frame within the clip, which is actually meant for the scene frame that it is suppose to go to..
sounds confusing, but... yea.. any suggestions?

Icons Jumping Forward And Back Randomly On Carousel
icons jumping in forward and back randomlyflicker3.jpg (48.03 KiB) Viewed 422 times

Can You Use The Back Button In A Browser To Go Back To Go Back In A Flash Movie?
Hi
In html pages it is easy to go back (the back button in the browser) to the last page you were on. But when you have got a flash site in a html page you cannot go back to the last page in the flash site using the 'back' button in the browser. Is there anyway you can change this so that you can use the back button in a browser to go back to the last flash frame?

Array Sorting - Random With No Back-to-back Repeats
I need help with a complex array sorting method, and I apologize if this concept has already been addressed in the forums. Part of my problem is that I don't know how to concisely describe it, so I can't do an effective forum search.

I start with an input array of strings that will be of varying length and may contain repeat values. I need to randomly sort the array and return an array with the same values, but it should try to distribute values evenly and avoid back-to-back repeats if possible.

(Sorry, that's the confusing part. Hopefully the examples will explain better. Colors are not important, just added to aid visual)

**************************************************
Example 1 (Random order, avoiding back-to-back repeats):
**************************************************

If the input array is
["dog", "dog", "dog", "dog", "cat", "cat", "cat", "bird", "bird", "fish"]

I need to output
["dog", "cat", "dog", "cat", "bird", "dog", "cat", "bird", "dog", "fish"]

but the order also needs to be randomized, sometimes giving me
["fish", "dog", "bird", "dog", "cat", "bird", "cat", "dog", "cat", "dog"]

OR
["bird", "cat", "bird", "dog", "cat", "dog", "fish", "dog", "cat", "dog"]

ETC.

************************************************** ***********
Example 2 (Distribute as evenly as possible if back-to-back repeats are unavoidable):
************************************************** ***********

If the input array is
["dog", "dog", "dog", "dog", "dog", "cat", "cat"]

I need to output
["dog", "dog", "cat", "dog", "dog", "cat", "dog"]

but also randomized, sometimes giving
["dog", "cat", "dog", "dog", "cat", "dog", "dog"]

OR
["dog", "dog", "cat", "dog", "cat", "dog", "dog"]

ETC.

Any help with this would be appreciated. If this type of sorting has a name, let me know so I can look it up.

Using Back Browser Back Button On SWF Loaded Site
I have created a web site that runs on loading different swf files. These files contain navigation and plain content. My problem is that I need to use the browsers back button. I dont think I can do this with anchor tabs. Help meeeee. It's driving me nuts. I don't see any questions out there that address this on a site that is with multiple swf files.

Anybody?

Question: Running Back-to-back Swf Files (and Pre-loading)
I have two SWF files. I would like to play the second one at the end of the first one, or maybe even one or two frames before the first one ends. They are both the same dimensions. I know I can do it with AS, but I am a Flash beginner and not sure how.

Also, file #2 is quite large, so I would like a way to start pre-loading it as file #1 is playing, so that by the time #1 finishes, then #2 will be ready to go.

Thanks for your help!

I Just Need Two Movie Clips To Play Back To Back
This is a simple one: I have 1 scene, I've developed two complex mc's and now I want to play them in sequence. In scene one I've placed the first movie with a "stop" action. Inside the end of this first mc I also have a "stop" action. I've then put the second mc in frame two expecting the playback head to advance to frame 2...when i preview the move it just stops after the first mc. Ive tried to replace the "stop" action with "gotoandplay(scene,frame)" at the end of mc one...the first mc just loops. Also tried setting up a second scene with the second mc placed in frame one with a stop "action". Then use the "gotoandplay(scene,frame)"... it just plays the first scene mc.

Thanks for your help.
joe

Playing Swfs Back To Back Seamlessly?
I have an extremely large swf here. 7.1 MB!!! I also have one that is around 5MB!

I am having difficultity playing them on the webpages.

Obviviously they need preloaders which I use, but due to the size (I am assuming) they play slow. The music plays fine but the animation has trouble keeping up and thus it is not entirely in sync.

Would splitting these swfs up into smaller swfs and then inserting code (getUrl or something along those lines?) at the end of each small swf to begin playing the next small chunk of swf work?

Can this be done and done smoothly? So that the small swfs play and play back to back so that the viewer wouldn't even be able to tell?

What are your thoughts? Has anyone been able to do this successfully?

Playing Swfs Back To Back Seamlessly?
I have two extremely large swfs (7.1 MB and 5 MB). I am having a lot of trouble displaying them on the web. The run slow. The sound plays fine but the animation has trouble keeping up and thus it is out of sync. The animation looks slow.

I do use preloaders and have tried loading the entire swf before playing and just loading 1/3 of the movie or 1/2 of the movie before starting, to the same slow play.

I am wondering if it is possible to split these monsters into much smaller swfs and then link them together?

In otherwords, at the end of the first small swf is a code (getURL or something along these lines) to start loading/playing the next section of small swf, etc...

Can this be done seamlessly? So that the viewer would not even know there are multiple swfs and it would play as if one continuous movie?

Has anyone tried this or is this even possible? Thanks.

Back To Back 'getUrl' S -- Can This Work?
Hey there,

I have a movie on which the last frame in my Actions layer asks for two get urls. It basically looks like this.

getUrl ('http://www.mysite.com', _self);
getUrl (javascript:deadCenter('300','200');

It seems to work on some machines but not others. The pop-up window comes up but the first getUrl gets ignored. I'm not sure why.

Any ideas?

Thanks.

Please Help ... Setting Up .swf Files Back To Back
I hope someone can help me figure this out. I'm creating an animation to teach the alphabet to preschoolers. The first part shows falling (raining) alphabet letters (used flashmatics very helpful code), then a big letter "A" (that takes up most of the screen) comes down into the center (did a motion tween to bring the letter in).

The next part is supposed to switch over to an short (3 seconds) animation of an object that starts with the letter "A" (will have a small letter "A" on the left-hand corner and the name of the object, i.e., "apple" on the right hand corner). Then there will be two more 3 sec animations showing two more objects starting with that letter (for a total of 3 objects).

What I don't know is whether I 1) create each of these in a separate .swf file (raining alphabet with falling "A", object 1, object 2, object 3) and then place them inside a table on my .htm page to somehow play sequentially (how do I do that????)

--- or ---

Find a way to have the animations inside the same file one after the other. I know very little Flash or programming ... I'm just a teacher .... so I'm having trouble sorting out how to do this. I thought I could set up different "scenes" and then have scene 1 go to scene 2, etc. But that's not working for me (the original falling letters won't stop falling through all the scenes no matter what I do and I can't seem to change the background in other scenes because it changes the first one too).

Can anyone help??

Here's the code I have for falling letters (thanks to Zane/Flashmatics):

var SW:Number = Stage.width;
var SH:Number = Stage.height;
var gravity:Number = 0.2;
var i:Number = 0;

var nInterval:Number = setInterval(fall, 1000/24);
var aLetters:Array = ["A", "B", "C", "D", "E", "F" ,"G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "X"];//PUT YOUR ALPHABET IN HERE

var aRain:Array = [];

function fall():Void {
_root.attachMovie("mcLetter", "mcLetter"+i, _root.getNextHighestDepth());
var mcLetter:MovieClip = _root["mcLetter"+i];
var nIndex:Number = random(aLetters.length);

mcLetter.tLetter.text = aLetters[nIndex];
mcLetter.tLetter.textColor = Math.random()*0xFFFFFF;

//movieclip properties
mcLetter._x = random(SW);
mcLetter._y = -(random(20));
mcLetter.vr = random(20)-10;
mcLetter.vy = 4+random(15);
mcLetter._alpha = random(100);
mcLetter._xscale = mcLetter._yscale = random(450);
aRain.push(mcLetter);

for (var j:Number = aRain.length-1; j>=0; j--) {
var currLetter:MovieClip = aRain[j];
currLetter.vy += gravity;
currLetter._y += currLetter.vy;
if(chbRotate.selected){currLetter._rotation += currLetter.vr};
if (currLetter._y>SH-25) {
currLetter.swapDepths(1000);//use this because sometimes components push mc depths to unremovable ones
currLetter.removeMovieClip();
aRain.splice(j, 1);
}
}
i++;
}

2 FLVs Back To Back Same Player
Does anyone know how to set up a video object that will play 2 seperate flvs back to back?

I have 2 flv files and one player. Sometimes I need both to play sometimes only one. But I was wondering how do I have them play back to back smoothly as if they where one flv.

Back Button In Flash Projector Like Javascript's "history.back"
Please tell me how to make a back button in Flash for projector (exe) file. The back button should function like the javascript's "history.back". I have 100 scenes that points to one target scene. If a user clicks the back button in the target scene, he/she must go to the scene from where he came.

**** I am not looking for named anchors that works for swf file in browser.

Keyboard Back Button Acting As Browser Back Button
I'm having problems with a Flash MX Sign up form I'm implementing on my website.

The form has a series of frames which take the user through the sign up process, before clicking through to the online payment gateway. Each of these frames is anchored to allow the user to click the browser Back button to go back to the previous frame (rather than the previous movie).

However, the keyboard back button is now acting as a browser back button.... Any ideas why?

Any help with - or solutions to this probelm - would be greatly appreciated.

Thanks in advance for your time.

Regards

Rob

Keyboard Back Button Acting As Browser Back Button
I'm currently implementing a subscription sign up form in Flash MX. All of the frames of the sign up movie are anchored so that the user can click Back on his/her browser and go back to the previous frame of the movie.

However, when the user now tries to delete/amend info (eg, first name, username, etc) on the form using his/her keyboard Back button, it triggers the browser Back button.

Anyone out there experienced a similar sort of problem - ie, why the keyboard Back button is acting as the Browser Back button?

If anyone has any ideas/solutions, I'd appreciate any input.

Cheers

Rob

Jumping From Swf To Swf? Help Please
Hello flashkit,

I have a flash movie that is too large. I want to break it up into 3 or 4 different swf. Is it possible, to have a "Mainpage" swf. in which the buttons link to various parts in other swf. movies. I do not want to have multiple swf. playing at once. For ex. On the mainpage there might be a button that says images. This button would link to another swf movie that is strictly about images.
The "Image" swf would replace the "Mainpage" swf. until you press the "back to main" button which would then take you back to the "Mainpage" swf
-- Another ex. is the "Mainpage" swf might have buttons that say "Images" and "Images2 ". Both of these buttons would link to the same "Images" swf, but different scenes or sections in the "Images" swf.
Is this possible, and if so can I have a button that says "main" inside the "images" swf that actually links back to the "Mainpage" swf. (I seriously hope you guys can understand what I am trying to say.)

All guidance would GREATLY appreciated, this is a major project that is due this week.

Jumping?
I have a character sprite, he can walk right and left perfectly. Now, how can i get him to jump? Could I simply play an animation of him jumping or, to make it more fluent how would I do it with gravity controls? Thanks alot

Jumping MC
I Need A Code That Makes A MC Jump And Falls Down To A Ground "Instance Name : ground"

Thanks

Does Anybody Know Jumping MC?
I Need To Know How To Make an MC Jump Then Hits The Ground

Thanks

Jumping From One Swf To Another
I currently have a movie on level 1 when you click a button another movie gets loaded onto level 2. I amusing the unloadMovie action to get rid of the movie on level 1. At the end the movie on level 1 everything looks the same as everything at the begining of the movie on level 2.

My problem is I can't seem to transition from one movie to another without the screen going white (level 0 background) for a split-second. What am I doing wrong?

Thanks

Jumping To An Url
I'm trying to jump from a flash movie to an html page, but I can't get the action to work. help!

Jumping Out Of Mc
I am using a buttton within a movie clip from which I want to jump to a frame on the main timeline (not within the clip). Now I'm using the 'go to' action but don't know what code to add.....do I need to use another action?

Seb

Jumping
Iv got this code:


Code:
onClipEvent (load) {
grav_y = 0;
jumping = false;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP) && !jumping) {
grav_y = 10;
jumping = true;
}
if (jumping == true) {
grav_y -= 1;
if (grav_y<=-7.5) {
grav_y = -7.5;
}
this._y -= grav_y;
}
if (_root.ground.hitTest(this._x, this._y, true)) {
grav_y = 0;
jumping = false;
}
}
when i press up it goes up a bit then falls forever

how do i stop this?

Jumping
Hey guys,
I built the site posted in my footer and I have checked it out on a couple of different computers...most works just fine, however, some of the computers display the movie very poorly...the movie jumps and slows down...why?

Jumping From Swf To Another Swf.. How?
as u can see www.karlaweb.tk . i've save the swf and i have decompiled it to see how it's done but i can't figure it out.

what i want is... u see,it seems the presentation is the same.... actually when u click certain buttons, it will jump to another swf (when a new preloader come out).

how to do that??

Jumping
Here is my command:

onClipEvent (enterFrame) { if (Key.isDown(Key.LEFT)) { _x = _x-10; } if (Key.isDown(Key.SPACE)) { _y = _y-70; release; _y = _y+70; } if (Key.isDown(Key.RIGHT)) { _x = _x+10; } if (Key.isDown(Key.DOWN)) { _y = _y+10; } }


Im trying to make it so when you press SPACEBAR you jump directly in the air and then come back down. All the movements work find im just trying to get this jumping thing done and I cant seem to do it.

Jumping
could someone please tell me the actionscripting to make a side scrolling character jump, or a tutorial that tells me. I would really apreciate it, thanx.

i'm using mx 2004

Jumping
could someone please tell me the actionscripting to make a side scrolling character jump, or a tutorial that tells me. I would really apreciate it, thanx.

i'm using mx 2004

Jumping
could someone please tell me the actionscripting to make a side scrolling character jump, or a tutorial that tells me. I would really apreciate it, thanx.

i'm using mx 2004

Jumping
How can I make a character jump in the scene and back to the floor by gavity?

if (Key.isDown(81) and jumping==0) {
jumping = 1;
starttime = getTimer()/1000;
startpos = _y;
}
if ( jumping==1) {
time = getTimer()/1000-starttime;
_y = _y-(startspeed-gravity*time);
if (_y>startpos) {
_y = startpos;
jumping = 0;
}
}
I use something like this script. The character can jump up but he will only jump up 1 pixel. I should continue to press jump button many times and then he will jump continuely.


any help is appreciate

Jumping
when ever the player jump he goes into the ground sometimes
how can i fix it

Code:

onClipEvent (load) {

jumping = true;
jump = 0;
speed = 0;
maxmove = 15;

}

onClipEvent (enterFrame) {
if (!_root.ground.hitTest(this._x, this._y, true) && !jumping) {

this._y += 4;

}
if (_root.dead) {

this.gotoAndStop("dead");

} else {

speed *= .85;
if (speed>0) {

dir = "right";

} else if (speed<0) {

dir = "left";

}
if (dir == "right"){

this._x += speed;


}
if (dir == "left") {

this._x += speed;


}
if (Key.isDown(Key.LEFT)) {

if (speed>-maxmove) {

speed--;

}
this.gotoAndStop("run");
this._xscale = -100;

} else if (Key.isDown(Key.RIGHT)) {

if (speed<maxmove) {

speed++;

}
this._xscale = 100;
this.gotoAndStop("run");

}

if (speed<1 && speed>-1 && !attacking) {

speed = 0;
this.gotoAndStop("idle");

}
if (Key.isDown(Key.UP) && !jumping) {

jumping = true;

}
if (jumping) {

this.gotoAndStop("jump");
this._y -= jump;
jump -= .5;
if (jump<0) {

falling = true;

}
if (jump<-10) {

jump = -10;

}
}
if (_root.ground.hitTest(this._x, this._y, true) && falling) {

jump = 8;
jumping = false;
falling = false;

}
if (speed<1 && speed>-1 && !attacking) {

speed = 0;
this.gotoAndStop("idle");

}

}

}

[F8] Jumping
Ok, it would be nice to have some jumping in my game, and it has many different heights so it has to be real jumping and gravity. I know pretty much the ins and outs of platformers, but I suck at jumping!

[F8] Jumping
What code should you make to jump and is there anything that goes with it?

[F8] Jumping
Ok, so this is probably an overasked question, but im confused on how to go about jumping. I have been able to make it possible to jump but, unfortunately it wasnt that good an enabled the player just to keep jumping in mid air.

Anyway, i re-wrote one and here is what i came up with

PHP Code:



/* CHARACTER MOVEMENT */
...
// Initial Vars
jump = 0;
speed = 10;
jumping = 0;
    /* JUMPING */
onEnterFrame = function () {
    function goJump(){
        onEnterFrame = function(){
            if(jumping == 1){
                dude._y -= speed;
                jump++;
                if(jump < 10){
                    speed *= 0.9;
                }else if(jump < 20){
                    speed *= 0.5;
                }else if(jump < 30){
                    speed--;
                }else if(jump < 40){
                    jumping--;
                    speed = 10;
                }
            }
        }
    }
    if (Key.isDown(87)) {
        jumping += 1;
        goJump();
    }
}




The problem is that after Jumping is set to 0, i cant push "W" to make it equal to 1 anymore. Please help! Thanks

[CS3] Jumping From One MC To Another MC?
Hi guys,

ok so I have two layers accompanied by frame labels, layer#1(frame label) has the main_mc in it, layer#2(frame label) has an intro_mc. I want when intro_mc is finished playing to jump to a specific frame inside main_mc.

I used this code in the last frame of intro_mc:


Code:
_root.gotoAndStop ("layer#1", 84)
it worked but it played the whole main_mc, but I want it to go to frame number 84 within main_mc

any advice?

Jumping Twice
hello people,

ive posted this problem everywhere except here so hopefully i can get some results, finally.

i have been trying to make one of my characters jump twice for a project im making, but i can only seem to get it to jump once or jump forever.

heres my code:

if (Key.isDown(Key.SPACE) && _root.ground.hitTest(_x, _y+3, true) && (jumping == false) && (jumping2 == false) && (grav == 0)) {

grav = -jumpHeight;
jumping = true;
_y -= 4;
this.gotoAndStop(2);
}

if (Key.isDown(Key.SPACE) && (jumping == true) && (jumping2 == false)) {
grav = -jumpHeight;
jumping2 = true;
}


thx, D

Jumping...
i'm making a platform game now... (gave up on my rpg one cuz i know i dont know enough yet) and i need help with a jumping code.
where can i find one?

Jumping
does anybody have some code that i could get a guy to jump with???





























Edited: 12/13/2006 at 09:51:04 AM by sk8morestudyless

Jumping From 1 To Another
i have an idea for a movie clip that might be a bit big. i was wondering if its possible to have serval external movie clip but have them in a chain reaction to load one to another and so on. if so , please guide me the way

Help With Jumping
hi i have this code
but he can jump as many times as he wants in a row.
then he can touch the sky... not realistic
does ne 1 know how i can make it so he can only jump 1 or 2 and a time?


inair = false
dude.ymov = 0
dude.xmov = 0
decay = .80
gravity = 1.5
jumping = 15
accel = 4
function jump() {
dude.ymov -= gravity;
if (!inair) {
if (Key.isDown(Key.SPACE)) {
dude.ymov = jumping;
}
}
}
function walkleft() {
if (Key.isDown(Key.LEFT) && !inair) {
dude.xmov -= accel
}
if (dude.xmov<-10) {
dude.xmov = -10
}

}
function walkright() {
if (Key.isDown(Key.RIGHT) && !inair) {
dude.xmov += accel
}
if (dude.xmov>10) {
dude.xmov = 10
}
}
onEnterFrame = function() {
if (!inair) {
dude.xmov *=decay
}
jump();
walkleft();
walkright();
dude._x += dude.xmov
dude._y -= dude.ymov

}

Jumping From MC To Other MC
Hello everybody!!
Im developing a website, and i'm facing a problem. I have a section for news, that is divided in months. The news section (news.swf) loads externally into MC "contents", and inside news.swf, each month loads into MC "months" (ex: july06.swf). I have all the news from july divided in frames, so i have news in frame 5, 6, 7, and so on!

My problem is:
I need to have a banner in the main timeline (where also MC "contents" is located), and i need that after pressing that banner, to go directly to an article that's in frame 7 of the july06.swf...

Is this possible? thanks for any help!!!!
cheers

Jumping Out Of Mc
I am using a buttton within a movie clip from which I want to jump to a frame on the main timeline (not within the clip). Now I'm using the 'go to' action but don't know what code to add.....do I need to use another action?

Seb

Jumping From 1 To Another
i have an idea for a movie clip that might be a bit big. i was wondering if its possible to have serval external movie clip but have them in a chain reaction to load one to another and so on. if so , please guide me the way

Play 3 Swf's Back To Back
Hey,

I'm working on a custom videoplayer and was wondering if anyone knows how to play 3 different swf's sequentially? I have a standard intro, the actual movie and an outro.

I keep experiencing strange results and was wondering if someone has done this before.

Thanks!

Copyright © 2005-08 www.BigResource.com, All rights reserved