Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-25-2012, 04:31 PM   #1
odwald
Registered User
 
Join Date: May 2012
Posts: 1
Default Parent/Child type casting error?

Hi,

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.

gyazo.com/f7312e0d0fc5e4bb20083f510ad23a7a.png?1337954359

Here is my code.

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
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
Default

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
Reply


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 02:22 AM.

///
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.