ActionScript 3.0 :: ColorMatrixFilter - Blending - Bitmaps - Fade Out The Pixels Each Frame And Then Add New Ones

Aug 29, 2009

Solved HERE: [URL] It's a mashup from two inspirations. Basically I'm using PV3D to add pixels to the scene everyframe and I have an BitmapEffectLayer handling their display. At the moment I am using a ColorMatrixFilter to fade out the pixels each frame and then add new ones. This is great but I also want additive blending (so when many pixels are on top of each other they turn white).

The original 2D version of this basically added the particles color to the original pixel color creating an additive blend. But I can't do that in 3D!!! Once the old pixels have been drawn they go to the BitmapEffectLayerand are rendered in 2D.. but I can go from 2D back to 3D again.. I hope I have explained my problem clearly.. also even if I could my skill doesn't permit me to do it..

View 3 Replies


Similar Posts:


ActionScript 3.0 :: BitMaps - Remove Transparent Pixels?

Jan 28, 2009

Iv created an app in work which needs a rubber. I basicly have a tool to draw line (paint/pencil). This draws over the entire stage area, including over buttons and interactive mc's. Once i draw the line i then want to be able to erase bit of it.

To this end iv made an eraser tool, which works well. I turn the line into a bitmap, then turn the eraser line into a bitmap and use BlendMode.ERASE to erase one from the other. My problem is, because when creating the bitmatdata i have to create a rectangular shape, the area created then means that i cant access any of the buttons underneath.

here is my code:

ActionScript Code:
//line array is an area of all the line objects which are currently live on stage.
for(var i=0; i<lineAr.length; i++){

[code]....

The way i see it i need to remove the transparent pixels from delBitMap once the erase has been done.

View 2 Replies

ActionScript 2.0 :: Movie Fade In Onframe, Play 5 Sec., Then Fade Out On Frame?

Jun 11, 2009

how to do this effect.I have a movie instance named "sparkles_mov" as in internal movie, not loading externally.It's placed multiple times on the stage.I need an AS code for the first frame of the entire stage that makes all instances fade in at a specific frame number (5), last for XXX amount of seconds and then all of the instances to fade out at a specific frame number (70).Is this possible? I have all instances fading in using this AS code placed on the frame that they enter on but the fade out never works, the just abruptly disappear:

Code:
sparkles_mov._alpha = 0;
fadeIn();[code].....

View 2 Replies

ActionScript 3.0 :: Sound Fade In Fade Out On Frame

Dec 10, 2009

i am trying to hade in and fade out on the sertain frame. but i just can't figure out what's the problem.

ActionScript Code:
var soundFadeInTimer:Timer = new Timer(100,50);
soundFadeInTimer.addEventListener("timer", soundFadeIn);
var fadeInIncr = 5;
function soundFadeIn(e:TimerEvent){
[Code]...

View 0 Replies

ActionScript 3.0 :: Spawn Rather Than Moving 20 Pixels Each Frame?

May 17, 2010

I'm trying to make a game where enemies are spawned at the left side of the screen and gradually move to the right, but the problem I'm having is that when they spawn rather than moving 20 pixels each frame, it calculates the final destination like it's a for loop. This is the code I have

[Code]...

View 4 Replies

ActionScript 3.0 :: Comparing And Matching Bitmaps Against An Array Of Saved Bitmaps

Jul 31, 2009

I'm trying to figure out the best way to compare a single bitmap against perhaps an array of saved bitmaps to see how close of a match it may be to any one of the bitmaps stored in the array. Right now I'm running a for loop that uses the bitmapData.compare() method to try to compare to see how much of a variance there is but... to be honest I'm at a loss as to how to use the resulting data to do so. Does anyone know of any good method to accomplish what I am trying to do? Forget looking at my code it's a waste of time because simply, it's not working.

View 4 Replies

ActionScript 2.0 :: Make A Fade In Of Button In Only One Frame Of Frame Root?

Jan 14, 2009

i have one button (enter_btn) inside of one moviclip(enter_mc), and I need to know how to call the button through my frame root?

I use one movieclip only to make a fade in of my button in only one frame of my frame root.

[Code]...

View 4 Replies

ActionScript 3.0 :: Transition Manager PixelDissolve - Instead Of The Pixels Being Dissolved The Pixels Being Added?

Mar 24, 2012

so instead of the pixels being dissolved, the pixels being added? :

ActionScript Code:
var Anim:TransitionManager = new TransitionManager(blackbox);
Anim.startTransition({type:PixelDissolve, direction:Transition.OUT, duration:1, easing:None.easeOut, xSections:35, ySections:35});

basically what i would like is the end point to be the start point and the start point the end point.

View 2 Replies

ActionScript 2.0 :: Slider Bars And Scaling - Code Keeps Shrinking Initial Object Down To 10 Pixels By 10 Pixels?

Jun 17, 2009

I have a swf file that loads into my main movie, and within that swf there is a masked image that i would like to scale using zoom in and out buttons and also by using a slider bar.However i cant find any tutorials that will allow me to combine the two.I have used the following code for the buttons. Which seems to work ok but i would like it to be a little smoother. (using speed or some sort of easing??)

ActionScript Code:
zoomPlus.onRelease = function(zoomIn) {
if (test_shirt.shirt._xscale == 400 && test_shirt.shirt._yscale == 400) {[code]....

but for this code it keeps shrinking my initial object down to 10 pixels by 10 pixels..

View 0 Replies

Actionscript 2.0 :: _y Movement By Pixels - Move The Movie Clip In Incremental Moves Consisting Of 30 Pixels?

Nov 18, 2009

I have a movie clip called column1_mc. when I click a button I need to move the movie clip in incremental moves consisting of 30 pixels.

column1_mc._y = 30;

Does not work because that is giving a _y coordinate.For example.I need to make the movie clip jump to _y 300 but make 10x30 pixel incremental jumps. Moving 10 times 30 pixel jumps.

View 1 Replies

ActionScript 3.0 :: Changing Object Color With ColorMatrixFilter

Nov 20, 2010

I know that you can change changeobject's color with AS3 is using colorTransform. However if I do this, then I can't really use filters. For example, if I apply DropShadowFilter on an object which color is changed with colorTransform, then the color of a shadow is the same as object's color. So I tried to use ColorMatrixFilter to change object's color. And it works with colors like FF0000, but it doesn't with colors like FFFFFF. IS there a way to change objects color to white using ColorMatrixFilter? I use the following methods:[code]

View 2 Replies

Actionscript 3 :: ColorMatrixFilter In Flash - Add Color - Leave Black

May 20, 2011

I have a MovieClip - for example a character's face. It has a black border and a brown fill (skin). I need to change the skin's color. I see 2 ways to go at it: Use ColorTransform. But I need to have the skin in a separate MovieClip, so that I can change the skin's color alone, not the borders. It's kind of complicated. If i have some other elements, like semi transpatent shadows (they will stay brown). Use something else (maybe ColorMatrixFilter)?

View 1 Replies

ActionScript 2.0 :: Dynamically Applied Filters Not Printing - ColorMatrixFilter?

May 29, 2006

Ok, so I have these white shapes that I am "painting" using filters. (import lash.filters.ColorMatrixFilter).I apply it to the shapes using:

ActionScript Code:
myRoot.shapesCreated[i].filters = [eval(this.currColour)];

The problem is this: It paints really nicely, but when I use print(), it just prints the shapes, without the applied color transformation.

View 7 Replies

ActionScript 3 :: Blending Objects With Each Other But Not With Background

Jul 21, 2011

I have a number of objects (represented as DisplayObjects) that I wish to blend with each other. However behind these objects there is a background that i do not want to involve in the blending. So basically I want to blend these objects with eachother and afterwards use the result of this blending as a new DisplayObject (for example to put it on top of a randomly colored background).

So what I have is:
var obj1:DisplayObject = getFirstObj();
var obj2:DisplayObject = getSecObj();
var background:DisplayObject = getBackground();
obj1.blendMode = BlendMode.ADD;
obj2.blendMode = BlendMode.ADD;

At first attempt I tried was putting these objects into a common DisplayObjectContainer hoping that blending mode would only be relative to all objects contained by the same DisplayObjectContainer, but this does not seem to be the case.
var objectsPool:Sprite = new Sprite();
objectsPool.addChild( obj1 );
objectsPool.addChild( obj2 );
addChild( background );
addchild( objectsPool );

View 2 Replies

ActionScript 3.0 :: Pass Through Blending Modes?

May 5, 2010

I'm finding a lot of problems trying to do a large-scale and complex 3D interface, and most movieclips are parented once if not several times. This is the only way that I see to be able to manage having a number of movieclips move and rotate together with common anchor points. But one of the problems with this is not being able to set different blendModes of child clips. Yes, yes, I usually try and avoid parenting for that reason which is much easier in 2D. But if there is no way to "force" or "pass-through" blendingModes of clips with parent(s), please explain to me how I can have a number of button objects that I can easily move and rotate together around 3D space, but also have independently changeable blendModes for rollover states etc?

View 0 Replies

ActionScript 2.0 :: Blending On/off Sound Button Together?

Apr 17, 2011

ActionScript Code:
on (release) {
tellTarget ("../music") {
stopAllSounds();
}
}
on (release) {

[Code]...

How do you make that into one script so the on button is the same as the off?

View 9 Replies

How To Fade One Frame Into Another

Oct 12, 2009

In Flash pro 4 how do I fade out of one keyframe and fade into the next one with a slow transition?

View 1 Replies

ActionScript 2.0 :: [Flash] Blending/Fading Movieclips?

Sep 23, 2009

Below I have actionscript that plays movieclips in my library at random. How can I add to this to blend(fade) the movieclips into each other so that when the movieclip is done, it doesnt fade to white it simply fades/blends into the next movieclip/slide?

Code:
var MCs = new Array("mc1", "mc2", "mc3", "mc4", "mc5");
var selectedMC = MCs[Math.floor(Math.random() * MCs.length)];

[code].....

View 1 Replies

Professional :: Import PNG Sequence And Apply Blending Mode To It?

Mar 20, 2010

How i can import PNG sequence and apply blending mode to it? i import PNG sequence in timeline but it have 120 frames,if i want apply bleding mode to it, i have to apply 120 frames.it's not logical.

View 2 Replies

ActionScript 3.0 :: How To Stop Blending / Smoothing On Edges Of Sprites

Nov 21, 2011

When I draw a perfectly rectangular sprite, where all the corners land on perfect integer locations, then there is no problem. However when my sprite as an irregular shape ( with diagonal lines ), or it does not land on perfect integer locations, then Flash does some kind of blending / smoothing around the edges. This is bad.

Here is an example:
ActionScript Code:
var s:Shape;
s= new Shape();
s.graphics.beginFill(0x0000ff, 1);
s.graphics.moveTo(0, 0);
[Code] .....

And here is an image of what the above produces:
From the code, I drew a green rectangle and blue one, both with a slight skew. So the only 2 colors I want to see are blue and green. But you can see from the image, that along the diagonal of the shapes, there is some kind of blending going on. Flash is using a light green, and a light blue in certain places. Presumably this makes things look better, but I need to prevent this. I need each pixel to be either green or blue or nothing (white). How can I stop Flash from blending the pixels like its doing?

View 9 Replies

ActionScript 2.0 :: Fade Out Audio On Next Frame?

Apr 19, 2010

how I can fade an audio clip out when I go from, i.e., frame 5 to frame 6?

The reason is that I have my swf playing up to frame 5, where it stops, and allows the audio to continue playing. But, if the user wishes to go to the next part of my swf, i.e. frame 6 to frame 10, where it stops at frame 10 to play the next audio clip, I want the audio from the first section to fade out once the swf gets to frame 6 on the timeline to allow for the next audio clip to play.

Currently, if I proceed to the next part, frames 6 to 10, and the audio from the first part has not finished playing, then both the first audio and the second audio play simultaneously.

View 5 Replies

ActionScript 2.0 :: Video Fade Out And Go To Another Frame

Feb 14, 2011

I imported a .mp4 video into Flash, and it works fine. I want to know when the video finished playing, the whole frame will fade out and go to another frame. How can I write the code in AS2?

View 1 Replies

IDE :: Fade It Out When The Movie Enters Frame 20

Dec 4, 2009


I have a loop that starts to play when the movie starts:

var my_sound:SoundId = new SoundId();
var my_channel:SoundChannel = new SoundChannel();
my_channel = my_sound.play(0,int.MAX_VALUE);

I would like to fade it out when the movie enters frame 20. Since I'm already using TweenMax, I put this line in frame 20:

TweenMax.to(SoundId, 1, {volume:0, onUpdate:my_channel, onComplete:stopSound});

I'm getting an error:

1120: Access of undefined property stopSound. TweenMax.to(SoundId, 1, {volume:0, onUpdate:my_channel, onComplete:stopSound});

View 4 Replies

IDE :: Does Flash Have A Way Of Isolating The Selected Blending Mode To Just The Layers Or Objects

Mar 25, 2009

I'm new to the whole flash thing and I'm learning on flash 8 - In photoshop you can group layers so that the blending mode you use on a layer will only apply to the layers in that group... I've been searching all over, and maybe it's right in front of me, but does flash have a way of isolating the selected blending mode to just the layers or objects of the user's choice?

View 6 Replies

Make An Animation - Smooth Frame Fade-In ?

Jun 2, 2009

I can make an animation so the image fades in.http:[url].... the fade is not smooth. I did this by changing the alpha layer 20% every 5 frames. How can I make the fade smooth?

View 1 Replies

ActionScript 3.0 :: Fade Out Transition On Frame Exit

Jul 13, 2010

When a button is clicked on the flash site im creating, which links to the next page, ie about/contact/portfolio etc... I need the current frame movieclip to fadeout, then advance to the next page. This is my code so far

[Code]...

View 13 Replies

ActionScript 2.0 :: Fade Image Out On Frame Change?

Apr 7, 2006

I'm so close to finishing my portfolio site update with an XML gallery and menu. However, I have multiple galleries, about 7-8. With the crazy timeline I have set up now, each gallery is on on its own frame about 20 frames apart, the menu uses a gotoAndPlay to another frame with a 20 frame animation and a stop(); on another gallery frame. What I would like to do is when another gallery is selected from the menu, have the last image of the current gallery fade out. So, what AS would I need to make the movieclip "picture" fade out when the frame is changed? A shoutout to Scotty and Lindquist as well as all the tutorials for making this possible

View 5 Replies

ActionScript 2.0 :: Fade In/out Transition With ONLY Code And One Frame?

Jul 1, 2008

I usually do this with code and timeline, but i need to do this in one frame with only buttons. so for example

btn1.onRelease = function(){
bg_con._alpha = 0;
bg_con.alphaTo(100, 0.5, "linear");
loadBitmapSmoothed("images/bg4.jpg", bg_con);
}

so that fades in nicely, now i need it to fade out when the next button is pressed and then that button fades in and out, etc.

View 3 Replies

ActionScript 2.0 :: Sound Fade On Frame Variation?

Nov 10, 2008

I've created an MC to control the various sounds throughout my flash file. I'm sure this is an ugly way to do things (in AS 2.0) but barring that, here's what I'm trying to do, and what I got at the moment:I need one of several sound clips to play (1-4) depending on a particular frame that's reached. If, during the sound playback, a user clicks a navigation button, I need the sound to quickly fade out (and I'm assuming have the sound object stopped or destroyed to preserve resources?), so my _root mc targets a frame within my SOUND mc and creates the 'standard' sound object:

Code:
VO_mobile = new Sound(mobilesound);
VO_mobile.attachSound("vo_mobile");

[code].....

View 2 Replies

ActionScript 1/2 :: Making A Movie Stop/fade Out At A Certain Frame

Sep 24, 2010

I'm using the code and assets from this page. [URL] I'm creating ads for websites and they don't allow continual  animation after 3 loops. I added to the above code to make it fade at the end. I think I'm close, but it doesn't seem to fade away as I had hoped, it just keeps  falling.

Am I missing some code that I need to replace? Do I need to put a frame # somewhere when I  want it to fade? Does the last part of the code go on a frame at the  end? The snow just keeps falling even though it's reached the last frame. What do I add to make it stop?
 
Here is the code. The link above will show you exactly the type of animation I'm looking at. I added the fade part after "init ( );"
 
init = function () {
width = 300;
// pixels
height = 250;

[Code].....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved