A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: load variables from LAN

  1. #1
    Senior Member dipkya's Avatar
    Join Date
    Mar 2001
    Location
    Mumbai (India)
    Posts
    158
    Hi

    Does anyone know how to load variables from txt file which
    is on different machine.
    I want to make a CD presentation which will be working on
    local area network(LAN).
    So one machine will be having all the variables and other machine will access that.
    Thanking you in advance

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi dipkya,

    just run a webserver on the box with the variables, and you are set

    Musicman

  3. #3
    Senior Member dipkya's Avatar
    Join Date
    Mar 2001
    Location
    Mumbai (India)
    Posts
    158

    Smile

    Ok! Sounds good Music man...(it works you mean to say)
    But It would be more clear if you tell me how
    A little explanation pls.
    Thanx

  4. #4
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    I've got a small lan, let's say two computers "John" and "Mary". The computers all have fixed IP's like 192.168.1.1, 192.168.1.2, etc.
    Every computer has got the same hosts file
    john 192.168.1.1
    mary 192.168.1.2
    etc. Now, john is running apache and has got its ServerName set to "john". Every computer on the lan can access files in john's wwwroot directory as http://john/project1/test.swf etc. If you are running windows, you can use either PWS or IIS instead of Apache, if you prefer. Make sure to configure a firewall - whenever you are connected to the internet, you will get "Code red" and "sircam" type requests to your webserver

    Musicman

  5. #5
    Senior Member dipkya's Avatar
    Join Date
    Mar 2001
    Location
    Mumbai (India)
    Posts
    158
    Hi Musicman
    Can it be done without using PWS.
    i am using the following syntax as file://c:/something.txt
    now when i run this swf file thro network it doesnt work since it
    wont find the file in the accessing maching , now i wanted to have the
    syntax proper in this case ( like how we have it in find files...)
    \\machine_name\direname\.... )

    i tried to use file://<machinename>/c:/something.txt but didnt work .


  6. #6
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    I guess you would have to map a drive letter to the machine. Another one to try could be file://machinename//.... - but, honestly, I do not know. I am working in a unix environment, and there are webservers all over the place

    Musicman

  7. #7
    Senior Member dipkya's Avatar
    Join Date
    Mar 2001
    Location
    Mumbai (India)
    Posts
    158
    Hi,
    Right now I am using PWS. It is working fine.
    But still I could not understand where to put my txt file
    (variables)on host machines c:drive or every individual machine's c:drive. As I tried this but no luck so far....
    I have used this action:
    loadVariablesNum("file://c:/something.txt,0)
    It works if you run this swf file from network but fails to perform from PWS.
    Pls guide.......

  8. #8
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    you would put the movie and the text file in, e.g., john's wwwroot folder and refer to them as http://john/movie.swf and http://john/textfile.txt

    Musicman

  9. #9
    Senior Member
    Join Date
    Mar 2000
    Posts
    182
    loadVariables ("//Servoar/Txtfiles/news.txt", "_root.newsclip");


    Servoar: replace with name of comp you are reaching

    All others are folder/file names

    That is it!

    Make sure that this txt file is stored on a machine that is constantly turned on, if Flash cannot access that file, it will pause for a long time (i guess it is retrying) and then go on.

    Now what i want to know is how to return to that txt files some text/vars... anyone??

  10. #10
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi daemon,

    at least to send vars back you will definitely want to use a webserver with a script ....

    Musicman

  11. #11
    Senior Member dipkya's Avatar
    Join Date
    Mar 2001
    Location
    Mumbai (India)
    Posts
    158
    Hi Musicman & daemon,
    So in both the cases I have to know the host machines name to get the variables?
    So unless and untill I know that I cant put action??
    This cd presentation is on clients machine and I dont know what kind of machine client has.
    So now how will I use this action?
    Thanx for your support......Pls guide

  12. #12
    Senior Member
    Join Date
    Mar 2000
    Posts
    182
    No go then....

    you need exact path to vars .. otherwise you cannot get them.
    Because there might be other comps in LAN that have same folder names. So you need machine name. And if you are in LAN with a computert you can always get his name. (my network places etc..)

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