Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | RE: FLASH: Javascript variable setting |
| From: | Scott Jeppesen |
| Date: | Fri, 12 May 2000 03:15:27 +0100 |
I haven't been clear. I know very well how to load variables from txt and
asp files as I have done it many times. What I want to do is this:
I am building "online quizzes"
All of them look the same so I want to use 1 swiff file. All of the text
files are in one directory and therefore have different names. The
Javascript variable I am setting is going to tell the Flash file which of
those text files it is supposed to load. In the 1st frame of the movie it
gets the Javascript variable...in the 5th frame it Loads the variables from
the text file with that name. This will allow me to change one swiff and all
of my exercises will change. It works perfect in IE. I just can't figure out
why it isn't working in Netscape.
Thanks.
-----Original Message-----
From: owner
Pidoux
Sent: Thursday, May 11, 2000 6:47 PM
To: flasher
Subject: Re: FLASH: Javascript variable setting
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: owner
> Pidoux
> Sent: Thursday, May 11, 2000 5:53 PM
> To: flasher
> 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 help
>
> 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 help
>
> 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 help
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 help
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 help
Replies
Re: FLASH: Javascript variable setting, Helen Triolo
Replies
Re: FLASH: Javascript variable setting, Marc Pidoux
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

