dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Multiple instance of a flashMX file

  1. #1
    Member
    Join Date
    Apr 2000
    Posts
    74

    Multiple instance of a flashMX file

    I want to create a chat element, but I would like to re-use the element for certain departments. Dept A would have their own app, dept. B has there own.
    Can I create a base project and then just keep it on a seperate location on the server or can I pass a dept. value to the app and make it behave like its own independant version, even though there is only one copy on the server?
    Any thoughts on how to accomplish this?

    Thanks in advance.

  2. #2
    Shhh! monkeypants's Avatar
    Join Date
    Aug 2000
    Posts
    2,321
    I've been doing that by just using a variable to identify the rtmp address and using the same Flash file to handle all of the application instances. Then you just need to have separate folders in your applications directory to handle the separate chats.
    "Rock-n-Roll is dead. These days it's all about bling bling...pinky ring" -Marky Mark

  3. #3
    Junior Member
    Join Date
    Jul 2003
    Posts
    6

    Another way?

    Also if I understand you, you can just add an instance name at the end of the url you are pointing the app to.

    example: You are doing this

    rtmp://yourserver.com/app_name

    Instead do this

    rtmp://yourserver.com/app_name/instance_name

    The instance name doesn't need to be defined or declared anywhere else. Flash just seems to know that the thing after the url and app directory is going to be an instance name and spawns one accordingly.

    You could also use a variable like room_var as the instance name so that you get a new instance every time you open the room by having the variable add +1 to it's value each time the room is spawned or whatever you want it do.
    Last edited by Planetnetwork; 07-23-2003 at 01:55 AM.

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