|
|
|
|
![]() ![]() |
Oct 13 2005, 12:04 AM
Post
#1
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 19 Joined: 6-October 05 Member No.: 8,952 |
hi all. my problem is this. i'm creating a flash website and so far it is going ok. anyway, i'm creating different scenes for different pages and i'm not sure how to link the buttons i'v created to go to a specified scene/page. i know a scripting code to link a button to go to the next/prev scene, but i need to know how to make it go to a specified scene/page. if you know how to do this, please let me know. thanks in advance, i really would love that.
-paul This post has been edited by HTML_Guru: Oct 13 2005, 04:19 AM |
|
|
|
Oct 13 2005, 01:06 AM
Post
#2
|
|
|
Super Member Group: Members Posts: 572 Joined: 25-April 05 From: Nashville Tennessee Member No.: 4,340 |
That would be done by using a document link to the scene or whatever you call it all you need to do is place an anchor to that scene or page then you would link to that anchor by calling its name the one you gave to the anchor.
Here is an example for a scene that is one the same page in that scene lets call it <allattributesofsomething.swf> then you would enclose this .swf with a named anchor as shown below: CODE <a name="youranchorname"><allattributesofsomething.swf></a> Ok that is now an anchor then wherever your button is you would enclose it with CODE <a href= "#youranchorname">your button</a> Npw provided that these are on the same web page when a user clicks the nutton it looks for the anchor named youranchorname and runs it, if it were on a different page though just accesss it like the next little bit of code; CODE <a href="otherpage.html#anchorname">your button</a> This should have you linking to any page that you have control over because you are the one that decides where you need these anchors, and of course you are the one that names them so I would make them pretty descriptive if you have alot of them, stuff like anchor1 anchor2, anchor3 would get hard to keep track of. Just remeber that the # lets the code know that it is looking for a named anchor so don't forget the # when you try to access your anchor or it won't work |
|
|
|
Oct 13 2005, 03:02 PM
Post
#3
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 19 Joined: 6-October 05 Member No.: 8,952 |
and where would i input these codes? in the script panel?
|
|
|
|
Oct 13 2005, 03:04 PM
Post
#4
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 19 Joined: 6-October 05 Member No.: 8,952 |
ok i'm confused. can you walk me step by step?
|
|
|
|
Oct 13 2005, 08:54 PM
Post
#5
|
|
|
Super Member Group: Members Posts: 572 Joined: 25-April 05 From: Nashville Tennessee Member No.: 4,340 |
The link to the named anchor should surrond your button so that it looks for the named anchor. so lets say you use the html for a form button like below:
CODE <a href="#Scene1"><input type="submit" value="See Scene 1"></a> That will make the button a link to an anchor somewhere in your document then you would enclose the script that you want them to view within then named anchor, in this case I refered to it as "Scene1" so the named anchor would kinda look like this. CODE <a name="Scene1">The script for your scene or whatever would be here.... ................................................................................ ~ to end of script</a> The script would go between the open and closing named anchor in the case <a name="Scene1> and </a> and it should work if you had some code to show for the actual scene or whatever I could make it clearer and also some code that kind of showed your main page or content. |
|
|
|
Mar 7 2008, 02:56 PM
Post
#6
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
Replying to Houdini
This is a little long winded isn't it? Whats wrong with just putting the code: On (press) { GotoSceneAndPlay("Scene_5",1); } In this example this would link the button to 'Scene 5' -reply by the_drummer |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
Lo-Fi Version | Time is now: 4th July 2008 - 03:15 AM |