A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [RESOLVED] Functions Delema

Threaded View

  1. #1
    It's not 1997 ?! mrgrim333's Avatar
    Join Date
    Feb 2004
    Posts
    254

    resolved [RESOLVED] Functions Delema

    So, how do I explain this?...
    I'm working with all dynamic stuff.

    On the main frame, I have a function, with parameters.
    Each tile (there's 25), holds it's own call on the function.

    Main Frame Function
    Code:
    function tilePlant(plant,id,level,plantStrand){
    //do stuff
    return plant;
    }
    Call of the function
    Code:
    on (release) {
    	_root.a1[1] = _root.tilePlant (_root.a1[1],1,11,_root.plant1[4]);
              // _root.a2[1] = _root.tilePlant (_root.a2[1],2,12),_root.plant2[4];
              // _root.a3[1] = _root.tilePlant (_root.a3[1],3,13),_root.plant3[4];
              // ect..
    }
    So, I need to call the function from an external button that works for all 25.
    But I can't specify the call of the function from there, it breaks the dynamics.

    Could I like, somehow send the call of the function to the button somehow?
    like
    Code:
    sender = "_root.a1[1] = _root.tilePlant (_root.a1[1],1,11),_root.plant1[4];";
    and call the sender?

    Does that make sense? Or am I a babbling fool?
    Last edited by mrgrim333; 11-30-2009 at 08:07 PM.
    Man, I need a new signature.

Tags for this Thread

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