dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: problem with mc properties

  1. #1
    Junior Member
    Join Date
    Jul 2000
    Posts
    5

    I don't know if i'm wrong but i've noticed a strange behaviour of the "createEmptyMovieClip" method.
    I attached 3 empty mc to another called "css" located on the _root, now inside each of the 3 mc created, i create a new empty movieclip with "createEmptyMovieClip" method.
    After this i draw with the drawing methods (moveto, lineto, bla, bla...) inside every new mc a box (for example) of 100x100. When I ask for some properties of the last mc (containing the drawed box) like _width, _height it returns a nice zero!
    So for example I have:
    trace(_root.css.win1.box._width); // returns zero
    trace(_root.css.win2.box._width); // returns zero
    trace(_root.css.win3.box._width); // returns zero

    css is an empty instance, win1-3 are instances created linking to a library clip (that's empty too)

    Why does it happens?
    maybe too much emptiness...

    thank

    aoxomoxoa




  2. #2
    HELP>>>ACTIONSCRIPT DICTIONARY
    Join Date
    Feb 2000
    Location
    In the Present Moment
    Posts
    1,041
    It's possible that you aren't targeting the proper clipName to get the _width from. Can you show the code you use to create the clips that you are trying to get the _width from? I think you have a path problem, make sure that everything is named correctly.

    Good Luck!

  3. #3
    Junior Member
    Join Date
    Jul 2000
    Posts
    5

    resolved

    I think the code is a little bit longer to put here, can I send you an email?

  4. #4
    HELP>>>ACTIONSCRIPT DICTIONARY
    Join Date
    Feb 2000
    Location
    In the Present Moment
    Posts
    1,041
    You can email me the code or post a zipped .fla that I can download on your site and let me see what I can do. Whatever you feel more comfortable with.

    Now let me ask you this, when you testMovie if you list your objects (after the empty clips are created) do you see

    _root.css.win1.box
    _root.css.win2.box
    _root.css.win3.box

    in that list? If not, they are not being created properly.

    Talk to you soon.

  5. #5
    Junior Member
    Join Date
    Jul 2000
    Posts
    5
    Originally posted by Antibody
    [B]You can email me the code or post a zipped .fla that I can download on your site and let me see what I can do. Whatever you feel more comfortable with.

    Now let me ask you this, when you testMovie if you list your objects (after the empty clips are created) do you see

    _root.css.win1.box
    _root.css.win2.box
    _root.css.win3.box

    in that list? If not, they are not being created properly.
    yes, since I can access other properties like ._name and so on and I'm sure i'm targeting the right one because _root.css.win3.box._width (or height) gives me a zero instead a possible "undefined" caused by a wrong target

    Anyway I'm resetting-up a litl space on the net, I'll contact you as soon as possible

    thanks for help

    aoxomoxoa


  6. #6
    HELP>>>ACTIONSCRIPT DICTIONARY
    Join Date
    Feb 2000
    Location
    In the Present Moment
    Posts
    1,041
    Okay. Let me know when it's ready.

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