Solved

Applying color to a nested MC using Actionscript 3

Posted on 2008-09-30
5
559 Views
Last Modified: 2013-11-11
Hi Hope you can help...

I'm having trouble creating a custom FLV player using Flash CS3 and its Video components.

Although I have successfully created the player and all of its content (Play/Pause Button and SeakBar) I want to be able to change the colour of the SeekBarHandle using actionscript.

I have managed to change the colour of a test movieclip (in the root of the swf) using the code below however if I try to give the SeekBarHandle an instance of mc Flash asks me to give an instance name to its parent and at this point the FLV player stops working?

I'm new to all this so no doubt overlooking something simple.

Any help would be greatly appreciated.





var color_transf:ColorTransform = mc.transform.colorTransform;
/*color_transf.color = root.loaderInfo.parameters.colour;*/
color_transf.color = 0x00FFFF;
mc.transform.colorTransform = color_transf;

Open in new window

0
Comment
Question by:sany101
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 22611488
I request to attach your sample FLA to get the real picture of the nested Movie structure..
0
 

Author Comment

by:sany101
ID: 22612309
Hi anneeshchopra thanks for the quick response and appologies, I couldn't work out how to attache the fla as EE would accept it.

Anyway here is a direct download link to it.

www.sany101.pwp.blueyonder.co.uk/flash.zip

Thanks again
0
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 500 total points
ID: 22613271
ok,
I reviewed it and seems like you want to set the color for "SeekBarHandle" movieClip.

as I see that you have given instance name as "mc" on second frame,

for your info, this instance never come into picture, FLV component actually create an instance dynamically using library linkage ID, and another point is "instance name" also comes dynamically, means no fix instance name..


so I suggest that you should go inside the "SeekBarHandle" movieClip and just add "color change" code on its first frame..

as following:

var color_transf:ColorTransform = this.transform.colorTransform;
color_transf.color = 0x00FFFF;
this.transform.colorTransform = color_transf;
0
 

Author Comment

by:sany101
ID: 22613314
Awesome! Thank you so much!
0
 

Author Closing Comment

by:sany101
ID: 31501708
Thanks again
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do I convert a CS4 FLA file to CS6? 1 884
Flash Slides/Presnetation 4 81
Open Source MP4 Flash Player 2 198
Adobe Flash Player - Active X vs NPAPI vs PPAPI 10 63
I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question