ActionScript 2.0 :: Reduce Or Brighten A Color By For Instance 10%?
Apr 1, 2006
how to reduce or brighten a color by for instance 10% in AS? Example: i have this color 0x3399FF (some blue) and i want do do something like this newColor = BrightenColor(0x3399FF) // call function BrightenColor and it return the new color and the newcolor well be the same blue but 10 more brighter
I'm currently working on a little practice .fla file I've been working on. What I have now is an altered version a 'game' I made recently. I wanted to see if it was possible to create a new instance and color by having the user drag the object into the black (target) area. In short I want the user to drag one of my shapes (movieclips) and while keeping the original shape in place, move the copy version into the target and have the copy change to a different random color. Attached is a copy of my file.
Here is code I have thus far, I have tried a few options but they seem to throw off my application.
var counter:Number = 0; square.addEventListener(MouseEvent.MOUSE_DOWN, moveObject); square.addEventListener(MouseEvent.MOUSE_UP,releas eObject); circle.addEventListener(MouseEvent.MOUSE_DOWN,move Object);
I'm currently working on a little practice .fla file I've been working on. What I have now is an altered version a 'game' I made recently. I wanted to see if it was possible to create a new instance and color by having the user drag the object into the black (target) area. In short I want the user to drag one of my shapes (movieclips) and while keeping the original shape in place, move the copy version into the target and have the copy change to a different random color.
var counter:Number = 0; square.addEventListener(MouseEvent.MOUSE_DOWN, moveObject); square.addEventListener(MouseEvent.MOUSE_UP,releaseObject); circle.addEventListener(MouseEvent.MOUSE_DOWN,moveObject);
I have 2 instances of a button wich is red and has a white label I have to edit the buttons so one button is red, and the other is green I was doing this, but when applied Also the title of label goes green instead of being white...
I've got a world map with an instance name of map_mc. Inside map_mc, every country is a movieclip object. So for example, the United States is a movieclip. I'm using the GreenSock tint plugin (TweenPlugin.activate([TintPlugin]) to color transition the countries from white to red.
Here's my goal:
I want to randomly color transition (using Tint) every country from white to red over 20 seconds.
Here's my issue:
Is there a way to do this without having to give each movieclip an instance name, creating an array and randomizing the array. Is there a simple loop I could create that color transitions every movieclip object inside map_mc?
I've got a map, of those you roll over the mouse on the sections and it displays the section name.I want to add to these code, the instance of changing the colour of the section, so sections are more visible each time you move your mouse over the map.[code]...
Does creating a new instance of an Object that uses an identical name to an older instance, delete the previous instance? Or should the original instance be deleted first? The code uses a ridiculous amount of XML vars. Isn't it less memory intensive to parse the XML and save the properties to an Object, and then delete the XML Object, rather than keep the XML Object around and reference it's child nodes directly? Is it better form to break up a huge XML file (>600lines/3200vars) into smaller chunks?
i have a button, with instance name lightblue_color. I am assigning a color to its color field like this: lightblue_color.transform.colorTransform.color = 0x65ffff; then i am adding an eventlistener to the button like this: lightblue_color.addEventListener(MouseEvent.CLICK, ChangeColor); Then, in the function: public function ChangeColor(evnt:MouseEvent):void {trace(evnt.target.transform.colorTransform.color);} It prints 0. Why is that? Shouldn't it print 0x65ffff or do i need to do some type conversions?
how can i reduce the swf size? it's 9MB and it takes a bit to load online. is there any solution to reduce its size so it can load faster? the pictures and loaded externally so they're not embeded in the file. There are some inside the movie but they were already reduced from their original size.
i decompiled a swf & convert it to fla .after geting swf ,again i decompiled it,results in increase in file size of fla.is there any way to reduce the file size of fla...as PC hangs when i save fla.
I am using Flash CS3. Now i did some image with mc(Movieclip) animation. Its come near 150kb. But i dont need this like file size. I want less then 75kb.also i did publish settings and reduce the jpeg quality near 40. But its come near 106kb...
i have 8 movie clip and i use it as a navigation buttons and when clicked it should go to different links. i use these codes but i think these codes are not pure oop so reduce programming using oop but works in same way as it is doing right now. the codes are follows
function buttonmode(link:MovieClip):void{ link.buttonMode = true; } buttonmode(rec1_mc); buttonmode(rec2_mc);
I have a Flash 8 a/s2 site but I feel the load time when a visitor visits the site is too long. The site does have music, pictures and videos but they are all loading externally.
Is there a way I can reduce the load time of the SWF?
I've uploaded an AIR-built .ipa file to Apple. From Apple: "The app binary listed below was 8 MB when you submitted it, but will be 20 MB once processed for the App Store"
So I'm trying to trim it. I've gotten rid of all unused .as classes and all unused assets. Does anyone have any clever way of reducing file size further? One way I thought of is this[code]...
reduce the file of flash file as well as swf file to upload.I am a fresher. I don't know advance actionscript, xml etc. reduce the swf file size. So that i can easily upload the file.Also briefly explain me how to externally load the swf file in flash.
reduce the file of flash file as well as swf file to upload.tell me a simple way to reduce the swf file size. So that i can easily upload the file.how to externally load the swf file in flash.
Will OOP reduce the performance of the application.I have to query 4 database with more than 1000 rows between each user inputs to give the output. The whole thing must be less than 5 seconds to the maximum extend and an average of 2 seconds. Which type of design is better for performance.
I am trying to reduce the size of my swf, and I see that I am using a movieclip on each frame on the Timeline, which has to be adding considerable size to my file, since I have placed the movieclip(animation) on every frame. How could I do this more efficiently and still acchieve animation between each frame? I have included a ripped version of the fla. , since the attachment limit here is pretty low. In the file the video - files and the picture files have been removed, but the rotate... mc's(animation) are placed in the interanim Layer and the Menustate Layer, on each frame.
I have a image sequence of 350 images. Is it possible to Reduce frame count in flash mx, (remove every other frame)automaticy, not by hand one frame at a time. I do also have flash cs5 can it be done in that?
Having a problem with a game, The cpu load at the start when all the elements are on the stage is between 120 - 150%. Far too high. I reduced the frame rate from 30 to 24 and now the cpu load is around 100 - 125% which is still too high for my liking !! I'm wondering if this code can be optimized, I'm sure this is the cause, it's running within a movieclip class on 15 movies at the start..
#Hi, does anybody know if there is a way to export faster other than changing pu/overclock/memory? Maybe a especial video card or GPU?I notice that when I export Flash just use 25% of processor, any way to improve this?I have a fast processor (phenom 3.4) and enough memory (4GB), but still need more speed.
So I have this .fla file that a freelancer made for me before. I noticed that the mp3's he imported have really low size of about 800kb only for each sound. When I sent this songs to him, they were in WMA files and have 3MB size each. I noticed that the file location says "program files/total video converter/...", so I assume that he used the Total Video Converter software to convert the WMA to MP3. But how was he able to make the size to only 800KB? Because I tried other converters and the size doesn't change significantly. Lastly, I noticed that it says in the properties "50.0% of original" and the use imported mp3 quality is checked! Also, since the above situation has a WMA file. How about if I already have the mp3 file? How can I reduce the size?