A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: FS Command Example

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    We have sucess!!!

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

    http://www.geocities.com/jsnider.geo/flashfile.html



    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.

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    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.

  3. #3
    Senior Member evolbeagle's Avatar
    Join Date
    Oct 2000
    Location
    Nashville, TN
    Posts
    355
    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?

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    I hope so. I posted a Javascript/FS Command script not to long ago.

    I really need to make a footer.

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Posts
    766
    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
    Brad

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    Exactly.

    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.

    http://www.flashkit.com/board/showth...threadid=69995

  7. #7
    Junior Member
    Join Date
    Dec 2000
    Posts
    17

    FS-Commands

    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.

  8. #8
    Super Moderator
    Join Date
    Jun 2000
    Posts
    3,494
    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.

  9. #9
    Senior Member evolbeagle's Avatar
    Join Date
    Oct 2000
    Location
    Nashville, TN
    Posts
    355
    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).

    http://www.moock.org/webdesign/flash/fscommand/

    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.

  10. #10
    Super Moderator
    Join Date
    Jun 2000
    Posts
    3,494
    #2 should be in the next release.

  11. #11
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087

    More opn FS Commands

    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:

    <SCRIPT LANGUAGE="VBScript">
    <!--
    // 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

    //-->
    </SCRIPT>




    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 FSCommandno 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. #12
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    These are the Projector FS Commands


    Remember to start it with FScommand:
    Code:
    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.

    -Enjoy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center