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
Solved

Applying color to a nested MC using Actionscript 3

Posted on 2008-09-30
5
558 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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Flash Slides/Presnetation 4 77
video live streaming 1 125
Can not play videos on sciencechannel.com in Chrome 13 139
Running Mp4 or Flash Video 1 126
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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…

839 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