SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    createClassObject returning null value when creating dynamic components.

    createClassObject returning null value when creating dynamic components.

    I am using the following code

    var __reg2 = new Object();
    __reg2.label = _label;
    __reg2._width = _w;
    __reg2._height = _h;
    __reg2._x = this.width / 2 - _w / 2;
    __reg2._y = this.height / 2 - _h / 2;
    __reg2._alpha = 0;

    this.launch_button = this.mc.createClassObject(controls.PixtorieButton, "launch_button", this.mc.getNextHighestDepth(), __reg2);

    this.mc is a movieclip which has the correct value during runtime but when i use createClassObject() with it its always returning null value.

    I have the component dragged into my library.

    Also the code fails even when i am using mx.controls.Button instead of controls.PixtorieButton .

    Any help will be greatly appreciated

    Thanks in advance

  2. #2
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you check the box saying "Export to first frame" ?
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.

  3. #3
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy

    I checked that option but nothing is happend.While inspet the issue i got tht if i am using _root.createClasObject it is working fine,problem is related to my nested movieclip.

    I expect more help,I am in really trouble


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •