A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [RESOLVED] [MX04] Passing an array through flashvars?

  1. #1
    A Flurry of Activity
    Join Date
    Aug 2005
    Posts
    103

    [RESOLVED] [MX04] Passing an array through flashvars?

    Seems simple enough to me.

    Looking for something like this:

    Code:
    http://-path to swf-.swf?bgarray=["image1.jpg","image2.jpg","image3.jpg"]
    where image1, 2, and 3 are in the same directory as the flash. (or not, it should not have a problem either way...)

    used as the target of an embed tag.

    I looked up the adobe help files on passing arrays, and it seems that anything yiou can assign in flash is throwable through flashvars. However, copy and pasting my working in flash code for this array did not work, and testing iti by using text boxes showed undefined flashvars.

    Can someone give the correct syntax? I've looked extensively in the adobe help files and the adobe site
    maximum width 300 no more maximum hieght 40 no more not interchangable

  2. #2
    A Flurry of Activity
    Join Date
    Aug 2005
    Posts
    103

    asdf

    Resolved.

    Heres how:

    Pass it like this:

    Code:
    "http://-path to swf-.swf?arrayname=index1,index2,index3,index4...index10"
    Then in flash, add a line:

    Code:
    var arrayname:Array = arrayname.split(",");
    There. do that for all the arrays you want to send through flashvars, and you can now send all your arrays through flashvars.
    maximum width 300 no more maximum hieght 40 no more not interchangable

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