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.
Adobe > ActionScript 1 and 2
Posted on: 02/08/2008 06:14:22 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[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.
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
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
Slider And Alpha
Can anyone tell me if there's something wrong with my scripting here.
The ring is jerky on left side but smooth and fast on right. Spent two days now trying to work out why.
It doesn't seem to be the images, so I'm wondering if it's the scripting.
Alpha Slider
Hey everyone,
I was wondering if someone could help put an end to my bitter struggle. I have a slider ball and its movement is contained and I want its position to correspond to the alpha level of another movieclip. I've been struggling with this for a while now and can't figure it out...I'm sure this will be easy for many of you..so I'm hoping to figure something out. Here is the code:
ActionScript Code:
top = borderMC._y-borderMC._height/2+sliderMC._height/2;bottom = borderMC._y+borderMC._height/2-sliderMC._height/2;side = borderMC._x;sliderMC.onPress = function() { this.startDrag(false, side, top, side, bottom);};sliderMC.onRelease = function() { this.stopDrag();};sliderMC.onEnterFrame = function() { if (sliderMC._y == bottom) { alphaMC._alpha = 0; } else if (sliderMC._y == top) { alphaMC._alpha = 100; }};
Anyways if anyone could help that would be great!
Thanks
Kyle
Alpha Slider
Can somebody help me fix this slider. It works but something is off with my math and it doesn't see the full length of the slider. Resulting in only half of the slider actually changing the alpha of the moviceclip.
My slider is 282 pixels wide. Here is the code....
ActionScript Code:
var ratio:Number = 0;dragger.onPress = function(){ this.startDrag(true, 232, 800.2, 494.1, 800.2); this.onMouseMove = function() { ratio = Math.round(this._x); };};dragger.onRelease = dragger.onReleaseOutside=function (){ this.stopDrag(); this.onMouseMove = undefined;};this.onEnterFrame = function(){ bigscan2._alpha = -100+((dragger._x-175)/1.40);};
Here is a link to the FLA file if you want to see what I mean. Thank you for any help on this....
Sincerely,
Greg
Alpha Slider
Hey everyone,
I was wondering if someone could help put an end to my bitter struggle. I have a slider ball and its movement is contained and I want its position to correspond to the alpha level of another movieclip. I've been struggling with this for a while now and can't figure it out...I'm sure this will be easy for many of you..so I'm hoping to figure something out. Here is the code:
ActionScript Code:
top = borderMC._y-borderMC._height/2+sliderMC._height/2;bottom = borderMC._y+borderMC._height/2-sliderMC._height/2;side = borderMC._x;sliderMC.onPress = function() { this.startDrag(false, side, top, side, bottom);};sliderMC.onRelease = function() { this.stopDrag();};sliderMC.onEnterFrame = function() { if (sliderMC._y == bottom) { alphaMC._alpha = 0; } else if (sliderMC._y == top) { alphaMC._alpha = 100; }};
Anyways if anyone could help that would be great!
Thanks
Kyle
Changing The Alpha Using A Slider
I have been searching forums and the web for hours now and cannot work out how to change the alpha of an mc using a slider. I think I am almost there. I have included the .fla. I have tried lots of ways and have resorted to synching the alpha tween with the sound volume. But it still isnt working
This is a bit of the code on the slider mc:
onClipEvent(enterFrame){
if (dragging==true){
_root.soundLoop.setVolume(Int(100+(top-_y)))
and globally on the timeline I have:
soundLoop = new Sound(_root.loop); //what's this line doing?
soundLoop.attachSound("loop");
soundLoop.setVolume(50);
soundLoop.start(0,999);
globalSound = new Sound();
Could someone explain to me what the top line is doing please? I thought this would be simple to do :s
Please help someone
Alex
Help Changing Alpha Of One MC With A Slider MC.
Thank you for reading.
I'm sorry, but I just can't figure this out. I'm a copywriter and I want to build an online portfolio. The idea is to have a slider movieClip along the left slide that can be dragged vertically up and down, which would then control a horizontally scrolling movieClip in the center of the stage. The horizontally scrolling movieClip in the center of the stage would contain thumbnails of my portfolio pieces. When a visitor wants a closer look at a piece, they would click on the thumbnail and a separate movieClip window opens with a larger example of the piece along with additional information.
I have made a movieClip slider that can be dragged only vertically on the left side of the stage. Along its axis are five category titles, "advertising", "design", "multi-media", etc. These are also aligned vertically in parallel with the line. What I'm so far trying to do, and not having much luck doing, is have the titles incrementally fade up from an alpha of zero to 100% when the slider's _y position matches the title's _y position, then fade back to zero as the slider moves away in either up/down direction.
As I said, eventually I'd like the slider to also scroll another movieClip horizontally so that as the slider becomes aligned with one of the highlighted category titles, such as "multi-media", the multi-media thumbnails would be visible in the left/right scrolling MC.
I have four Flash books open in front of me, PLUS the AS 2.0 Dictionary, plus all the resources of the web, and I still can't figure this out. Believe me, any help at this point would be great appreciated.
Thanks again for reading this.
bfg
Changing The Alpha Of A M.c. With A Slider
Hello!
I have been checking out the following tutorial:
http://www.kirupa.com/developer/mx/volume_slider.htm
on how to adjust the volume with a slider.
it's great!
what I'd like to do is use that same slider to adjust the alpha
of a movie clip.
is that possible?
or maybe adjust the alpha of a symbol.
what i'm trying to do is create "mood lighting"
where the user can move a slider and lighten or darken an interior
space, by adjusting the alpha of a dark square on top of the scene.
can anyone help me????
thanks,
jeremy.
Slider Controls Alpha Level?
Trying to get a slidebar to control the alpha level of a movie clip in FLash MX 2004 Pro.
I've got a slider mc named myAplha. It's code is as follows:
this.ratio = 0;
dragger.onPress = function() {
this.startDrag(true, 0, 0, line._width, 0);
this.onEnterFrame = function() {
ratio = Math.round(this._x*100/line._width);
};
};
dragger.onRelease = dragger.onreleaseOutside=stopDrag;
on my main timeline, I've got a movieclip called myMC and the slider.
So how do I make the slider modify the alpha level of myMC?
Trying To Alpha Volume Slider Indicator On MouseOut?
I have a volume slider that has a percentage indicator attached to the slider movie clip so that it moves with the slider, and right now it stays up all the time. I want to hide it on mouseOut and show it on mouseOver HOW?
I set things up so that my trace shows the right values for sliderAlpha, it alternates between 100 and 0 every time i mouse across the slider button...but I can't figure out how to apply the movieClip.alpha=sliderAlpha.
what level does this script have to be on?
I have the text in a movieClip that is nothing but a dynamic text box populated with the volume percentage. Any thoughts at all on this?
Slider Control Of MC
I want to control the time line of my MC with a slider. The MC is 10 frames of mask tween.
I know I've seen this done, but I can't find it.
Wheels
Slider Control A MC
I would like to make a slider bar that controls a movie (slide to the right and it plays forward, slide to the left and it plays backwards). How do I do that?
Control A MC With A Slider?
hi there,
i am trying to control a movie clip (with a shape tween in it) with a slider.
So i created a slider and while dragging saving it's position in a variable. Then with an enterFrame handler i passed the variable to a gotoAndStop(variable), so for each position of the dragbutton i have a new value for the movie clip. the problem is that when i move the slider very fast then the movie clip is not updating correctly. would anybody be kind enough to help me?
here i have some of the code i used:
code for the drag operation(on the dragbutton which is in the "slider" Movie clip):
on (press) {
startDrag("", false, left, top, right, bottom);
}
on (release, releaseOutside) {
stopDrag();
}
code for the slider MC:
onClipEvent (load) {
var left = _x;
var top = _y;
var right = _x+50;
var bottom = _y;
}
onClipEvent (enterFrame) {
_root.mytransform = Math.round((50 -( right-_x))*2);
}
code for the MC which contains the tweening:
onClipEvent(enterFrame){
_root.circleMC.gotoAndStop(Number(_root.mytransfor m)/2);
}
thanks guys!!!
Help::slider To Control MC ?
I NEED HELP
I have a 4 frame MC with keyframes on each of the 4 frames
now i want a slider on the main timeline(stage) which woud make the MC goto either of the 4 frames on sliding..
Get that ?
MOMMY, I am pathetic at explaining things..... but am good at getting explained... so plz help
Slider Control MX AS?
Anyone have working AS sample for these comopnents can't find any reference for them at MM
Slider Control
Hi i want to design a slider where it is segmented into 12 months, when the the control button is over one of the months, that months details are displayed. there should be only one set of details on the screen at any one time. Can anybody help??
Thanks in advance
Dav.
Mp3 Slider Control
Hi there,
Trying to get an mp3 to load into a flash clip with a slider control for playback.
Have done a load of searches and not came up with anything yet.
Can anyone point me towards some code or tutes on this?
any time/help is appreciated
G
Control MC With Slider
i am looking for a tutorial/example of how to control the timeline of a movie clip with a sidebar
thanks
Control Slider
I have a movie with a control slider that calculates a ratio fom 0-100. I am using it to control the alpha of some images. For example mymovie.myimage._alpha = myslider.ratio I am also using it to control the sound of 2 mp3s. The mp3s are not preloaded with the movie. I donnot want to preload them due to file size. I also added buttons to move the control slider button left and right. I am having some problems and cannot seem to find a solution.
Problem
1. Locally the sounds work fine. However when downloading from the web, once the sounds are loaded only 1 sound if any work. If you refresh, both of the sounds work(I assume because they are in the cache). Also the sound doesn't begin playing unless you have already clicked and dragged the slider button.
2. The buttons(which are the words day and night) that move the slider left and right work but the alpha channels and the sounds are not effected unless you have already clicked and dragged the slider button.
I think some of the problem stems from the actionscripting that works the slider and calculates the ratio.
this.ratio=0 ;
function drag(){
this.startDrag(true,0,0,line._width,0);
this.onEnterFrame=function(){
ratio=Math.round(this._x*100/line._width);
_root.volume = ratio;
_root.volume2 = ratio - 100;
};
};
dragger.onPress=drag
dragger.onRelease=dragger.onreleaseOutside=stopDra g;
as for the sounds I dont know.
The swf is here
http://www.glowstep.com/flash
the fla here
http://www.glowstep.com/flash/slider_new22.fla
and mp3s
http://www.glowstep.com/flash/night.mp3
http://www.glowstep.com/flash/morning.mp3
Slider Control For Mc
Hey anyone who wants to help me,
I'm going for something like this: http://www.markliddell.com
I need to control a movie with a slider bar and also have pause/play/next/previous buttons. But I think this can be done better than the above link.. I would like the slider to drag into locked positions where each photo would be. So it locks into position, and then goes to the next. I can't find an example of what I mean online right now so I hope this makes sense. If not, at least I tried
Oh, and believe me, I've searched for over 3 hours now. If you found a better search please share!
peace
R
Slider Control Mapping
Okay here's the scoop - I made a slider smart clip whose range can be modified. Now the slider can be clicked, clicked and then dragged, or moved by arrow buttons. I've worked it all out mathematically as to where the slider is supposed to be for a given x position, and vice-versa. The slider functios correctly for [min-max] negative-negative, negative-0, and 0-positive ranges. However when I try positive-positive ranges, like 10-100 (whose range is 90) The clip doesn't function correctly. I don't know why my math doesn't cover this case and yet works for everything else. If you would like to take a stab at solving this, just email me your address and I'll send you the control and its documentation. You get to keep the control, of course - and besides this bug I just found, it's a very powerful slider. Hope to hear from you - kitesports@hotmail.com
Slider To Control My Movie
Greetz,
Say I have a ball moving from the left to the right side of the screen. Just animating that is no problem. Now I would like to have a slider underneith that ball that controls the ball. Is the slider in the middle the ball will also be in the middle, if you movet he slider to the right the ball will follow.
Can somebody help me with this.
thanks
Slider Control Bgcolor
Dear people.
I'm looking for a way to have a slider control the background color of the web page hosting the flash file.
The thing is, I want it to slide from black to white with of course grey scales in the middle.
Any suggestions ?
So far I have a function in javascript in the html page setting the bgcolor.
from flash I can send the getURL ("javascript:color('#000000')");
but how do I get to make a slider produce hex code to send to the javascript ??
Control A MC Playback With A Slider
hi there,
i am trying to control a movie clip (with a shape tween in it) with a slider.
So i created a slider and while dragging saving it's position in a variable. Then with an enterFrame handler i passed the variable to a gotoAndStop(variable), so for each position of the dragbutton i have a new value for the movie clip. the problem is that when i move the slider very fast then the movie clip is not updating correctly. would anybody be kind enough to help me?
here i have some of the code i used:
code for the drag operation(on the dragbutton which is in the "slider" Movie clip):
on (press) {
startDrag("", false, left, top, right, bottom);
}
on (release, releaseOutside) {
stopDrag();
}
code for the slider MC:
onClipEvent (load) {
var left = _x;
var top = _y;
var right = _x+50;
var bottom = _y;
}
onClipEvent (enterFrame) {
_root.mytransform = Math.round((50 -( right-_x))*2);
}
code for the MC which contains the tweening:
onClipEvent(enterFrame){
_root.circleMC.gotoAndStop(Number(_root.mytransfor m)/2);
}
thanks guys!!!
Slider Control For Keyframes
Hello,
I've got a problem with my slider control,i want to use a slider so that when i move it it corresponds with my keyframe timeline,just like when you would use it in flash when you drag your timeline back and forth.I've created a swift 3d animation of a 100 keyframes and want to use a slider to move it across the frames,so that my animation only plays when i move my slider.
Button Slider To Control MC ?
im not sure exactly how to word this but here goes...
how can i make a button that when i drag it up and down in the y coordinate it changes (example alpha)on a movieclip
i want the button's y coordinates determine the alpha of the movie clip
thank in advance...and like i said i wasnt sure how to word it
-2
Slider Bar To Control Timeline?
can anyone tell me (or tell me where to find a tutorial) telling me how to make a slider bar control my main timeline?
i have 12 images of 12 sides of a product and i want to be able to use a slider to create a 3d effect. pretty much liek this:
Samsung A500
thanks!
Advanced Slider Control
I am creating a menu for a webpage and I have been trying to modify this code so that I have opposite animations. In the fla below I there are pictures that are split in 2. There are 2 control movies that reference the _xpos of these picture(movies) and I want them to slide to meet one another and assemle correctly when you click on a certain button.
This really isn't confusing once you look at the fla file so if someone can help me I'd really appreciate it.
http://www.pointnorthds.com/banner.fla
Thanks
Movie Control Slider
Hoping someone can help me out here!
I have a movie (about 800 frames). I want to include a timeline status slider for the movie. I created a shape tween for the length of the movie so that the viewer can see how far along they are in the movie, but i want them to be able to drag the slider back or forward to rewind or fast forward the movie.
I've searched the board and the tutorials and have found small pieces, but I can't seem to get anything to work.
I have the dragging part figured out... but it would be SO helpful if someone could help me set a target spot, and when the slider is dropped into that spot, it goes to a frame on the timeline.
So, I could set up 20 or so targets: target1, target2, target3... where dropping the slider in target1 takes them to frame 0, dropping it target2 takes them to frame 20, and on. It would be nice to make the slider smoother than this, but I'll take anything!
Can someone guide me to a tutorial or give me some guidence! Thanks!
Slider To Control Movie
I am trying to create a slider bar (like a volume slider) going horizontal across the bottom of the swf. I have created the slider no problems, and it is working fine. But what I am having trouble doing is getting it to control what I want it to.
I have a series of images imported and put into consecutive frames of a movie object. I want the slider when moved from left to right (0 -100) to go through each frame of the movie object at the rate of one frame forward for every 10 units on the slider.
I know a little bit about action script, well enough to get the slider behaving properly, but I need help with setting this up.
Any help will be very much appreciated.
Brad
Video Slider Control
Can anyone help,
i have an object which is a movieClip which i want to use as a video slider. I can get it to slide using this code
on (press) {
startDrag ("", false, left=_x, top=_y, right+ x+100, bottom=_y);
dragging = true;
}
on (release, releaseOutside) {
stopDrag ();
dragging = false;
}
however i am not sure how to set up the code to get the video to move appropriatley when i move the slider. I have been trying this code as i think it is along the right lines but can not get to work.
//1839 being the lengh
onClipEvent (load) {
segmentWidth =(100/1839);
if(dragging = true) {
gotoAndStop
(Math.ceil(Slider_button._x/segmentWidth));
}
}
does anyone have some simple code i can try.
thanks in advance
NP
Movie Control Slider
Does anyone know a good example or website that has the source for a really good slide bar control for a movie clip a la Windows Media Player/Quicktime? I know there are plenty of components out there, and MX 2004 professional even comes with one, but I'm trying to save time here because all I need is the slider aspect, rather than cracking the component open, and digging through all the script to find the relevant code. Any help would be GREATLY appreciated.
Optimal aspect wishlist for a slider example would be:
A: Obviously one in which you could drag the "knob" to desired location.
B: Ability to click anywhere on the slider and have the "knob" move to that location
C: Ability to show a progess loading bar inside the slider to show how much of the movie has been spooled.
Thanks in advance you guys!
Video Control Slider
Hi,
I have to do a small web project for Uni to do with interactiive art.
My idea is to put some sculptures on a turntable, video them turning round, then import them into Flash MX in line with the timeline.
That's about as far as my Flash skills go I'm afraid, but I am used to programming in lingo for Director. I want the user to be able to navigate through the frames of the digital video clip using a slider or even better just by dragging the picture - seemingly turning the sculptures around.
I am very short on time as I have four assignments to complete over Christmas so any help would be extremely gratefully received.
I am sure it is possible, just don't know how at the minute.
Please, please let me know if you can help.
Thank you,
Kieron in Stafford, England.
Slider Control Movie Help
I'm creating a site with a sliding scrollbar, which will allow the user to control the vertical positioning of a paragraph of text. I figure out how to make the slider work (it goes up and down by the user clicking and dragging, and it stops when the user unclicks the mouse). How do you make the slider control the text (I have the text as a movie clip with a motion tween moving up).
I'm uploading what I have so far (just click on the Contact Us button on the left): http://www.metropolis.bz/flash/site.fla
Thanks!!
Movie Control Slider
I would appreciate any and all help!
I want to place a slider at the bottom of a Flash movie that has the following functions: automatically moves to show the progress of the movie; a filler color fills in behind the slider as it progresses; the user can click and drag the slider forward or backward along a track and upon release the movie plays from that point.
Seems like it should be a common routine, but I haven't been able to find any sample code that accomplishes all of these functions.
Thanks for reading and your help!
Volume Control Slider
Hey. I've never handled sound in flash before and I've been follwing the sound tutorial by Kenny Bellew in the tutorial section perfectly
http://www.flashkit.com/tutorials/Au...-824/more8.php
and i have my slider working fine. The only problem is, and u can test it in the example he has on the page, when the sound is playing, you can make the volume slider move when clicking down and dragging left and right anywhere in the flash file, instead of just on the slider control bar. Since it is the same on his example .fla, i dont think i have done anything wrong.
Does anyone know of a solution to this? so it only changes the volume when the mouse is down on the slider bar.
Cheers
Volume Slider Control
Hi,
I am trying to create a slider for volume control. I followed a guide which wasn't the best, and this is what I have:
btnvolume.onPress = function ()
{
this.startDrag(false, this._x, 18, this._x, 28);
btnvolume.onMouseMove = function () {
bmforaudio.SetVolume(100- ((this._y - 18) / 10 * 100));
}
}
btnvolume.onRelease = btnvolume.onReleaseOutside =
function ()
{
this.stopDrag();
}
'18' is the top position it drags to, '28' is the bottom. '10' is the drag distance. I presume these are the right numbers to use. 'bmforaudio' is the name of the movie which has the music in it (via loadMovie as target).
Any help would be great!
Volume Control With A Slider
Hi,
I am using Flash MX 2004. A moderate user. I am building my new website just to learn more about Action Scripts.
Does anyone know how to apply "Volume Control" with a slider/nob? If there is already an existing tutorial here (Flashkit)...can you please point me there?
All advice and help very, very much appreciated!!!
Thank you.
warmest regards,
sosurvivor
Using Slider To Control The _x Position?
Hey,
I am trying to make a slider that will move the _x position of a film stip I have, thus far I have:
Code:
_root.onEnterFrame = function(){
with(slideStrip_mc){
_x = (picSlider.position._x)*9.5;
}
};
although it works, it seems to pull the slideStip_mc right of the stage when I slide the positionBar to the upper limit, even though I have tried to place the slideStrip on the centre of the stage.
The size of the slideBar is 200 pixels and the slideStrip is 1900 pixels. I have tried to start the sliderBar at the top end of it's scale and this just makes the slideStrip start of stage.. ?
I'm lost with numbers and stuff any Ideas?
cheers.
Help Scripting A Slider Bar Control
Hello, I am in need of some scrpiting help. I need a slider to control two things, one being a mc that has about 30 frames moving foward and backward depending on where the slider is on the track, and the other being a image that slides left to right depending on where the slider is on the track. To view a diagram of what i'm looking for, go here...
http://www.designelement10.com/help/sliderdiagram.jpg
I do not have the best actionscrpiting abilities, so a basic set up example would be wonderful. Thank you much in advance o powerful Kirupa Community.
::Jason
[MX04] Slider Control
Hello,
I currently have a slider controlling the visibility of 3 movie clips. For example when the slider is above value A, mc_a will be visible, when the slider is above value B, mc_b will be visible and mc_a invisible.
I'm having a problem that if I move the slider too quickly, the first clip is still showing when the third clip is shown, thus there are two movieclips shown. If I move the slider slowly, it works fine. I was wondering if anyone has any idea what's wrong or how to remedy this.
Thanks in advance,
DeMarHc
[F8] Flv Player Slider Control
hello
i am working with flv players i have worked out all but the client had asked me to have a slider that controls the position of movie playing as it is in window media player.
Can anybody help me out of this thanks in advance
Horizontal Slider Control
Hello Flash people, I was wondering if anyone has come across anything like this before. I have searched.....for about 2 hours but my eyes have glazed over
I want a horizontal scroller where when you drag the scroller over the bar, it displays a different movie clip.
E.g
If my bar is 100px wide, and I want to display 10 seperate movie clips depending on the sliders postion, I would divide the bar into 10 sections. So when the slider goes over one of the ten sections it will display a mc. Should I be using a hit test for this or anything else?
Does this make any sense lol?
Thank y'll
Slider Control And Font Changes
Hello FK! i have a new problem and i was hoping someone here could lead me in the right direction. I have a few slider controls that are causing me some trouble. i have three controls for a text box. a color picker, slider control and and combo box for font changes. If I select a color and then change the font size with the slider control everything is fine, but if i change the color and then change the size and go back and change the color picker again, it changes the font size back to it default size....
Code:
onstageSlider1.addEventListener(SliderEvent.CHANGE, sliderChange1);
function sliderChange1(event:SliderEvent){
onstageSlider1.maximum = 72;
onstageSlider1.tickInterval = 5;
var tf:TextField = outputTB1 as TextField;
var tfmt:TextFormat = tf.getTextFormat();
tfmt.size = event.currentTarget.value;
tf.setTextFormat(tfmt);
any help is appreciated as i am stumped here..
|