# Back button in flash

**URL:** <https://forum.kirupa.com/t/back-button-in-flash/13433>\
**Category:** Uncategorized\
**Created:** [February 13, 2003, 4:43am UTC](https://forum.kirupa.com/t/back-button-in-flash/13433 "2003-02-13T04:43:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rico](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@rico](https://forum.kirupa.com/u/rico)\
**Post date:** [February 13, 2003, 4:43am UTC](https://forum.kirupa.com/t/back-button-in-flash/13433/1 "2003-02-13T04:43:49Z")

</div>

hi,  
How to make “back button” in flash5 but the button is used to bring back the user to the last view of the html page? Thx…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 13, 2003, 5:10am UTC](https://forum.kirupa.com/t/back-button-in-flash/13433/2 "2003-02-13T05:10:55Z")

</div>

If I am understanding correctly you want to go back an html page right?

You can use javascript for that (in a getURL in Flash of course)

```auto
on (release){
getURL("java<I></I>script:history.back(-1)", "_self");
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 14, 2003, 10:35pm UTC](https://forum.kirupa.com/t/back-button-in-flash/13433/3 "2003-02-14T22:35:33Z")

</div>

hey lostinbeta, how do you know so much!?! anyway, i wanted to ask you what frame rate you use on your site, the slide works really well and is quite smooth

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 14, 2003, 10:39pm UTC](https://forum.kirupa.com/t/back-button-in-flash/13433/4 "2003-02-14T22:39:19Z")

</div>

I learned Javascript before I even heard about AS 🙂

And Frame Rate… hmmmm… 😉

My site is Javascript and DHTML using the scrollTo(x,y) function in Javascript (doesn’t work in NS :() so there is no frame rate, just a scroll speed.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 15, 2003, 1:37pm UTC](https://forum.kirupa.com/t/back-button-in-flash/13433/5 "2003-02-15T13:37:55Z")

</div>

:o guess I shoulda right mouse clicked . . .

you see, they outta make a law banning 18 year olds from doing this stuff, sort of like alcohol, sex and driving. they all gots laws so you don’t get too good at it too early (makes us old farts feel inadequate)

thanks for the info and i really like your site :elderly:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 15, 2003, 5:59pm UTC](https://forum.kirupa.com/t/back-button-in-flash/13433/6 "2003-02-15T17:59:32Z")

</div>

lol, well if it helps, I got a basic form of the script from someone else, and I modified it for my usage of 3 iframes 🙂 I am really bad at DHTML :(, but Javascript I am pretty good with I think :beam:

Thanks for the compliments 🙂

I like your site too, the right and bottom are cut off on my 800x600 monitor, and the content area isn’t defined it is just kind of there, but besides those, its pretty nice. I like the navi, its nice and clean and I like how it scrolls the image at the top 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 15, 2003, 7:54pm UTC](https://forum.kirupa.com/t/back-button-in-flash/13433/7 "2003-02-15T19:54:39Z")

</div>

yeah, the size was made for 1024 but with the hopes that most could see the main stuff and all the nav at 800

you are the first to critique my site (self-esteem too low to post it on site critique here)

what did you mean about the content just being out there? i placed it on a bright pic for a background but would love more feedback. i don’t have any art background and I need to do some type of transition for the background, like:

```php
function show(num) {
	//transition current content OR add new content
	var sections = ["main", "section_1", "section_2", "section_3"];
	if (typeof (currentNum) != "undefined" && num != currentNum) {
		_root[sections[currentNum]+"_mc"].gotoAndPlay("out");
	} else {
		_root.attachMovie(sections[num], sections[num]+"_mc", 1, {_x:10, _y:10});
	}
	currentNum = num;
	//show frame on active button
	for (var i = 1; i<=4; i++) {
		if (i != num+1) {
			_root["menuButton_"+i].frame._visible = false;
		}
	}
	_root["menuButton_"+(num+1)].frame._visible = true;
}
_global.outDone = function(target) {
	target.removeMovieClip();
	show(currentNum);
};
menuButton_1.buttonLabel.text = "Main";
menuButton_1.onRelease = function() {
	show(0);
};
menuButton_2.buttonLabel.text = "Section 1";
menuButton_2.onRelease = function() {
	show(1);
};
menuButton_3.buttonLabel.text = "Section 2";
menuButton_3.onRelease = function() {
	show(2);
};
menuButton_4.buttonLabel.text = "Section 3";
menuButton_4.onRelease = function() {
	show(3);
};

```

this is for moviclips but I need a way to apply it to my scenario,

anyway, any suggestions from you would carry a great deal of importance and would be well apprecia  
ted 👁

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 15, 2003, 8:04pm UTC](https://forum.kirupa.com/t/back-button-in-flash/13433/8 "2003-02-15T20:04:08Z")

</div>

Well I have to go real soon, so I don’t have time to figure out what to do with your code.

But what I meant about your content just being there is that there is a lot of empty area around your content box. I am thinking maybe just add a border there of or something, to defined the area better.

And OMG, I just noticed that subQuark actionscript button at the bottom… EXCELLENT IDEA!!! I am so about to copy you on that when I release my Flash site so people won’t constantly e-mail me the same questions over and over 🙂

You should definitely post your site in the Site Check section though 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 15, 2003, 8:29pm UTC](https://forum.kirupa.com/t/back-button-in-flash/13433/9 "2003-02-15T20:29:06Z")

</div>

copy away, all you like. the reason for the code is that i don’t have any real actionscript stuff to display (ie, experimental) and when i was contracted for a project a few months ago, they asked to see some code examples and my response was basically: doh!

so when i remade my site, i thought i’d do this to at least fake it a bit!

i’ll play around with the border idea, you’re right, allthe nav has a black border, so maybe the content should too. i never looked at it like that. see, i told you your input was good.

i guess i’ll post on the site critique when this transition thing is figured out (non-destructive refresh as Robert Reinhardt puts it, it’s his code up there), but I think I may have to put the section backgrounds in the main swf to use this type of code, rather than in each loaded swf

thanks again for the **great** input

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 15, 2003, 11:50pm UTC](https://forum.kirupa.com/t/back-button-in-flash/13433/10 "2003-02-15T23:50:01Z")

</div>

no problem man 🙂
