Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: telling a swf what html file it's in |
From: | Marc Pidoux |
Date: | Wed, 17 May 2000 14:55:57 +0100 |
Possible with JavaScript for exemple.
First, to determinate which page it is on, you should use :
document.location.href, which will return the full url.
Then you should setup this as a variable (let's call it "which_page")
Finally you should send this variable to flash using (you can use the FSCommand
as well):
window.document.myFlash.SetVariable("which_page", which_page), where "myFlash"
is the name of your flash film.
That's all for the javascript part.
Now from Flash, you should on the first frame put a text box with a variable and
call it "which_page". Then a little "if-then" scenario according to what you
want.
Basicly it should look like :
If "which_page" = "http://www.steven.com/1page.htm"
Then goto frame 5
Else if "whicch_page" = "http://www.steven.com/2page.htm"
Goto frame 10
Else
Goto frame 20
And that's all !!!
I don't have to much time to tell you exactly word by word what you should do,
just try it and if it's not clear enough, ask me again.
Cheers
Marc
Steven Shand wrote:
> I'm sure I read a while ago that you could feed a variable back to a swf
> from an HTML file. My swf will be loaded into a few different html pages and
> I need the swf to display a different property depending on what HTML file
> it's in. Is this possible.
>
> I thought I read about it in the context of disabling a swf if it wasn't in
> a specified HTML file for security reasons, so no-one could steal your swf
> and use it in another page.
>
> Does this make sense?!? I've tried to hunt some info down from various
> sources but no luck. I'd appreciate some help or pointers.
>
> tia
>
> Steven
>
> --
>
> Steven Shand
> Sferics Ltd
> Technical Solutions
>
> 0131 272 2707 speak
> 0131 272 2800 fax
>
> flasher is generously supported by...
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Get the last 100 messages from the flasher list NOW
> http://www.chinwag.com/flasher/last100.shtml
>
> Flash books http://www.chinwag.com/flasher/books.shtml
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpchinwag [dot] com
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml
Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: telling a swf what html file it's, Steven Shand
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]