A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: how to create an array in Flash4?

  1. #1
    Junior Member
    Join Date
    Feb 2001
    Posts
    8
    Hi,

    i need an array for storing some math things I calculated before. I am using Flash5, but I have to do that for a typical Browser, i.e. just with the Flash4-plugin.

    Is there any way I can create an array for flash4?

    Or is there anyone out there who has got the big solution?

    Is there any possible way to get my flash5-stuff ready for flash4-browsers?

    I dont want to do an flash5-thing, because the majority of you is still using flash4-compatible browsers.

    Please mail, poste, ect. any kind of infos, hints, links...

    thanx

    Mike

    guy_micha@hotmail.com

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Location
    Not on the dole any more
    Posts
    1,040
    You can simulate an array in Flash4 using sequentially-numbered variables. So for example:

    Code:
    Set Variable: "name1" = "Bob"
    Set Variable: "name2" = "Ben"
    Set Variable: "name3" = "Bill"
    Set Variable: "random_number" = random (3) + 1
    Set Variable: "random_name" = Eval("name"&random_number)
    ...this creates an 'array' of three names, then picks one at random by generating a random number and appending it to the string "name" using '&'.

    Hope this makes sense.

  3. #3
    Junior Member
    Join Date
    Feb 2001
    Posts
    8

    thanks a lot

    seems that Flash5 is the much more powerful tool.

    Mike

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