[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Applying color to a nested MC using Actionscript 3

Posted on 2008-09-30
5
Medium Priority
?
567 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 2000 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

656 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