A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Need help decoding a piece of script

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Posts
    1

    Need help decoding a piece of script

    No, this isn't my script, I just really need to figure out exactly how to understand part of it.


    var i = 1;
    while (i <= 3)
    {
    var t = attachMovie("photo", "photo" + i, i, {_x: Stage.width / 2 - 200 + Math.random() * 400, _y: Stage.height / 2 - 200 + Math.random() * 400, _rotation: -45 + Math.random() * 90});
    t.init("pic_" + i + ".swf");
    ++i;
    }

    stop();


    That's the full script. What I really need, is to know what file-name it is trying to point too. Logically, it was pointing at pic_1.swf or pic_2.swf or pic_3.swf, from what I know. But that didn't work.

  2. #2
    Senior Member indogo's Avatar
    Join Date
    Dec 2005
    Posts
    282
    Logically, it was pointing at pic_1.swf or pic_2.swf or pic_3.swf
    correct....
    If the swf is embedded in a webpage then the file location will be relative to the html and not necessarily the swf..otherwise the problem could lie elsewhere

    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