Trouble Creating Alpha Mask MC In AS3
Hello,
I am running into trouble getting an alpha mask to work correctly in AS3. The mask itself seems to be working on the pixelated movieclip, but the alpha channel isn't appearing at all.
Any help would be greatly appreciated.
Best,
Justin
Attach Code
import flash.display.MovieClip;
import flash.events.Event;
import flash.geom.*;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
var pixelated_mc:MovieClip = new MovieClip();
addChild(pixelated_mc);
pixelated_mc.y = 0;
pixelated_mc.x = 0;
//var flood_mc:MovieClip = new MovieClip();
//addChild(flood_mc);
//flood_mc.x = 0;
//flood_mc.y = 0;
var pixelSize = 4;
//var holder:Bitmap = new Bitmap();
//var mytest:love = new love(650, 400);//pass the width and height of the bitmap
//holder.bitmapData = mytest;
//this.addChild(holder);
// Do not display bitmap
//this.addEventListener(Event.ENTER_FRAME, pixelate);
function pixelate(){
var bitmapData:BitmapData = new BitmapData( original_mc.width/pixelSize, original_mc.height/pixelSize, false );
var bitmap:Bitmap = new Bitmap(bitmapData);
pixelated_mc.addChild(bitmap);
var scaleMatrix:Matrix = new Matrix();
scaleMatrix.scale(1/pixelSize, 1/pixelSize);
bitmapData.draw( original_mc, scaleMatrix );
bitmap.width = original_mc.width;
bitmap.height = original_mc.height;
}
//maskCircle_mc.blendMode = BlendMode.ALPHA;
addChild(maskCircle_mc);
addChild(original_mc);
pixelated_mc.cacheAsBitmap;
maskCircle_mc.cacheAsBitmap;
original_mc.cacheAsBitmap;
pixelated_mc.mask = maskCircle_mc;
pixelate();
Adobe > ActionScript 3
Posted on: 01/28/2009 09:11:36 PM
View Complete Forum Thread with Replies
Sponsored Links:
Alpha+mask
Hi,
sorry i did not reply to my "helper" yesterday.
I have got a moving object, wich i would like to
mask, with a mask that fades around its edges.
is this possible and if so how?
i hope anybody can help
seuchenhexe
View Replies !
View Related
Alpha Mask?
Hi, what i am trying to do would be pretty easy if i only had a simple background where i could just use a mask with transparancy.
I have moving objects in a movie and i want them to fade away as they get to the edge of the screen. How is it possible that i can get the alpha value to change when it gets near the edge?
Many thanks
Alex
View Replies !
View Related
Mask's And Alpha's......
hi all!
got a question with mask's and alpha's. i'm using a "ripple" effect (found in the tutorials) and am finding that when applying an alpha to the "mask" i can only apply one alpha for the whole frameset.
isn't there a way to have an opening alpha @ 0% and ending at 50% for the mask instead of opening @ 20% and ending @ 20%???
thanks!
View Replies !
View Related
Alpha Mask
Hi,
I created 2 layers. One has an image and the other has a rectangle with a gradient alpha going from 0% (left) to 100%(right).
Then I make this mask of the layer that contains the image.
It works fine in Flash but when I preview the file the mask does not work.
What is going wrong? I am using Flash 9.
I tried everything I could think of ...
Thanks,
Miguel
View Replies !
View Related
Alpha Mask?
www.furtherseemsforever.com
one the main news section. i was just wondering how to get that effect as you scroll through. is it some type alpha fade mask? or should this be in the AS forum?
View Replies !
View Related
[AS3] Alpha Mask ?
Hi
I can't figure out how make an an mc alpha mask to work in AS3. Here is
my try:
mc1 = new green();
mc2 = new blue();
mc2.blendMode = BlendMode.ALPHA;
addChild(mc1);
addChild(mc2);
mc2.cacheAsBitmap = true;
mc1.mask = mc2;
Anyone?
/brian
View Replies !
View Related
Alpha Mask?
www.furtherseemsforever.com
one the main news section. i was just wondering how to get that effect as you scroll through. is it some type alpha fade mask? or should this be in the AS forum?
View Replies !
View Related
Plz Help Alpha Mask
hi guys
i have been trying to make a alpha mask but with no success until now , i remembered i could made one almost 2 years ago, but since then i ve been focused more on actionscript that in designing and animating with flash
do you remember or know how to do a alpha mask ?
any help is apreciated !
View Replies !
View Related
Mask With Alpha
I've seen tutorials on this and am trying it but I'm stumped to get gradient transparency to work.
Simple bitmap converted to symbol.
Rectangle with fill above it, one end of fill Alpha 100%, other end Alpha 0%
apply mask and the transparency simply doesn't work, the whole rectangle becomes a mask, Flash ignores the alpha information? yet I've seen it done and followed s tutorials on this, so what am I doing wrong?
Wolfie
View Replies !
View Related
Mask+alpha Effect
Hi,
got one more for today,
i am attempting to make a mask for my animation, that fades out at on side. in the moment i am only able to to make a mask wich is one solid block ,the alpha effect does not seem to be the answer to my problem....
could anybody give me some advise?
thanx for taking the time to read
seuchenhexe
View Replies !
View Related
Mask With Alpha Fade
Here whats I'm trying to do
Image slide from left to right. The image layer is masked by a layer with a simple shape filled with a gradient. The gradient has an aplha of 100% on the left end and 0% on the right. I'm still having problems getting this to work right.. Anyone have any ideas of what I might doing wrong or what I should do diff.
Thanks in advance,
Paintcheck
View Replies !
View Related
Alpha Mask And LoadMovie
i'm working on a project where i've used the setMask feature in flash 8. it works fine when i test it. however when i pull that swf into another swf using the loadMovie command, the mask breaks.
has anyone else run into thist? does anyone know a fix?
View Replies !
View Related
[CS3]gradient Alpha Mask
Ive seen a couple of tutorials about creating gradient alpha masks and the results are really cool looking.
I would love to use this technique on a website I am developing for a client. Ideally I would like to use it on a slideshow that loads a list of images from a database and then loads each .jpg individually.
The problem I would have is that I dont know how to apply the mask to dynamically loaded movies.. could anyone point me in the right direction as far as the logic is concerned or recommend a good tutorial>
Thanks guys..
Beedge
View Replies !
View Related
Alpha Gradient Mask?
I'm trying to do this but forgot how... I have an MC on the main timeline called "SmartPerson" inside I have MC_mask and MC_square.
On the main timeline I have
SmartPerson.MC_mask.cacheAsBitmap = true;
SmartPerson.MC_square.cacheAsBitmap = true;
SmartPerson.MC_square.setMask("SmartPerson.MC_mask ");
When I run the movie nothing happens. The images don't display at all... Any ideas?
View Replies !
View Related
Alpha Mask In External SWF
Hi guys,
wondering if anyone could help with this problem i'm having..
basically i have a swf that uses bitmap caching for an alpha fade, it works fine as it is i'm using..
maskMC.cacheAsBitmap = true;
maskee.cacheAsBitmap = true;
maskee.setMask("maskMC");
..to do this...
in a seperate movie (holder.fla) i'm tryin to load this swf into an empty movie clip with
this.holder.loadMovie("LogoMovie1.swf");
the load works fine but the alpha fade no longer works... you can see the mask running across the screen instead of being able to see through it...
any ideas?
i've tried to target the bitmap again in the holder movie by using
_level0.holder.maskMC.cacheAsBitmap = true;
_level0.holder.maskee.cacheAsBitmap = true;
_level0.holder.maskee.setMask("maskMC");
and i've tried
this.holder.maskMC.cacheAsBitmap = true;
this.holder.maskee.cacheAsBitmap = true;
this.holder.maskee.setMask("maskMC");
but no luck, can still see the mask on screen...
any one got any ideas?? any help wud b much appreciated!
cheers thanks a million
leapin_leprechaun
View Replies !
View Related
Alpha Mask Artifacts
this may be a very simple question.
Here it is:
All is done with AS.
I am applying a gradient mask to a movie I am animating. When it changes property line alpha x or y there are white outlines that appear. Is there a way to prevent that from happening.
Any support is much appreciated.
Please let me know if you need more info.
Here is a link to a sample image of the problem.
Link to example
Cheers
View Replies !
View Related
Gradient Alpha Mask
I have done several searches on how to create a revealing gradient mask. I dunno if I'm just not describing the effect in which I want to create properly as I haven't found anything specifically covering this topic. Sure I can find tutorials on how to do a "glint/shine" effect. However What I want is to have to similar images with an alpha gradient mask between the two images, and when the mask passes over; it reveals the image below with an alpha fading gradient on the edges of the mask. I can get the effect, with the exception of the alpha faded edge; its just a mask with a solid edge. This IS possible to do, . . right?? As I'm sure that I've seen something similar to what I've described here. If anybody can help or point me in the right direction on where to find help on how this is done; I'd appreciate it. thanx, -ssf-
View Replies !
View Related
Alpha Mask In External SWF
Hi guys,
wondering if anyone could help with this problem i'm having..
basically i have a swf (logomovie1.swf)that uses bitmap caching for an alpha fade, it works fine as it is using..
maskMC.cacheAsBitmap = true;
maskee.cacheAsBitmap = true;
maskee.setMask("maskMC");
in a seperate movie (holder.fla) i'm tryin to load logomovie1.swf into an empty movie clip with
this.holder.loadMovie("LogoMovie1.swf");
the load works fine and i can see the movie but the alpha fade no longer works... you can see the mask running across the screen instead of being able to see through it...
any ideas?
i've tried to target the bitmap again in the holder movie by using
_level0.holder.maskMC.cacheAsBitmap = true;
_level0.holder.maskee.cacheAsBitmap = true;
_level0.holder.maskee.setMask("maskMC");
and i've tried
this.holder.maskMC.cacheAsBitmap = true;
this.holder.maskee.cacheAsBitmap = true;
this.holder.maskee.setMask("maskMC");
but no luck, can still see the mask on screen...
any one got any ideas?? any help wud b much appreciated!
cheers thanks a million
leapin
View Replies !
View Related
Alpha Mask For Videos
Hello,
I recently purchased a movie from iStockPhoto that has an Alpha mask so I can change the background of the movie. I know Flash is capable of doing this, but I'm not quite sure how.
Can anyone help me out?
View Replies !
View Related
Alpha Mask Problem?
Hi there!
I'm having some difficulties with some flash I use on my clients site.
I can't figure it out because the problem doesn't occur on my pc, or any I've tested. There's nothing weird/crazy/different about those flash movies. They're just some animation, but I use the alpha mask technique...
ActionScript Code:
img.cacheAsBitmap = true;
mask.cacheAsBitmap = true;
img.setMask(mask);
My client sent me a printscreen and it showed that his processor went waaaay up. He can't load the page because it freezes.
Does that have anything to do with the alpha masks I use? Are there any restrictions on using it?
The only animation I use is on _x position and _alpha... I don't scale nor rotate the imgs and texts....
My client said the problem showed on about 10% of the pcs he tested.
Any help would be very welcome!
View Replies !
View Related
ActionScript Alpha Mask?
Hey,
I've built an image class that I've used on a couple of websites (http://www.pabloandernesto.com being the most recent) that handles loading and transitioning between images.
I'm trying to build an alpha mask, using the technique in the gotoAndLearn flashlight tutorial, in ActionScript so I can make more transition effects. My code looks like this:
Code:
import flash.geom.Matrix ;
import mx.transitions.Tween ;
import mx.transitions.easing.* ;
var depth:Number ;
// set up the image
depth = this.getNextHighestDepth() ;
var image:MovieClip = this.createEmptyMovieClip('mc_'+depth, depth) ;
image.loadMovie("imgs/test.jpg") ;
image._x = 500 ;
image._y = 10 ;
// set up the mask
var type:String = "linear" ;
var colors:Array = [0,0,0] ;
var alphas:Array = [100,100,0] ;
var ratios:Array = [0,170,255] ;
var matrix:Matrix = new Matrix() ;
matrix.createGradientBox(500,450) ;
depth = this.getNextHighestDepth() ;
var mask:MovieClip = this.createEmptyMovieClip('mc_'+depth, depth) ;
with(mask) {
_x = 0 ;
_y = 10 ;
beginGradientFill(type,colors,alphas,ratios,matrix) ;
moveTo(0,0) ;
lineTo(500,0) ;
lineTo(500,450) ;
lineTo(0,450) ;
lineTo(0,0) ;
endFill() ;
}
// mask
image.cacheAsBitmap = true ;
mask.cacheAsBitmap = true ;
image.setMask(mask) ;
// and reveal
var tw:Tween = new Tween(mask, "_x", Regular.easeInOut, 0, 500, 70, false) ;
I've just put this in the first frame of a test movie. But it doesn't work, and I can't figure out why. The setMask function doesn't seem to take. Is there something blazingly stupid that I'm doing??! I don't understand it.
thanks
nic
View Replies !
View Related
Is There An Alpha Gradient Mask?
Greetings
I know the thread title is dumb, but I don't know exactly how to do what I want or what it would be called.
What I'm thinking of is a type of alpha fade in for some text, however I'd like it to fade in from the top left to the bottom right. Actually, just knowing how to fade it from top to bottom or left to right would be good.
I know a Mask can do a reveal effect, but I want it to do a fade in reveal. Like the top fades in first and works it's way down, fading in all the way to the bottom of the letter.
Can a Mask have an gradient? I just don't know how you would do that.
If anyone can give me a point in the right direction, I would be very grateful. Thanks.
View Replies !
View Related
Moving Alpha Mask
I am using a mask to hide and show text with a drop shadow. To create the mask and keep the drop shadow I am using the following ActionScript:
Code:
text.setMask(textMask);
text.cacheAsBitmap = true;
textMask.cacheAsBitmap = true;
However, when I try to use a tween to move the text the movement is choppy. I assume this is because it is rendering as a bitmap and needs to allow smoothing. (increasing frame rate from 30fps doesn't help)
Is there a way to enable smoothing on a MovieClip cached as a bitmap?
View Replies !
View Related
Trouble With Alpha
I'm having trouble with fading the alpha of a button in and out. First I was trying to fade it in and out as a button. Now I have it in a movie clip trying to fade the movie clip in and out and it still won't work. I believe I have the action scripting right, but I believe this is the problem: I initially set the movie clip alpha to 0% and when I test the file, it automtically turns the alpha to 100%. Is there some kind of bug or something or is this a common problem? I can't see anything in my scripts that could be doing this.
Here's an exerpt of code:
Frame 27
if ( proceed._alpha < 99 ) {
txtframesLoaded.text = proceed._alpha;
_root.proceed._alpha += 5;
}
else {
gotoAndPlay(29);
}
Frame 28
gotoAndPlay(27);
Frame 29
if ( proceed._alpha > 2 ) {
txtframesLoaded.text = proceed._alpha;
proceed._alpha -= 5;
}
else {
gotoAndPlay(27);
}
Frame 30
gotoAndPlay(29);
The messages in red were just there to tell me if the alpha was going up and down, which it was...
View Replies !
View Related
Trouble With Alpha Of A M C
A movie clip alpha property is controlled by a button ;
(................................................. ............................
on (rollOver) {
setProperty ("carfurnbusmc", _alpha, "3");
}
on (rollOut) {
;
setProperty ("carfurnbusmc", _alpha, "100");
}
.................................................. ...........................)
It works as it should do except that some text fields are shown with 100 % alpha ;
( All graphics of carfurnbusmc movie clip are exhibited with 3 % alpha except related txt fields ) ;
What´s wrong?
View Replies !
View Related
Mask With Alpha Fade Not Working
I have this problem where i will put an image on one layer over 15 frames, then on the top layer i will draw a square, make it a symbol, tween it over 15 frames with the shape tween with the alpha set to 0% on frame 1 and 100% on frame two, and i set that to mask and when i test the movie, it just pops the image up without the alpha tween acting as a mask. Am i doing something wrong? As far as i know this should work, but it's not.
Thanks for any help offered.
View Replies !
View Related
Gray Scale To Alpha Mask?
Is there anyway to create an alpha mask out of a grayscale image in flash?
i am using the color adjust filter to create a bleached out kind of image. I would like to make the white transparent. Any suggestions?
Thanks alot for any help.
q
View Replies !
View Related
Mask With Alpha Fade Not Working
I have this problem where i will put an image on one layer over 15 frames, then on the top layer i will draw a square, make it a symbol, tween it over 15 frames with the shape tween with the alpha set to 0% on frame 1 and 100% on frame two, and i set that to mask and when i test the movie, it just pops the image up without the alpha tween acting as a mask. Am i doing something wrong? As far as i know this should work, but it's not.
Thanks for any help offered.
View Replies !
View Related
Trouble With Alpha Setting
I made a Flash 5 movie in which I used very large white words on a black background. I turned the words into symbols and changed the alpha setting to 50% so that as they move over each other you can see through the transparent letters. When I export the movie the words are not at 50% they are back to 100% solid words with no transparency. What am I doing wrong? Here's the fla file.
http://www.tccom.com/flash/movie1.fla
Thanks
TC
View Replies !
View Related
Alpha And Onpress Trouble
HEY HELLO 2 u, i have this little problem.
- I have two buttons.
- When i push button1, button 2 fades out.
- When i push button2, button 1 fades out.
What i want 2 accomplish is that the button's can't be pressed when their alpha == 0, but can be pressed when their alpha == 100.
I tried it with an onPress = false, but when the button was alpha 100 again, i still could not press the buttons.
what am i doing wrong here.
Hope i described the problem in a good way, anyone any ideas on this.
Greetingzz from deamothul - the script keeper -
View Replies !
View Related
Trouble Reducing Alpha
I've created a grid using lines and i would like to reduce the opacity so its slightly faded. for some reason in the properties window this isn't available. am i doing something wrong or is there a diff way to do this?
View Replies !
View Related
Using Grayscale In A Mask To Make Alpha On A Gradient
Hey, i have a layer with a still picture of clouds, than another layer above it with some darkened clouds. I want to put a mask over the darkened clouds but that will slowly fade them in.. such as the mask being a white ---> black linear gradient. I know in adobe ps this is how the mask work.. not sure about flash. Please check me fla attatched
View Replies !
View Related
Alpha Or Mask On HTML/CSS Rendered Text
I'm getting some text from an XML file and I render it using HTML and a CSS file. I'm trying to fade that text (it is in a mc); it doesn't work...
I know that I have to embed the font when rendering text or htmltext if I want to fade it or whatever. But it doesn't seem to work using stylesheets.
Is it possible?
Thanks!
View Replies !
View Related
Alpha Or Mask On HTML/CSS Rendered Text
Hi! I'm a long time reader of this site, but just registered =)
I have a small question for you. I'm getting some text from an XML file and I render it using HTML and a CSS file. I'm trying to fade that text; it doesn't work...
I know that I have to embed the font when rendering text or htmltext if I want to fade it or whatever. But it doesn't seem to work using stylesheets.
Is it possible?
Thanks!
View Replies !
View Related
Alpha Mask To Fade In Dynamic Text?
I know I can use cacheAsBitmap to fade a mask over another movieClip- However I have dynamic text fields- that are populated by xml data... i'd like to fade a mask over them onRelease of a button... I've tried putting the text fields into their own movieClip- however my xml no longer loads... any ideas on how I can fix this?
thanks!!
View Replies !
View Related
Bitmap Caching Alpha Mask Issue...
Using Flash 8;
Hello,
I have a problem with a tutorial I used, on the subject, "Bitmap Caching - Alpha Masks". The tutorial is found here, http://www.devx.com/webdev/Article/29296/0/page/1.
This basically uses some of the new bitmap runtime features, along with masking, to "_Alpha tween from one picture to another". You place image 1 on layer 1, then image 2 on layer 2 and using the code "maskee.cacheAsBitmap = true; and maskMC.cacheAsBitmap = true;" slowly "reveal" the 2nd layer using an _alpha tween (there is other code involved of course!).
The problem is that it seems half the time, the 2nd image will not be "fully revealed", meaning that some of the layer 1 image is still showing. But then sometimes the effect works great and looks nice and clean.
This is a cool effect for a "Before and After" photo gallery I am working on, but not when image 1 is kind of "mixed" together with image 2.
The code works most of the time, I'm wondering if anyone has any ideas, why it sometimes seems to "get stuck half-way"?
Or does anyone know of other tutorials which describe this effect?
I have this effect live online if anyone wants to see it, just post here, or I can also post the source code, which is basically the same as the tutorial.
Thanks...
View Replies !
View Related
AS3 Event Propagation Thru Alpha Channel Mask?
Ok, in AS2 I had a bitmap with an alpha-channel that made a transparent hole (mask) in front of external, loaded .swf files (aka rounded corners of an old tv). In AS2, events went thru the hole just fine and the swfs behind handled their events. After converting to AS3, and getting the swfs loaded again, the events do NOT reach the swfs playing behind the 'mask'. Am I missing something or is this a major bug? Moving the external swfs to a higher level works, not the end of the world (I lose my rounded corners) but it proves the events don't get to the layer that worked in AS2.
View Replies !
View Related
Alpha Or Mask On HTML/CSS Rendered Text
I have a small question for you. I'm getting some text from an XML file and I render it using HTML and a CSS file. I'm trying to fade that text; it doesn't work...
I know that I have to embed the font when rendering text or htmltext if I want to fade it or whatever. But it doesn't seem to work using stylesheets.
Is it possible?
Thanks!
View Replies !
View Related
Preloader Breaks Alpha Channel Mask
I have created a movie for a web site header that utilizes Flash 8's ability to have alpha channel masks using cacheAsBitmap. Everything works fine when I play the header movie itself.
However, I am creating a separate preloader movie that will display a progress bar while the header movie is loading. This preloader uses the standard MovieClipLoader class. I am able to load the external header movie; but when it finishes loading and begins playing, the alpha channel masks are gone. It only masks as in the olden days. What causes this and what can I do to correct this?
Thanks for the help!
Mitchell Killian (II Cor. 12:9)
www.integrityDC.net
"Except a man be born again he cannot enter into the kingdom of heaven." John 3:3
View Replies !
View Related
Mask Trouble
Can anyone help me with my flash navigation? I know what I want it to do, it just won't do it, as usual.
Here's a preview: http://www.staff.ljmu.ac.uk/mkgngran/help.html
I'm using Brendan Dawes dragslidefade class to move buttons as masks over different images - only some of the buttons are inactive - bizzarely every 'even' button. Does anyone know what's causing this?
Here's the source files
Then there's the depth issue I need to figure out, but I'll try and tackle that later.
View Replies !
View Related
Trouble Using Alpha Prop On Graphics
I have a graphic I would like to set the alpha property on, which is no problem in flash. But when I test the movie, it shows the graphic at alpha 100%, regardless of its setting in the properties box. In the view pane for the scene, it displays it the way I want, just not when I test.
I've used the alpha property before without any problem. The only difference here is that my graphic is made of other graphics which are text fields. If this is the problem, how do I adjust the alpha setting on a text field?
Any help is greatly appreciated.
View Replies !
View Related
Trouble Changing Alpha On Multiple Mc's
I'm doing a menu on a site- and instead of making true roll overs- I have set the buttons (in white), onto a black background, and am using AS to alter the alpha when I roll in and out. The main buttons start at 20% alpha, go to 100% on RollOver, and back to 20% on rollOut- Thats not the problem. The problem comes next.
As the user rolls onto the instance of "Graphics_mc", I want another MC (GraphicsSubtitle_mc) appear and disappear (alpha going from 0% to 100%), right now its just going from 20% and back, with the original RollOver, and I'm sure its just a scripting error, but i can't figure it out. I'll attach the script, can anyone help?
on (release) {
_root.contents.loadMovie("Graphics.swf");
}
onClipEvent(load)
{
dir = 0;
speed = 6;
this._alpha = 20;
_parent.GraphicsSubtitle_mc._alpha = 0;
}
on (rollOver)
{
this.dir = 1;
_parent.GraphicsSubtitle_mc.dir = 1;
}
on (rollOut) {
{
this.dir = -1;
_parent.GraphicsSubtitle_mc.dir = 1
}
useHandCursor = true;
}
onClipEvent(enterFrame)
{
temp = _alpha + speed*dir;
_parent.GraphicsSubtitle_mc._alpha = Math.min(100,Math.max(temp,0));
this._alpha = Math.min(100,Math.max(temp,20));
}
And if thats more difficult than it needs to be- feel free to take liberties. Any help is appreciated. Thanks.
View Replies !
View Related
Trouble With Alpha Transparencies And Tweening.
I set up some tween events that moved some words around in my flash movie back when I was using FlashMX. I can no longer get any of these alpha transparencies to work in the compiled flash8 movies. In the workspace they fade in and out just like they should, but when I compile the .swf file and play it they just show up 100% transparency without fades. I have even tried to rebuild the words as movies, buttons, and graphics, then set the transparencies and movement on them, and then set up the motion tweens as I did before with no luck. Has anyone seen this type of thing before?
View Replies !
View Related
Trouble Changing Alpha On Multiple Mc's
I'm doing a menu on a site- and instead of making true roll overs- I have set the buttons (in white), onto a black background, and am using AS to alter the alpha when I roll in and out. The main buttons start at 20% alpha, go to 100% on RollOver, and back to 20% on rollOut- Thats not the problem. The problem comes next.
As the user rolls onto the instance of "Graphics_mc", I want another MC (GraphicsSubtitle_mc) appear and disappear (alpha going from 0% to 100%), right now its just going from 20% and back, with the original RollOver, and I'm sure its just a scripting error, but i can't figure it out. I'll attach the script, can anyone help?
on (release) {
_root.contents.loadMovie("Graphics.swf");
}
onClipEvent(load)
{
dir = 0;
speed = 6;
this._alpha = 20;
_parent.GraphicsSubtitle_mc._alpha = 0;
}
on (rollOver)
{
this.dir = 1;
_parent.GraphicsSubtitle_mc.dir = 1;
}
on (rollOut) {
{
this.dir = -1;
_parent.GraphicsSubtitle_mc.dir = 1
}
useHandCursor = true;
}
onClipEvent(enterFrame)
{
temp = _alpha + speed*dir;
_parent.GraphicsSubtitle_mc._alpha = Math.min(100,Math.max(temp,0));
this._alpha = Math.min(100,Math.max(temp,20));
}
And if thats more difficult than it needs to be- feel free to take liberties. Any help is appreciated. Thanks.
View Replies !
View Related
|