A Flash Developer Resource Site

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    May 2012

    Parent/Child type casting error?


    First off I'm more of a C++ programmer and so I'm wrapping my head around Flash's framework.

    What I'm attempting to achieve here is have certain 'stuff' happen when I roll-over a button which is nested in the parent. However, Flash is claiming that it's the wrong root of passage by not actually working. The roll-over works, as I've done tests in the _root of the page; but when I'm type casting to the a child it claims it's wrong. Any help would be appreciated.

    Here's an image to illustrate that everything is okay.

    Here is my code.

    _root.menucontainer.class_box.sm_classImage.menuclassone.onRollOver = function() {
    	createTextField("dynamic_txt", 1, 10, 10, 150, 30);
    	dynamic_txt.text = "Here's some text";
    	dynamic_txt.textColor = 0x00cc00;
    	dynamic_txt.border = true;

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Here, no there
    Trying to understand what isn't working. I understand you are having trouble casting to the correct level, and you said the roll over part is working....what and where are you attempting to cast?
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

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