Skip to main content
Inspiring
October 11, 2006
Question

help me understand some base points of FCS

  • October 11, 2006
  • 4 replies
  • 348 views
hi all,

but i'm having some problems understanding the location of some things in
fcs

i did a little test with a simpleConnect, and the connectionLight. all
named, and the light associated in the simpleConnect properties and
specified the rmtp protocol.
my app name is is a.swf and is the rmtp protocol is
'rtmp://200.200.200.200/a' and there is a main.asc there.

my doubts:

- does the directory name created and specified in the rtmp need to be
*exactly equal* the app given name? why ?

- why do i need the main.asc file in the flashcomm <app name> directory, in
my case 'a' directory ?

the main.asc contents changes from app to app, is it normal? some i have
just a " load( "components.asc" ); " and some i have the
application.onConnect, and application.onConnectAccept.... how do i know
what i need in there?

i can see all the components '.asc' files in the flash comm scriptlib
directory, and i suppose they are used JUST when compiling the movie, right?


thank you.


    This topic has been closed for replies.

    4 replies

    Inspiring
    October 13, 2006
    i'm using a shared hosting and most of my clients will either. so modify the
    current version of an audioComponent will not be allowed , but what if i
    duplicate (just to dosen't have to reinvent the wheel) the audioComponent
    and do the improvements i need and use it?

    can i do that? and if i can where should i put the modified AudioComponent
    asc file? i guess the main.asc will have to load it just like the MM built
    in comps.


    thanks for the help,


    best,
    rod.


    "JayCharles" <webforumsuser@macromedia.com> escreveu na mensagem
    news:egoe0d$76o$1@forums.macromedia.com...
    > Correct... you will need access to your scriptlib files to modify them.
    > Are you
    > running your own FMS, or are you using shared hosting?
    >
    > Modifying the component asc files will affect other apps running on the
    > same
    > vHost. The solution to that one is to set up a separate vHost for your
    > app,
    > with it's own scriptlib directory (assuming you're running your own FMS...
    > if
    > you're not, you can't set up vHosts).
    >


    October 13, 2006
    Correct... you will need access to your scriptlib files to modify them. Are you running your own FMS, or are you using shared hosting?

    Modifying the component asc files will affect other apps running on the same vHost. The solution to that one is to set up a separate vHost for your app, with it's own scriptlib directory (assuming you're running your own FMS... if you're not, you can't set up vHosts).
    Inspiring
    October 11, 2006
    hi jay, thanks for the explanation, helped a lot.

    so the main.asc that has a load(components.asc) will load this file that
    actually loads all the component's asc. and make them avaliable to use, i
    guess it loads the files from the FCS Server that usually the user don't
    have access to change.

    what if i want to make some changes to those files (customize them), let's
    say put a new method or change something in the simpleconnect.asc file?
    i don't think i'll will be able to do because i don't have access to those
    files right?

    i'll look for the book you mentioned.

    best,
    rod.

    "JayCharles" <webforumsuser@macromedia.com> escreveu na mensagem
    news:egjbv1$r07$1@forums.macromedia.com...
    > Yes... the directory name is the application name, so it must match the
    > application name in your rtmp string exactly.
    >
    > The main.asc files (and all asc files for that matter) contain
    > actionscript
    > that will run on the server (those files are part of FMS, not part of
    > Flash).
    > They aren't compiled into the .swf
    >
    > When an application starts, it loads main.asc . In your case, main.asc is
    > needed to load the component classes from the scriptlib.
    >
    > The scriptlib contains the asc files the server requires to interact with
    > the
    > client side communication components.
    >
    > I'd suggest picking up a copy of "Programming Flash Communication Server"
    > (O'Reilly). It covers all of the basics, and it will give you an
    > understanding
    > of how client/server communication works.
    >
    >


    October 11, 2006
    Sure... the communication components and their asc files can be modified. The components are written in AS1, and all asc files are AS1, so if you're familiar with client side actionscript you should be able to handle making changes once you have a little more background in the client/server model.

    That said... I've found it's much easier to build your own components rather than mucking about with someone else's code.
    October 11, 2006
    Yes... the directory name is the application name, so it must match the application name in your rtmp string exactly.

    The main.asc files (and all asc files for that matter) contain actionscript that will run on the server (those files are part of FMS, not part of Flash). They aren't compiled into the .swf

    When an application starts, it loads main.asc . In your case, main.asc is needed to load the component classes from the scriptlib.

    The scriptlib contains the asc files the server requires to interact with the client side communication components (as well as some other things you don't need just yet).

    I'd suggest picking up a copy of "Programming Flash Communication Server" (O'Reilly). It covers all of the basics, and it will give you an understanding of how client/server communication works.