How To Control The Swf Alpha
Hello. I'm going crazy
Here is my problem... it's very simple... but...
I have one picture in a layer and another (in other layer) above it.
Ok, i need apply alpha 0 to 100 to both picture at same time, and doesn't works. I need to appear all from alpha 0...
I hope you help me....
Thanks!
manu.-.
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 04-09-2007, 03:36 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Couldn't Control Alpha Of The Children Mc After Set The Parent's Alpha
Hi,
I have 4 little thumbnails mc in a parent mc, and I set the alpha of the
parent mc to 0, then I want the child to appear one by one, but flash
won't respond to that unless I set the alpha of the children seperately
to 0, does anyone know how to solve that? thanks in advance.
-c
Alpha Control
Hi
Can you guys tell me where I might find a tutorial on alpha control using mouse position??
Like the menu on this cool site?
www.ultra16.com
thanks
mbt
Can't Get Alpha Control
For some reason when I click on my symbol, the alpha control isnt there.
How do I get it back? I already have the properties open at the bottom.
Using Flash MX 2004 Pro.
Thanks
Alpha Control
Greetings to all - g'day soulty
Being a first, I'll keep it short.
I'm hoping someone knows about controlling alpha percentages.
What I'd like to do is to create navbar in flash with a sliding selector tab
The buttons are in blu, rollover in white, slider is dark blu.
the slider moves across horizontally to where the txt btns, while the mouse is over the txt is white
I'd like the txt to remain white until the sliders moves away rather than when the mouse rolls out.
I thought I'd create a 'txt symbol' for each but which would be controlled by the alpha %.
My actionscript writing skills are minimal tho' I'm keen to learn, so if you have the answer please post it.
Many thanks and glad to be aboard
Jamsha
Alpha Control Of Mc's
im currently using a listener/array setup that allows me to increase or decrease the alpha transparency of several movie clips via the up and down keys on my keyboard.
what i'm trying to do (but can't seem to get straight) is change this setup so that the alpha transparency of the movie clips is controlled by a single button (increase the transparency onRollOver and decrease the transparency onRollOut).
Control Alpha And Color Of Mc
i control the alpha of an mc with the following two frames.
if (mc._alpha>0) {
setProperty (_root.image, _alpha, _root.image._alpha-10);
}
Control Alpha Of Mc With Button
I have a movie clip on my stage, in the first frame of the movie I set the alpha of the mc to 0,
this.mymovieclip._alpha=0;
Now when I hit a button I want the movie clip to go from 0 alpha to 90.
Can someone advise.
Thanks
mr mooch
Control Alpha With Actionscript?
Hi Ya'll I got an object (a button to be precise) to which I want to control the transparency (alpha value) with action script. The even is an 'OnRollover' and I want the button to go from 50% alpha to 100% - I know I can do this within the button itself but for my purposes I'd like to control it from the instance level.
So I'd like to add the action to the instance called 'ff2'. Any ideas? I find that the help in the book I have as well as the application help is kinda weak for simple stuff...
I'm thinking its some syntactically correct version of a statement like this...
on (rollOver) {
alpha = 100;
}
Any help is much appreciated - thnx!
[F8] Trying To Dynamically Control Alpha Of An Mc
I'm building a custom preloader and want an MC that I've called "lidopenM" to fade in as the site loads. This is the code I'm using but to no avail. Any help?
Code:
var amountLoaded:Number = _root.getBytesLoaded()/_root.getBytesTotal();
preloader._width = amountLoaded * 255;
loadText.text = Math.round(amountLoaded * 100) + "%";
lidopenM.alpha = amountLoaded;
Timer To Control Alpha Help
So i am trying to make a MC that will start at the first frame of the root and then every 300 frames change the top layers alpha up 15 % until it hits 80 and then restart the (said) MC. I know i will need an event listener for this and a timer funtion but no clue how to put it all togather.
my movie clip is called br_MC
please help
[CS3] Slider To Control Alpha
I would like to create a slider to control the alpha of a color box. I can't seem to find anything anywhere on how to do this. I would like to use ActionScript 2.0. If anyone knows how I can code my slide bar to do this, please let me know.
Alpha With Actionscript Control
Hi.
I am sure this is simple. I have a button and I want to have the alpha change when it rolls over and go back to 100% when it rolls out.
I want it to do it in increments so it looks like it is animate and stop when it hits 50.
This is what I have. It doesn't work right it just goes right to 50. I want to see the steps in between 100-50.
gramp_stamp_mc.onRollOver = function ()
{
if (this._alpha > 50)
{
this._alpha = this._alpha --;
}
else delete.this._aplha
}
Control The Alpha In Pictures
Hi every one!!!
I need some help with a alpha problem.
I have some pictures in my movie, and I want to control the alpha value with a button. When I push the button I want one picture to alpha value 100 and the two others in alpha value 0.
Is their anyone how can tell how that can be possible???
If so I would be very happy...
Best regards!!!
Michael
Using XML To Control Alpha Settings
I am creating a Flash based map and need to control the visibility of certain elements, these will be passed to the Flash file from an HTML page using XML, has anyone got any ideas of how I might go about implementing the Flash side of this???
Thanks
Alpha Slide-control
Hi....
what I have to do to build a slidebar that control the alpha level of the MC ?
Control Alpha Mouse In/out
trying to create a movie clip that has button actions embedded in it. as you know, using button action or AS to control the timeline would conflict with multiple buttons nested in the movie (the individual buttons are using 'this.')
i am trying to figure out a way to use mouse position to alpha fade in / out an area (movie clip) with button actions nested in that movie clip working with out conflict when using 'this.' in the buttons
thank you
Slider To Control Alpha
I would like to create a slider to control the alpha of a color box. I can't seem to find anything anywhere on how to do this. I would like to use ActionScript 2.0. If anyone knows how I can code my slide bar to do this, please let me know.
Alpha Control Via Keyboard
i have several buttons on my main page that i'd like some alpha control over, preferably as a group, using my keyboard (press to fade down to 0%, release to fade up to 100%). i tried searching for specific and relative topics on the boards but didn't have much luck.
How Can I Control The Alpha In A Fill In Flash 5?
I'm trying to Add a transparancy in a gradant in flash 5.
I know how to did it in four so I don't think that they would remove the option from the later model, But I can't seem to find can any one please help.
thanks.
Button To Control AS Alpha Tween
http://www.minoflow.com/
Hi,
Just a quick question. The links on the site above have a nice alpha tween effect. It looks like the rollover fades out the alpha so that the links appear brighter. When you rollout the alpha reduces.
What would be the best/most logical way to do this? I presume you create some AS that contols the alpha tween and keep this on the timeline as a function. Then for each button you call the function.
I'm a bit new to this so am just looking for some guidance before i go wrong! any tutorials you know of would be great.
cheers
How Do You Control Alpha Of Dynamic Text?
I have a movie clip that has a dynamic text box in it. I want the movie clip to fade in but all the elements fade in except the dynamic text box. It's alpha is 100% no matter what!
[F8] Loaded Level Mc Alpha Control?
Morning!
Can anyone tell me why this script doesn't work and how I can put it right please?
I am loading an external swf into level1 of another swf - what I am trying to do is control the alpha settings of some mc's (tiles) in the loaded movie - in the loaded I have this code that hides the tile mc's until the button is pressed:
PHP Code:
function hideAll() {
for (var n = 1; n<=32; n++) {
_root["tile"+n]._alpha = 0;
}
}
function showAll() {
for (var n = 1; n<=32; n++) {
_root["tile"+n]._alpha = 50;
}
}
//
_root.CENTERpages.btnName.onRelease = function() {
showAll();
};
hideAll();
This works fine - just to complicate things - I can't use _root. in my loaded movie as the movie it loads into doesn't recognise the call. and to complicate it more - the button (btnName) is now in the main timeline of level0 - I thought that this code (on level1 timeline) would be the job...
PHP Code:
function hideAll() {
for (var n = 1; n<=32; n++) {
_parent["tile"+n]._alpha = 0;
}
}
function showAll() {
for (var n = 1; n<=32; n++) {
_parent["tile"+n]._alpha = 50;
}
}
//
_level0.CENTERpages.btnName.onRelease = function() {
showAll();
};
hideAll();
but it doesn't work! - I have tried numerous variations but it just doesn't do it!
How can I load an swf into level1 - hide(with alpha) the tile clips on the timeline of level1 - and the show the tile clips on level1 (50% alpha) when a button in a movieclip on the level0 is released???? all using _parent and not _root?
Anyone know what's up with my code? I can't load into a movieclip it has to be a level
Make A Mc Alpha Go Up And Down And Control Speed
Hello i posted another tread but i will rephrase my self with this one.
How can you set a start alpha point for a MC then make it go up and down within a definable range and also set the speed of going up and down with action script????????
your input would be very valuable on this one
thanks alot.
TextField.htmlText --> Alpha Control?
So I've set up this text field in my SWF that takes dynamically loaded HTML text (from an HTML file) and parses it for the SWF itself. I'm able to load the data just fine, with HTML markup tags all working, but here's my problem: when I try to set the font to outlines for the textField that's receiving my dynamic data, no text shows up. The reason I'm setting the font to outlines is so that I can fade that text in/out (if it's not embedded, then the text just shows up abruptly on the screen).
So, ultimately, my question is: Do you know of a way to have HTML-encoded text fade in/out? I've tried putting the textField into a movieClip and tried fading the movieClip, but that doesn't work unless the font's embedded (and if the font's embedded then the text doesn't render. Arghhh, viscious cycle...).
Can You Control The Alpha Of An Input Text Box?
Using Action Script, I mean?
If I put a ball on the stage and make it a movie, I can make it vanish by putting
ball._alpha -= 100;
If I put an input text field on the stage and reference it by name that doesn't work.
If I turn the text field into a MC it STILL doesn't work.
Heck, if I put the text field in the mc with the ball the ball disappears but the text field is still there.
How do I use AS to make an input text field disappear?
Using Mouse Coordinates To Control Swf Alpha
I have a main page which call a couple of swfs into blank MCs. I'd like the swfs to fade when the mouse enters a certain area of the main swf.
I have tried a simple conditional statement using the ymouse property to control the alpha of the MCs holding the swfs. They fade once and never reappear.
Do I need to instruct flash to check the mouse position after every frame and if so what language should I use to do that?
Thanks for any help.
Using As To Control Alpha Of Movie Clip
Hey guys, I'm trying to get a dynamically loaded jpeg to fade in when the scene is loaded, and then fade out when the next scene is loaded. I know the first part of the code works to load the jpg, but the second part I found in a tutorial and I can't see what I'm doing wrong with it. It's probably something simple, but I don't see it. Can you take a look and either suggest a better way or correct my mistakes? Thanks.
ActionScript Code:
_root.createEmptyMovieClip("imageHolder1", 200);
imageHolder1._x=0;
imageHolder1._y=0;
loadMovie("02.jpg","imageHolder1");
function alphaTween() {
easeType = mx.transitions.easing.None.easeNone;
var time = 2;
startAlphaTween = new mx.transitions.Tween("imageHolder1", "_alpha", easeType, 0, 100, time, true);
}
Control Length/Alpha With ActionScripting
Right now i have a slide show that is pretty basic, it has three banners that fade in and out.... they are on there for about 10 seconds... 120 frames....
problem is when i want to change a banner out of the three, i have to go back and rebuild the flash document...
I've been reading this flash book that mentions how most timeline effects can be accomplished with actionscripting. unfourtunatly all i can find so far that mentiones alpha is...
PHP Code:
function fadeIn (bgClip) {
bgClip.onEnterFrame = function() {
if(this._alpha < 100) {
this._alpha +=20;
}
};
}
function fadeOut (bgClip) {
bgClip.onEnterFrame = function() {
if(this._alpha > 0) {
this._alpha -=20;
}
};
}
problem is, this doesnt really deal with how long the effect should last, just that bgClip should fade in or out 20% depending on its current opacity.
is there a way to specify a length, that way all i have to do is add the three banners in a single key frame, and control everything via ActionScripting??
Control Alpha Of Text Created Dynamically
Hello all,
I have a project where text is created via createTextField. Is there a way to control the alpha property of this text field?
I've read through the forums here and see lots of info about embedding fonts. How do I do that with a dynamically created text field?
Heres my code:
Code:
// Create a new text field to hold text. NOTE the UI scrollbar must be on the second frame
// becasue the textfield created here must first be created before the uibar instance
this.createTextField("table_txt", 99, -26.1, -13, 340, 170);
table_txt.multiline = true;
table_txt.html = true;
table_txt.wordWrap = true;
// Creates column headers, formatted in bold, separated by tabs.
var rowHeaders:String = "";
// Creates rows with data.
var row_1:String = "<FONT FACE ='Verdana' SIZE ='12'><b>BSI </b> Gloves and eye protection</FONT>";
var row_2:String = "<FONT FACE ='Verdana' SIZE ='12'><b>Scene Saftey</b> Scene is safe</FONT>";
// Sets two tabstops, at 25 and 120 points.
table_txt.htmlText = "<textformat tabstops='[25,120]'>";
table_txt.htmlText += rowHeaders;
table_txt.htmlText += row_1;
table_txt.htmlText += row_2 ;
table_txt.htmlText += "</textformat>";
Any ideas or help is greatly appreciated.
Thanks
Greg
Enabling A Dragable Button To Control Alpha Level
Hi, I'll get straight to the point. I am working on a project at the moment and I've hit a problem. I have a dragable symbol(cylinder) that only moves on the Y axis, what I want it to do is control the alpha channel on another symbol (sunglasses), for example...When the cylinder is dragged upwards the alpha increases, but when the cylinder is dragged down the alpha decreases. Any help would be greatly recieved. Unfortunatly I cant post the project on here for copyright issues etc. This is my 1st message on here so I apologise for my very very poor spelling. I can write code but when it comes to this I suck.
Using A Button To Control The Transparency (alpha) Of A Movie Clip
Hello i am completely new to the forum and i have been racking my brain searching for tutorials on this, i have done a search on buttons controlling movie clips and alot of stuff did come up but it was not exactly what i was looking for.
i am creating a HUD ( heads up display) for a game me and a few friends are making, i have windows i made in photoshop and turned into movie clips which i would like to control using buttons.
What i would like to do is when i click the buttons i would like them to control the transparency of the windows, for eg. when i click my button i would like the window to appear at 100% then when i click it again for it to go to 0% as if i have closed the window.
Any help would be greatly appreciated as this has had me up late so many nights. I am using flash cs3 and action script 2.0 as i a familiar with it.
Im Using As2.0 To Try And Build A Slider To Control The Alpha Of Another Movie Clip
hi
i was wondering if u could help me, iam trying to bulid a slider which will change the alpha of another movie clip named light.
how do i do this.
here is the actionscript i have so far:
Code:
onClipEvent (load) {
top = _y;
bottom = _y;
left = _x;
right = _x+100;
}
this actionscript is on a movie clip containing the slider button, and on the button is the actionscript bellow:
Code:
on (press) {
startDrag("", false, left, top, right, bottom);
}
on (release) {
stopDrag();
}
Thanx for any help
BitmapData Alpha Breaks When Changing Alpha Of Container Sprite
Hi,
I posted this in Flash CS3 forum on Friday, but have had no replies, and am still stuck, sorry for cross-posting.
I have the following structure:
Code:
Pane:MovieClip
Content:Sprite
image:BitmapData
Pane is an asset in the Library, and is dynamically placed inside another Sprite. The Library asset Pane already contains the Content sprite which contains the image BitmapData.
The image is originally a 24-bit PNG, and it doesn't seem to matter to the problem whether I use Lossless or Photo compression.
My problem is when I change the alpha on the Content Sprite in the Pane class, the alpha transparency image on turns to a solid black.
Also, not sure if this is related, two textboxes in another Pane's Content Sprite get two horizontal white lines, above and below, them--while I am changing the alpha of the first Pane.
Anybody know how to fix this?
This is my first AS3 project, so apologies if I missed something obvious.
Scrllpane Comp Changing Alpha But Not Contents Alpha.
I've had a go at this a few times it seems the scrollpane component can change the _alpha of it but that changes the content mcs ect that is in the comp to the same alpha as well. I want to make the scrollbars of it alpha 50 and the mcs in it stil 100 normal. It involves loading many more mcs swf's into the scrollpane so just need it set to main content at 100 percent alpha and so be able to change the scrollbars to alpha 50 or whatever?
Changing Alpha Programatically - Alpha Values Not Whole Numbers
I'm doing alpha changes on an image programatically in an onEnterFrame method. My code is this simple:
trace(mc1_mc._alpha);
mc1_mc._alpha -= 2;
trace(mc1_mc._alpha);
The output is:
100
97.65625
My question is, how is 100 - 2 = 97.65625? What is going on here? It gives this answer even if I use Math.round() on it. Any ideas?
Advancing Alpha Counter...as In Alpha Numeric
Is there a way to get an advancing alpha counter, such as a, b, c, d, etc. instead of 1, 2, 3, 4, etc.
Other than creating an array of a, b, c, d
advancing = new Array("a", "b", "c", "d");
i++;
advancing[i];
Thanks.
_t
Calling Alpha Value To Start Another Alpha Fade?
hey all!
okay so here's the deal I'm on a mission to make these buttons fade in one after another using a.s
and I'd like all my code to be in one frame [don't we all though ]
so far i have one fading in using
Code:
this.onEnterFrame = function() {
if(btn1._alpha < 100) {
btn1._alpha += 10;
}
}
now when i said i wanted the buttons to fade in one after another i was kinda fibbing ... what i really want is when btn1 reaches an alpha of 40 i want btn2 to start this same fade in process, then when btn2 reaches 40 i want btn3 to do the same and so on...
see the effect here [you have to enter the site] when you click on work, troops & contact
now i have also been searching for a easy to understand tutorial on how to make your own functions [that's the one where you can write a whole bunch of code stuff then call it later using only a little code, right?
well obviously i want to use this idea so i don't have to write out [okay lets be real here - copy and paste] the fade in code each time.
that way i figure i can say
if(btn1._alpha = 40)
do the function thingy to btn2
i tried this a.s, it only results in btn2 fading in as asked but btn1 stops fading at 40
Code:
if(btn1._alpha = 40) {
this.onEnterFrame = function() {
if(btn2._alpha < 100) {
btn2._alpha += 10;
}
}
}
any ideas would be the shizzel bo dizzel nizzel!
cheers fo' all the help so far!
-demian
Calling Alpha Value To Start Another Alpha Fade?
hey all!
okay so here's the deal I'm on a mission to make these buttons fade in one after another using a.s
and I'd like all my code to be in one frame [don't we all though ]
so far i have one fading in using
Code:
this.onEnterFrame = function() {
if(btn1._alpha < 100) {
btn1._alpha += 10;
}
}
now when i said i wanted the buttons to fade in one after another i was kinda fibbing ... what i really want is when btn1 reaches an alpha of 40 i want btn2 to start this same fade in process, then when btn2 reaches 40 i want btn3 to do the same and so on...
see the effect here [you have to enter the site] when you click on work, troops & contact
now i have also been searching for a easy to understand tutorial on how to make your own functions [that's the one where you can write a whole bunch of code stuff then call it later using only a little code, right?
well obviously i want to use this idea so i don't have to write out [okay lets be real here - copy and paste] the fade in code each time.
that way i figure i can say
if(btn1._alpha = 40)
do the function thingy to btn2
i tried this a.s, it only results in btn2 fading in as asked but btn1 stops fading at 40
Code:
if(btn1._alpha = 40) {
this.onEnterFrame = function() {
if(btn2._alpha < 100) {
btn2._alpha += 10;
}
}
}
any ideas would be the shizzel bo dizzel nizzel!
cheers fo' all the help so far!
-demian
[jpeg Alpha Load] Loaing Jpg In To A Mc With Alpha
ok i am loading a jpeg into a empty MC and when it load in i would it to alpha from o to 100
please can you help
i have been trying with this
onClipEvent(data) {
_alpha == 0;
_parent.images = int(getBytesLoaded()/getBytesTotal()*100);
if (getBytesLoaded() != getBytesTotal()) {
isloaded = 1;
}
}
onClipEvent(enterFrame) {
if (isloaded) {
alpha ++;
if (_alpha == 99) {
isLoaded = !isLoaded;
}
}
but not get any luck
How Can I Make A Button Go From Alpha 0 To Alpha 100
i wanna create a rollover button
i made the before and after pngs in PS
and i want to put the image that will appear over the original image with an alpha of 0 and when i roll over it the alpha to turn to 100 so it looks like the fade in
how do i change a graphic alpha ?
how can i do this please help
Sound Control With Pause Button As Well As Timeline Control
Hi there
I have a flash page, with a ambient track playing. I added a pause and play button. So you press the button then it stops, then you press it again then it plays...
So now i want to make it so that if you go to the 'WORK' page on the site, wich is on its own frame, and wich has different buttons linking to it, then i want the sound to switch off when i am on the work page as well.
So if the background ambient music plays, and you go to work then the sound switches off. Untill you switch it back on again
How is the best way for me to do that?
Making Alpha 0 To Alpha 100
Dear All,
I was just wondering if anybody knows, how to change alpha 0 to 100 for a perticular layer ?? I would really appreciate for the help, Thanks !!
-Ankur
Alpha Changes In A Gradient With Alpha
Hi there I am having a bit of a problem.
I have a gradient which goes like this:
100% Black -----> 60% Black
This gradient is over an object. And the whole form a movieclip.
Now if I want to apply a tween effect to that movieclip, lets say, frame 1 mymc is 100% alpha and tweens to 0% alpha in frame 20, this makes the gradient dissapear wile tweening showing the object that was beneath it in the movieclip. The gradient is not a mask, and even if I convert it as a mask and tick the Use Runtime Bitmap caching, and I create it from AS3 it does the same.
I don't know if I explained myself properly, but I'd like some input from you guys
thanks!
|