This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > May 2004 > getURL()





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author getURL()
Geeke

2004-05-18, 7:38 pm

How do I use this function to link a button (when pushed on) to a url...the
page is a subpage of my homepage and it has to be loaded in the same browser.
So I use one homepage and in the middle of it the pages switch according to the
link you clicked on. e.g When you click on Home the link has to be
index.php?page=Home

Tnx
Gee

privatenews.microsoft.com

2004-05-18, 7:38 pm

Are you using frames?

if so then use this:

getURL("page.htm", "targetframe");

replace page.htm with the name of the page you are using and targetframe with the name of the frame you are using.


"Geeke" <webforumsuser@macromedia.com> wrote in message news:c89r6m$e1i$1@forums.macromedia.com...
> How do I use this function to link a button (when pushed on) to a url...the
> page is a subpage of my homepage and it has to be loaded in the same browser.
> So I use one homepage and in the middle of it the pages switch according to the
> link you clicked on. e.g When you click on Home the link has to be
> index.php?page=Home
>
> Tnx
> Gee
>

anishu

2004-05-18, 7:38 pm

on (release) {
getURL("index.php", "home");
}

Geeke

2004-05-18, 7:38 pm

So I think I understand it, correct me if I'm wrong.
in the function getURL() I need to declare 3 things
the page to which I refer, the way to show it (_paretn,_blank,...) and the
method
In the page I put index.php
In the second part...what do I have to put?? _parent???
and the method shall be GET I guess, but then I have to declare a variable
is it the same as in php?? $page = 'Home' ; ???

Gee

privatenews.microsoft.com

2004-05-18, 7:38 pm

it all depends on wether you are using frames or not, the _self will open
the page in the current window, _blank in a new window
_parent open in the top level of frameset.

Are you using frames??

if you are then you have a name for each frame in the index (or parent
frame) i.e. "top" "main" for two frames, I have a movie where i require
navigation elements to affect the main frame as the movie plays in the top
frame. the index or parent contains a frameset:

index.htm, top.htm and main.htm are actual pages topFrame and mainFrame are
the names that you will refer to when actually navigating:

<frameset rows="280,*" cols="800" framespacing="0" frameborder="NO"
border="0">
<frame src="top.htm" name="topFrame" scrolling="NO">
<frame src="main.htm" name="mainFrame" scrolling="NO">
</frameset>

therefore if i want to change the mainframe whilst leaving the topframe
untouched I would use:

on (release) {
gotoAndPlay("Dorchester exp", 1); // this line plays the movie at scene
"Dorchester exp", "frame1"
}

then in the first frame of the Dorchester exp i unsert this line

getURL("dorchester.htm", "mainFrame"); // calls the page dorchester.htm and
updates mainFrame to show its content

This can be simplified further

on (release) {
gotoAndPlay("Dorchester exp", 1);
getURL("dorchester.htm", "mainFrame");
}

broken down like this:

gotoAndPlay goes to the part of the movie you want to show when the button
is pressed

dorchester.htm is the page that you are calling and here it assumes that it
is in the same directory as the swf file if not a relative path must be
inserted:

yourpath/dorchester.htm

mainFrame is the frame that is to be updated with the new page on my site it
is the lower frame

"Geeke" <webforumsuser@macromedia.com> wrote in message
news:c8a38m$q9c$1@forums.macromedia.com...
> So I think I understand it, correct me if I'm wrong.
> in the function getURL() I need to declare 3 things
> the page to which I refer, the way to show it (_paretn,_blank,...) and th

e
> method
> In the page I put index.php
> In the second part...what do I have to put?? _parent???
> and the method shall be GET I guess, but then I have to declare a

variable
> is it the same as in php?? $page = 'Home' ; ???
>
> Gee
>



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews