?
Solved

Customising Flash Components

Posted on 2003-03-27
7
Medium Priority
?
214 Views
Last Modified: 2010-04-03
I would like to add certain things to the FListBox component (like highlighting the selection onRollOver).

I have done this...but I have edited the actual component which I have read is not what I should be doing. (Apart from that all changes I make are global and apply to comboboxes as well - which is not really what I want).

So I tried to copy the ListBox (with a view to editing the code on this one) but the copy could not even display items.

I suppose what I'm looking for is a short guide to explain how to copy and customise the existing Flash component library without altering the existing components.
0
Comment
Question by:JohnHowlett
[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
  • 2
7 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 8222250
if you drop a component onto the stage Flash..you can then
go into editing mode (edit symbols) and change whatever you
like..you're only altering an instance of the original component.
if you then want to re-use that altered component as a template..
save the file as .fla and then in a new .fla open the saved.fla as a library (File>Open as Library)

you can also change the properties of a component instance
with the FStyleFormat object constructor..
see Help..ActionScript Dictionary Overview>FStyleFormat (object)..also..Using Flash>Using Components>Changing the properties of specific components

Z
0
 
LVL 4

Author Comment

by:JohnHowlett
ID: 8223906
Thanks for the reply....

Ok...so I've got my new ListBox (ListBox2)...but it is still pointing to all the global properties

How do I change the colour of the highlight box without affecting the global settings?

I have duplicated 'FHighlight' (FHighlight2) and have it containing a 'Highlight2' in the 'other assets' folder.

Where is the line/property I need to change to have my new ListBox pointing to these highlight properties?

(Or is this totally the wrong way of doing it??)

0
 
LVL 6

Expert Comment

by:henryww
ID: 8227598
i am not sure if that's what u want ...
if u only want to change the highlight of one UI ...

list1.setStyleProperty("selection", 0x336699);
list1.setStyleProperty("selectionUnfocused", 0x3399FF);

see if that helps
http://www.smartclever.net/example/flash/selcolor/selcolor.swf
http://www.smartclever.net/example/flash/selcolor/selcolor.fla
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 4

Author Comment

by:JohnHowlett
ID: 8228648
Thanks henryww...I didn't know that.

But I would still like to be able to add my 'onRollOver' highlight (as well as giving the highlight a gradiant fill).
0
 
LVL 23

Expert Comment

by:Zeffer
ID: 8228791
drag a list box to the stage
in edit symbols..run out to global skins and select FHighlight
double click the movie there and you can change the
fill in the properties panel (don't believe everything they
tell you in Help:))

back on main stage select the listbox..put in a
label or two in the parameters box [on properties panel]..(so you can see it work)
test..click a label..there you go.

save this .fla file..as  listBox2.fla
open a new .fla..
import as library ..listbox2.fla
drag an instance of a listbox to the stage
put in some labels
test

you've customised a listbox component
saved it as a 'template'..
and re-used it..a
nd the original component is unchanged.

mechanical..but works.

if you want to make changes purely with code..
look up..FStyleFormat object..in ActionScript Dictionary.

Z





0
 
LVL 6

Accepted Solution

by:
henryww earned 500 total points
ID: 8229813
ok there's the highlight
same links as above.

http://www.smartclever.net/example/flash/selcolor/selcolor.swf
http://www.smartclever.net/example/flash/selcolor/selcolor.fla 

change the "rollOver highlight" from the library for the color ...
0
 
LVL 4

Author Comment

by:JohnHowlett
ID: 8240996
Thanks very much ...this is a great help!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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 how to record live broadcast.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

800 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