Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Javascript variable setting
From: Marc Pidoux
Date: Fri, 12 May 2000 03:01:00 +0100

Well,

I will need to see all what you have to check it (the fla, the html page & the
text file).

But if i try to guest,
1. you have a variable in your flash film called "textfile" and
2. a button with GetURL where URL is:
javascript:Loadtext();

What text do you want to load? Is it always the same taken from a text file?

If yes, change the way you do it. on your button put a Load Variables into
Location Action where URL is "Mstep.txt".
In your Mstep.txt file, write exactly this line:
textfile=here come your text

If no, your Javascript has to be like:

<script>
function Loadtext() {
window.document.university.SetVariable("textfile", "Scott");
}
</script>

Not sure how to ask Javascript to load a text file but Flash do it much better.

Cheers

Marc

N.B. Feel free to send me your files if you wish. I'll have a look at it.

Scott Jeppesen wrote:

> It works great in IE but it isn't working in Netscape. I'm not using
> FSCommands just a GetURL calling a function. I just created a function as
> shown below:
>
> function Loadtext() {
> var ie = navigator.appName.indexOf("Microsoft") != -1;
> var MultiStep = (ie ? window.MultiStep : window.document.MultiStep);
> MultiStep.SetVariable ("textfile", "Mstep.txt");
> }
> </script>
>
> Why isn't it working in Netscape and how do I fix it?
> Oh yes...why does Netscape have to exist? Argh! heh
>
> -----Original Message-----
> From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of Marc
> Pidoux
> Sent: Thursday, May 11, 2000 5:53 PM
> To: flasheratchinwag [dot] com
> Subject: Re: FLASH: Javascript variable setting
>
> 4 ways at least:
>
> 1. Generator (or SwiftGenerator) is the best way because it doesn't have the
> javascript problems...but i don't think it is your question!
>
> 2. FSCommand is the official way to do it, see page 182 of the book.
> Basicly, you have to call the jscript function
> theMovie_DoFSCommand(command,arg), where "theMovie" is the name of your
> movie.
> I don't like this way to much because then you have, in your Flash film, to
> place an FSCommand.
>
> 3. Use the Load variable action to load it from a text file.
>
> 4. Finally, the easiest assuming your movie is called "university" and your
> flash variable "access",
> just write: window.document.university.SetVariable("access", "Scott");
> You can change "Scott" by "url" without the "" and set a javascript variable
> called "url" as well.
>
> Just ask me if it's not clear enough.
>
> Cheers
>
> Marc
>
> Scott Jeppesen wrote:
>
> > If I want to set a flash variable in a Javascript function how would I do
> > it? For example: I want to have different html files with the same .swf
> > embedded into them. However.....the variable I set in the Javascript tells
> > the .swf which text file it should load(all info in the swf is coming from
> a
> > text file). I just want to have 1 swf file. What is the Javascript code to
> > send that variable to the swf?
> >
> > SJ
> >
> > 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 helpatchinwag [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 helpatchinwag [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 helpatchinwag [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 helpatchinwag [dot] com


Replies
  RE: FLASH: Javascript variable setting, Scott Jeppesen

Replies
  RE: FLASH: Javascript variable setting, Scott Jeppesen

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]