Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flash General Questions > Flash 8 General Questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-03-2007, 04:06 PM   #1
kurrle
Registered User
 
Join Date: Oct 2004
Posts: 16
Default How to get just part of a variable?

I have a movie that is passing the name of a movie clip to the _root. The problem is I can only get it to pass the entire name including the path by using this:

blueButton.onRelease = function() {
trace(this._parent);
}

it returns this:

_level0.scrollPane.spContentHolder.blue1


I would like to have it return this:
blue1 or even just 1

How can I do this?
kurrle is offline   Reply With Quote
Old 05-03-2007, 04:49 PM   #2
exactpixel
One of many
 
Join Date: Sep 2002
Location: phoenix
Posts: 268
Default

try -

trace(_parent._name)
exactpixel is offline   Reply With Quote
Old 05-03-2007, 05:10 PM   #3
kurrle
Registered User
 
Join Date: Oct 2004
Posts: 16
Default

thanks for the reply. You almost had it. I just changed it to:
trace(_name);

and it worked! Thanks again
kurrle is offline   Reply With Quote
Old 05-04-2007, 05:34 PM   #4
exactpixel
One of many
 
Join Date: Sep 2002
Location: phoenix
Posts: 268
Default

I'm sorry, I didn't know what the path was to what you wanted. my bad...
exactpixel 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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
putting part of instance name in a variable ajobe ActionScript 2.0 8 04-17-2007 12:57 PM
having trouble resetting global variable valkyrie ActionScript 1.0 (and below) 3 03-28-2005 04:26 PM
LP Colorpicker biosonik Components 0 03-25-2005 06:37 AM
Variable musings retrotron ActionScript 1.0 (and below) 8 06-24-2003 10:33 PM
strange variable behavior flashdudette ActionScript 1.0 (and below) 3 05-09-2003 06:49 PM


All times are GMT. The time now is 07:43 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.