sending variable question
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: sending variable question

  1. #1
    Junior Member
    Join Date
    Oct 2002
    Location
    ¿
    Posts
    28

    sending variable question

    sending a variable to main MC that is nested in a MC on a external MC

    I want to send a variable from within a MC, on a external MC that
    is loaded into my main movie. I have been able to send a variable to my main movie if the varible is on the main of the external SWF

    (using code below on button on main, in the external MC)
    _parent.tempvar = "externalMC.swf";

    (code on main MC to load externalMC.swf)
    loadMovie (_parent.tempvar, _root.container3);
    Last edited by deride; 01-13-2003 at 04:55 PM.

  2. #2
    Super Moderator
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    it's all a question on finding the path to that variable. you problem sounds more like "retreiving" the variable than "sending". to send just say:
    var tempvar="somevalue";
    to retreive you need the path of that var (the "address" of the timeline where that variable was set).
    examples:

    _parent.tempvar <- means the variable tempvar is one clip below.

    _parent._parent.tempvar <- means the variable tempvar is two clip below.

    _level1.someMC.tempvar <- means the variable tempvar is in a MC with instance name "someMC" on _level1

    etc..
    gparis

  3. #3
    Junior Member
    Join Date
    Oct 2002
    Location
    ¿
    Posts
    28
    gparis thank you for clearing things up for me. I was able to get everything to work correctly after you cleared up those terms for me. Thanks again for your quality help.

  4. #4
    Super Moderator
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    you're welcome
    gparis

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

Poll by Flashkit.com