A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] Problems with my mc, simple, i guess...

  1. #1
    Senior Member
    Join Date
    Sep 2006
    Posts
    248

    [F8] Problems with my mc, simple, i guess...

    Hi there!
    I am creating, about 15 movie clips using this code:
    Code:
    duplicateMovieClip(_root.mc_build_, "mc_build_"+i, _root.getNextHighestDepth());
    _root["mc_build_"+i]._x = _global.m_x[i];
    _root["mc_build_"+i]._y = _global.m_y[i];
    And i am trying to get the name of the mc created by rolling over it. So far so good.
    Code:
    _root["mc_build_"+i].onRollOver = function() 
    {
    trace(this);
    temp = this;
    temp = this.toUpperCase();				
    };
    The problem is that, i DO get the name of the object thats being "rollovered" lets say "_level0.mc_build_1" and i trace it. But when i try to modify it, the name, to remove a part of it or even make it uppercase, it gives me "undifined".
    Why???
    Anyone?
    Thanks a lot!
    Cheers.
    Leo.

  2. #2
    Senior Member vinayak.kadam's Avatar
    Join Date
    Oct 2006
    Location
    gotoAndPlay("Pune");
    Posts
    831
    Please try using this code:

    _root["mc_build_"+i].onRollOver = function()
    {
    trace(this);
    temp = this;
    temp = this._name.toUpperCase();
    };

    Hope this works!!!

    As ever,
    Vinayak Kadam

  3. #3
    Senior Member
    Join Date
    Sep 2006
    Posts
    248
    It worked!
    Thanks a lot!

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