Click to See Complete Forum and Search --> : FS Command Example

12-13-2000, 09:34 PM
We have sucess!!!

This is an example of HTML/Javascript buttons controling a SWF with the Goto Frame command.


You see Flash 3 relied on this interaction with Javascript for its scripting abilities. A Preloader will be possible soon.

Will write more about this when I finish exploring FS Commands.

12-13-2000, 10:08 PM
This is not a cross browser script. I made it and tested for IE. NS users will not be able to use this script becuase it calls the DOM diferently than IE.

12-13-2000, 11:14 PM
Thanks for the work. I'm looking forward to being able to incorporate some of this stuff into one or two of my own projects.

Just in case Bob checks in, is the "if frame loaded" command on the docket any time soon?

12-13-2000, 11:25 PM
I hope so. I posted a Javascript/FS Command script not to long ago.

I really need to make a footer.

12-14-2000, 12:16 AM
You could kind of jury rig something like a preloader in KoolMoves by-

Create a .swf have it load into level 0
Create another .swf have it load into level 1, make this .swf your preloading looping sequence.

The .swf in level 0 will play and at the end of its playing have it unload movie in level 1, this will remove the preloader and have your page loaded and everything.

You could vary this and have all sorts of things happen, have different movies load and unload as the page is loading.

Johnie-looks awesome, I kind of understand that script, with this couldn't you easily incorporate some sort of search within the flash.

Thanks for sharing Johnie

12-14-2000, 12:26 AM

To be honest I would have never have thought about this if you hadn't posted your Preloader question. Monkey pants also helped by telling us how to send Javascript commands out.

You can also make games with this. I double Posted in the Swish Forum becuase I wanted David Michies input on FS Commands. I got no reply from David and Bob claims he doesn't know about FS commands so I checked the Open SWF board and did see a post by JAEzell in Open SWF about Flash 5 FS commands being executed through the Get URL command. It didn't take me long to put two and two together after reading up on FS commands made it work. FS Commands are nothing more than Flash settings vars for javascript with the get URL action and putting a fancy name on it.

The double post in the Swish Forum.


12-14-2000, 07:26 AM
I'm glad I could be of some help. I was just trying to get KM to do what I saw the tuts on Flash doing is all.

I really like the idea of having a tab in the prog itself that would help with coding variables though. But that's my left brain squawking agin. I'm off to hit that learning curve again.

thanks again johnie.

Bob Hartzell
12-14-2000, 08:02 AM
Just in case Bob checks in, is the "if frame loaded" command on the docket any time soon?
-> I was not intending to implement it soon but it is on my list. The problem with this command it is the only command, I believe, that requires an IF END type structure.

12-14-2000, 10:20 AM
Here's one more FS Commands tutorial I ran across. I don't think it was in johnie's other post about tutorials. I found this one to be very good. It's also been updated recently (Nov. 14).


I'm also thinking about how to use this idea for a possible search function.

On the "if frame loaded" thing: A couple of months ago I stumbled onto Swish and bought it, then found this forum and KM and bought it too. At first, I tended to use Swish more because I found it easier. (Not that KM is hard to use, but I, for some reason, saw Swish as very simple.) Now, as I have learned more about how to do things in KM, I tend to use it more, even for non-cartoon stuff like that EBS site I'm doing. There are really only two things that I miss from Swish and would love to see in KM:

1. The "if frame loaded" command. It just makes it so easy to make a customised preloader.

2. The other one is the ability to scale an imported image without it tiling. (Maybe this is possible and I'm just not doing it right.)

If I had these two things, (I'm so greedy) then I would rarely if ever consider using Swish for a project. But I realize that these two don't necessarily reflect the priorities for the program, so I usually come up with work-arounds.

Jeez, do I always have to write a book? Sorry my posts are always so long.

Bob Hartzell
12-14-2000, 01:01 PM
#2 should be in the next release.

12-14-2000, 07:55 PM
This is some more on FS Commands:

To send messages when a button is clicked or when a certain frame in a movie is reached, use a psuedo-URL with the prefix FSCommand: in the GetURL button or frame action. The text following the FSCommand: in the URL box is called the command string and the text in the target box is called the args string. These strings are passed to your JavaScript code and can be used for any purpose you need. To respond to FSCommand messages in JavaScript, you should include the code as shown below.

Put the following VB Script code into the HEAD element of your document, making sure to change the word "testmovie" to the name you gave your movie in your OBJECT and EMBED tags:

// Catch FS Commands in IE, and pass them to the corresponding JavaScript function.

Sub testmovie_FSCommand(ByVal command, ByVal args)
call testmovie_DoFSCommand(command, args)
end sub


WARNING! The "FSCommand:" syntax does not allow you to execute a function call in the same manner as using "javascript:". FSCommand: may pass only two strings to the NAME/ID_doFSCommand(command, args) function. The string immediately following FSCommand:(no space) in the Network URL field of the Get URL dialog is passed to the variable "command" as an argument to the doFSCommand function. Any characters entered in the Target field of the Get URL dialog are passed to the variable "args". To execute a function call, evaluate the string contained in the "command" variable and execute the desired function call if it contains the desired value. This technique must be used when FSCommand: passes more than one possible command string, since only one function (NAME/ID_doFSCommand) will respond to the FSCommand: event.

12-14-2000, 10:08 PM
These are the Projector FS Commands

Remember to start it with FScommand:

In Get URL: IN Target

Quit Nothing
FullScreen True/False
AllowScale True/False
ShowMenu True/False
Exec file Path

All of the have been tested in Kool Moves and in Swish and they all work.