Customize ColorPicker in Flex - actionscript-3

I need to make colorPicker functional without having to click a drop down like this:
It should be always open and other standard controls (like textInput to enter color manually) should not be present.
Is there a way to do that?
Thank you.

I'd create custom component based on mx.controls.colorPickerClasses.SwatchPanel, which is class used as a drop down in color picker.

just paste the image of the colorpicker you attached above, add a clicklistener, and based on mouseX, and mouseY of the event, locate the coordinate, and get its color value from the image.

You need to implement this using the image of color picker and picking up the color where mouse is clicked. Following link will guide you how to do it. This link has demo with source code too for reference.
http://www.codestore.net/store.nsf/unid/BLOG-20110414-0347

Related

how to use elements (:hover) to display and keep the table stable to measure it?

I am trying to cover a website and here is its link https://shopee.vn/demo.vn
At the text "thông báo", when you hover to it, it will show you a table as you can see in this photo
My problem is, when I click to :hover and use tool to measure the photo and download the image to copy it, it disappeared.
I think that when I use :hover, it must display the photo ? Or when I click to the link below which belong to the photo, there is some properties like visibility or something like that ?
I want to display the photo to download the image and the text really.
Could you please help me to solve this problem ? Thank you very much for your time.
run code below below on browser console or snippets to simulate mouseover (mouse hover) then go to Elements tab.
var event = new MouseEvent('mouseover', {
'view': window,
'bubbles': true,
'cancelable': true
});
document.querySelectorAll('.stardust-popover__target')[0].dispatchEvent(event);

Interactive Image/Graphic in React/Html

Im fairly new to react/html and im trying to make an interactive Graphic/Image, such that when a mouse hovers over a circle it highlights a colour and when i click it turns to a colour. Is it possible to do this? Can i get some advice on how its possible to do this without hardcoding different images to load once one (or more) have been clicked.
Thanks Heaps!
First you create a circle Component
with onMouseEnter and onMouseLeave methods to change the display color when mouse enters and leaves the circle Component
and then you can use an onclick method to change the color when it is clicked.

How to choose a color on a palette to change part of an image?

I don't even know where to begin or what codes will be needed.
I'm trying to build a website that allows the user to change a certain part of an image's color. Just like a coloring book page online, where someone can choose a color from the palette and it will allow them to click on that part of the image to change it to that color. Once they are done they can save the image to their computer.
Any help in the right direction would be incredible!
You can try to make a transparent div over a div containing the image which is in absolute position of the div containing the image.
Then you can check some javascript plugin to get a color picker plugin.
With Javascript and for example jQuery, you can add some events on click on the color picker and then on click of the div which is hover the image to apply the picked color.
I hope this is clear for you, otherwise I can make a JSfiddle

Effects in ActionScript?

i want to put some effect to my screen, when it navigates to other page.
When i click a button in the first page it should navigate to second page.
i want some effect when navigate to second page, can anyone tell me how to do this?
check out the fl.transitions package in the ActionScript documentation. there are some ready-made transitions you can use (Fade, Fly, Wipe, etc.) or you can create your own with the Tween class.

flash cs4: change the look of a button after it's been pressed

I'm trying to create a top panel menu that contains 5 buttons.
I configured Up and Over state for each button.
how can I configure that one the button is clicked, the look of the button will change to the look i configured in Over state.
Each state contains a different image.
Is there a way to change the look of the button to the look it configured in it's different states using Action Script?
Using Flash CS4 Action Script 3.
thank you.
Something like this should work:
button.addEventListener(MouseEvent.CLICK, onButtonClick);
function onButtonClick(e:MouseEvent):void {
// Given you have a changeColor method defined in your button class
e.target.changeColor('#ff9900');
}
In the onClick event for the button you can change Up skin to be the same as the Over skin.
I resolved the issue by creating a MovieClip with two frames, one for with each button state,
and i just used gotoAndStop when needed to move to the required frame.
In each state I didn't need only to change color, but to the change the all visual presentation of the button.
it seems that i could not find any way to do that with a regular Button Object.
thanks.