www.webdeveloper.com
Results 1 to 8 of 8

Thread: Flash 5 and ip addresses

  1. #1
    Join Date
    Oct 2003
    Location
    uk
    Posts
    38

    Question Flash 5 and ip addresses

    I need to know how to print up someones IP Address in Flash 5.

    Can anyone please tell me how to do this I don't want a serverside language to do this cause the server hasn't got the capability to host them so please javascript or sumething please.

    And I need to know how to print up the date and time aswell please.

    Thank you.

    Crypto.

  2. #2
    Join Date
    Nov 2002
    Location
    Dartmoor [Holiday]
    Posts
    2,382
    You can't get the local IP address in plain JavaScript, and to the best of my knowledge you can't in ActionScript either. You need a server-side language of some kind.

    This tutorial explains how you can do dates and times.

    Adam
    "If youíre not using valid HTML, then you havenít created a Web page. You may have created something else, but it isnít a Web page." - Joe Clark

    Do something amazing (USA) | Make Poverty History

  3. #3
    Join Date
    Oct 2003
    Location
    uk
    Posts
    38
    Sorry I don't think i explained it correctly my flash movie has to be able to run on a web server with no server side languages and print up the users (remote) IP Adress (xxx.xxx.xxx.xxx) aswell as be able to print up the date (mm-dd-yy) and time (hh:mm:ss(24 hour clock)).

    Crypto

  4. #4
    Join Date
    Nov 2002
    Location
    Dartmoor [Holiday]
    Posts
    2,382
    You explained correctly, and I answered appropriately. To the best of my knowledge getting the remote IP address with client-side scripting is not possible. The date and time is covered in the tutorial I linked to.

    Adam
    "If youíre not using valid HTML, then you havenít created a Web page. You may have created something else, but it isnít a Web page." - Joe Clark

    Do something amazing (USA) | Make Poverty History

  5. #5
    Join Date
    Oct 2003
    Location
    uk
    Posts
    38
    Ok, Sorry I'm getting tirred I didn't see the link.

    And do you know what language flash uses is it VB?

    Crypto.

  6. #6
    Join Date
    Oct 2003
    Location
    uk
    Posts
    38
    Ok so how do you print the IP Address up on the screen with php?
    I have the Apache web srever and the php server all setup correctley.

    I know the php comand is echo $_SERVER['REMOTE_ADDR']; but how do I make flash 5 able to understand it and print it on the screen?

    Or can I make flash 5 able to read java script code ie. <script> foobar </script> cause i found some code that is suposed to print the ip address up in that.


    Crypto
    Last edited by crypto; 09-13-2004 at 05:02 PM.

  7. #7
    Join Date
    Nov 2002
    Location
    Dartmoor [Holiday]
    Posts
    2,382
    Flash uses ActionScript for scripting - it is very similar to JavaScript, but has objects suitable for manipulating Flash files rather than HTML pages. In addition, it is bytecode-compiled when you create a Flash file.

    I'm not an expert on Flash, but some of the others may be able to show you how to transfer data between PHP and Flash files.

    Adam
    "If youíre not using valid HTML, then you havenít created a Web page. You may have created something else, but it isnít a Web page." - Joe Clark

    Do something amazing (USA) | Make Poverty History

  8. #8
    Join Date
    Jun 2004
    Posts
    390
    Below is a method that illustrates how to communicate from ASP to Flash. The theory would be the exact same in PHP, with just a little syntax change.

    http://www.mikeweiner.com/trials.asp?trialType_id=1

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles