Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-25-2012, 04:31 PM   #1
Registered User
Join Date: May 2012
Posts: 1
Default 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;
odwald is offline   Reply With Quote
Old 05-25-2012, 11:34 PM   #2
Prid - Outing
Prid's Avatar
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,191
Send a message via MSN to Prid Send a message via Skype™ to Prid

Didn't really understand the problem, but if your target is in parent, then use _parent instead of the long path, and would you mind uploading your FLA file?
I have returned, and am now 18
Prid is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 09:02 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.