Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-19-2009, 04:55 AM   #1
Registered User
Join Date: Jun 2009
Posts: 2
Default dynamically creating the obj variable for a tween

I'm a few days into learning flash AS3 and I'm stuck. So i have movie clip that is made up of smaller clips, and I want to change the opacity of one of the sub clips. Here's my code so far

function entryOver(evtObj:MouseEvent):void

//evtObj.target.name is an instance###
//Desired object is portEntry2_mc generated by evtObj.currentTarget.name
trace("MOUSE OVER Target.name: "+evtObj.target.name);
trace("MOUSE OVER currentTarget.name: "+evtObj.currentTarget.name);

//redStr is the string representation of the object i want modified:
var redStr:String = evtObj.currentTarget.name + ".redEntry";
trace("red String: " +redStr);

//attempt to recreate the object
var redObj:Object = {name:redStr};
trace("red Object.name: " +redObj.name);

//the first tween works, but I want to dynamically load in the obj variable
//new Tween(portEntry2_mc.redEntry, "alpha", Regular.easeOut, .8, 1, .25, true);

//Attempts to dynamically load the obj variable
//new Tween(evtObj.currentTarget.name, "alpha", Regular.easeOut, .8, 1, .25, true);
//new Tween(redObj.name, "alpha", Regular.easeOut, .8, 1, .25, true);


Thanks in advance for any help. I did some searching and couldn't find how to do this. Which annoyed me since it seems so ease with the trace function....
jetduck is offline   Reply With Quote
Old 06-19-2009, 05:55 AM   #2
Registered User
Join Date: Feb 2009
Posts: 9


This site has some good tutorials. I don't have time to go into it. What is you platform? cs3 , 4 or flex?
codec is offline   Reply With Quote
Old 06-19-2009, 07:26 AM   #3
Registered User
Join Date: Jun 2009
Posts: 2

Flash CS4
jetduck 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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating the pixel size of a text sambamac ActionScript 3.0 8 02-06-2009 01:08 AM
Expandable and Collapsing Buttons depulpo ActionScript 2.0 3 11-30-2007 07:42 PM
2 primitive numbers not showing up as equal when returned from OOP functions arianhojat ActionScript 2.0 12 03-14-2006 07:37 PM
Cannot get the Tween to work, please help nfh ActionScript 2.0 3 01-08-2006 11:14 PM
Writing to a file (locally only) isleshocky77 ActionScript 1.0 (and below) 13 08-23-2001 02:43 AM

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