ActionScript 3.0 :: X Slider To Change Frames Of A Mc?
Aug 3, 2011
I am trying to set up a file with a sliderMC that would change frames in another mc when the user drags it left or right. So far I have:
var pos:MovieClip;
pos.onPress = function ():Void{
this.startDrag(true, -10, 0, 600, 0);
[code].....
but I am stumped as to how to code AS3 so that when the instance of
pos is between 0-150 to go to mc frame 1
when x equals 150-300 to go to mc frame 2
when x equals 300-450 to go to mc frame 3
when x equals 450-600 to go to mc frame 4
when x is greater than 600 to go to mc frame 5
View 8 Replies
Similar Posts:
Sep 8, 2010
I am working on a map that changes colors as called through a slider. Each color or map status is a differnt frame in a MovieClip. When I pull the slider back/forth really quickly, the frames get a little out of whack with the slider...
[Code]...
View 3 Replies
Feb 16, 2005
if I can control volume by means of a slider , is there anything to stop me progressing through preloaded frames along a timeline with a slider? has anyone tried this? i am imagining giving the user control of a decaying image from beginning to end with the use of a slider?
View 1 Replies
Feb 16, 2005
if I can control volume by means of a slider , is there anything to stop me progressing through preloaded frames along a timeline with a slider? has anyone tried this? i am imagining giving the user control of a decaying image from beginning to end with the use of a slider? does this sound the wrong way of going about this? i am ok with actionscript but with this, i havent a clue where to begin!
View 1 Replies
Jul 15, 2011
I'm using Flex 3 VideoDisplay class for playing streaming video. When I drag the track slider(change the playheadTime) there are no preview frames even if that part of the video is already loaded.
Is there anything I can do to enable this feature (from the configuration of media server or in the Flex client)?
View 2 Replies
Mar 10, 2011
Im making a Drawing App and i want a slider to change brushsize i have a varible set up to change the brush size.
The Varrible is:
var ColourSize = "";
ColourSize = 10;
And that works with changing the size but i need a slider to change it..
View 2 Replies
May 5, 2005
I'm new to actionscript, but here's what I would like to do.I want to have a single animation and two sliders. slider1 will advance and rewind the movieclip,we'll call it "scrubbing", while slider2 will change the highest frame of the mc acheivable by the "scrub" slider1. Therefore if slider2 is at one end slider1 will not advance the mc at all, while if slider2 is maxed out then slider1 will "scrub" the whole movie.
View 1 Replies
May 6, 2010
Is there anyway to change the height of the slider in AS3? (CS3), I've tried changing the actual graphic (of the bar) in the library and no matter how big I make it it's always locked to 13 pixels high.
View 3 Replies
Jan 16, 2010
trying to make a slider that changes the line thickness in a drawing app that I would to share with my students. When moved from left to right a circle changes scale. This circle would act as a visual reference on the stage telling the viewer that the line thickness is changing. Right now I just want to figure out how to connect the slider so that the circle changes dynamically. Once I get that I feel I can figure out how to connect it to lineStyle(). The current code I am attaching has the circle change size at onle two points-the far left and far right. I keep trying to write something that uses mouseX properties but so far nothing is working.
View 5 Replies
Sep 19, 2011
I am trying to use the slider component (aSlider) to control the volume of mySound which is a class called PlaySound. Created an addEventListener for aSlider with a SlideEvent.CHANGE executing a function called changeVolume. Everything else works but I can't seem to get the slider to control the volume of mySound.
import flash.events.Event;import fl.controls.Slider;import fl.events.SliderEvent;import fl.controls.Label;
var mySound:PlaySound = new PlaySound ;
[Code].....
View 5 Replies
Jan 23, 2012
how to change the size of text in a text box, once the user has typed something in using the slider component?
View 6 Replies
May 18, 2011
I am trying to build a interactive slider,in which when user drag the slider up the height of silhouette increases by some fix amount n when user drag the slider down the height of silhouette decreases by some fix amount.the problem i am facing is that when i drag the slider slowly than everything works fine but when i drag the slider faster than the height dont increase or decrease properly.i mean the increment or decrement in the height of silhouette is depending on speed of slider,which i dnt want.
here is the code-
Code:
var bounds:Rectangle = new Rectangle(499.65,260,0,240);
slider.addEventListener(MouseEvent.MOUSE_DOWN, moveSlider);
stage.addEventListener(MouseEvent.MOUSE_UP, stopSlider);
[code]....
View 1 Replies
Nov 26, 2011
I am making a house with actionscript, and the roof is made by a triangle. I am supposed to change the triangle height (y-axis) using a slider.[code]...
View 9 Replies
Apr 30, 2009
I have created a slider bar using AS2, when I say slider bar I mean similar to what you would find on a mixing desk in a music studio, i.e. you 'slide' the button up and down, changing the value associated with it. My slider bar changes a value that is written on the screen, i.e. it goes from 0 to 100 as you slide the button up. Now I want to change this so that when you slide the button the value starts to slowly change, and eventually reaches the value you've pushed the button to but after you've finished moving the button. Not sure that makes sense! To put it another way: if it takes you half a second to move the slide button from the bottom to the top, it will take 10 seconds for the value associated with it to reach 100.
Below are the relevant bits of code:
This starts the slider action when the button is pressed:
Code:
function onPress() {
this.startDrag(false, sliderMin, 515, sliderMax, 515);
}
This determines the displayed value from the slider bar position. Obviously right now the value changes instantly when you move the slider button
Code:
function onMouseMove() {
_root.powerGraph.totalPower = Math.round((_root.startMenu.coal1Slider._x - sliderMin) / (sliderMax - sliderMin) * 100);
}
This is used to display the value:
Code:
function onEnterFrame() {
this.createTextField("outputPower", _root.startMenu.getNextHighestDepth(), 130, -20, 190, 101); .....
This stops the button movement:
Code:
function onRelease() {
this.stopDrag();
}
View 1 Replies
Aug 11, 2011
I need to create an interactive piece. It's much more involved than this but fundamentally I need to create a slider on the left side of a window that is the color spectrum. I'll put a small triangular pointer beside it that can be moved up and down beside the spectrum. I want whatever color the slider is next to to show up in a symbol on the right. I've attached a simple image that illustrates it. So to restate it again, I'd slide the triangular symbol up and down beside the spectrum gradient on the left and whatever color it is pointing to would just show up in the symbol on the right, real time.
View 2 Replies
Nov 3, 2009
I have a dynamically created slider with AS3:
I can reference the thumb by s.getChildAt(1) ~ that took me quite a while to figure out!
But how would I assign a new graphic to it?
View 1 Replies
Jul 18, 2006
I am using code from the site, [URL] and I would like to make my slider smaller or bigger depending on the link. I'm guessing it can be done with action script, but have no idea how to do it. To view my file it's at: [URL] the FLA is at:[URL] Sadly, I need to squeeze one more link on the top menu and I am running out of room.
View 5 Replies
Mar 9, 2012
how one goes about changing the colour on the volume bar for playing videos like youtube does as the volume slider is moving. I don't think I need to go into depth using the graphics classes. What I'm looking for are ideas when a user changes the volume while playing a video, say in youtube, while dragging the volume control, the colour of the background bar changes. I've seen lots of help about creating volume bars for videos, but I don't see how to change the volume bar colour as the volume slider is moving.
View 1 Replies
Jun 4, 2010
I am having a set of slider for each bar in the graph. I have bindded all the sliders with their corresponding bars. When i change the value of slider the value in the ArrayCollection changes and i have also used
[Code]...
View 1 Replies
Oct 27, 2010
I am using this method to create a slider to control frames in a movie clip.
[Code]...
The slider works well when I'm in the scene that contains the slider. When I go to a scene that does not include the slider, I get the following output error. TypeError: Error #1009: Cannot access a property or method of a null object reference. How can I stop the stage.add.EventListener when I navigate to other scenes that don't include the slider. This is my first as3 project. The project functions as it should but I don't know if the output error will cause problems later.
View 3 Replies
Feb 28, 2011
My JSON Data file ise data.txt
[
{
"sayim":"1",
"x":"400",
[code]...
and my aim ise to create a Slider which can change starting and ending of the graphic, it is like what is showing in figure 6 in this website and here the MXML codes;
.
..
...
jsonDataArray = JSON.decode(urlLoader.data);
[code]...
The problem is "dataProvider" definition in LineChart, I wrote this code but it is still not working,
dataProvider="{dgg(sayim>=daySlider.values[0] && sayim<=daySlider.values[1])}"
what is the right code to control the LineChart with the Slider.
View 1 Replies
May 2, 2011
I have two movieclips in the centre of my stage. One is on top of the other and fade's between them using left/right buttons.I want to change this so that they slide in like a jQuery slider does. I don't want to change the initial position of the movieclips (on top of each other) just change the fade effect to a slide in.
View 1 Replies
Apr 24, 2009
I want to change frames instead of Size. How can I revise this?
s1.addEventListener(MouseEvent.CLICK,changeSize);
s2.addEventListener(MouseEvent.CLICK,changeSize);
s3.addEventListener(MouseEvent.CLICK, changeSize);
s4.addEventListener(MouseEvent.CLICK, changeSize);
[code]....
View 1 Replies
May 24, 2010
i made a full site all based in flash and divided the pages in scenes
i need a button to do exact that. when u click the button it must play some frames and then go to other scene.
i can't tell to go to other scene in the last frame because there are a lot of scenes and buttons that have to do the same.
15 buttons - 15 scenes - play 30 frames and then change the button-scene!
View 7 Replies
Feb 2, 2011
When the user clicks and drags across the movie, it changes frames--forward or backward according to which direction they drag. When they're on the last frame it should go to the first frame, and vice versa, if they're dragging in the associated direction.For some reason, there seems to be a minimum speed of mouse movement to go across this point, where it's not present to go between any other pair of slides.Here's the code:
Code:
stage.addEventListener(MouseEvent.MOUSE_UP, stopClick);
stage.addEventListener(MouseEvent.MOUSE_DOWN, clickStart);
[code]....
View 5 Replies
Aug 21, 2010
well i'm working on a small scale game and I appear to be coming across some small issues that I was hoping someone could help me with. I have this:
ActionScript Code:
if (_root.mc_player._x <= 540){
stop();
}else{
gotoAndStop(2);
}
in the frames actions.What I am trying to achieve is that when the players x position is greater than or equal to 540 it changes frame, I've tried various adaptations of this such as the following:
ActionScript Code:
stop();
if(_root.mc_player._x >= 540){
gotoAndStop(2);
}
mc_player is the instance name of the player (obviously :P) and when i enter the second code it just jumps straight to frame 2, so far it seems that the code is just setting the players x position at 540, so i tried setting it using actionscript like:
ActionScript Code:
_root.mc_player.x = 179
_root.mc_player.x = 143
it would set it at that and then the if the player reached the x position of 540 it would change frames but in that case it just didn't change frames.
View 9 Replies
Feb 3, 2011
Is there a way to use tweening to animate a movie clips frames? Say to move it from frame 1 to 10, etc?
I have a movie clip that will have lots of different actions (moving left, right, up, down) and so on, and I don't want them all to play--I would like the MC to just play some set of them at a time. It seems like tweening would works best for this if it is possible. If not, what is a better suggestion?
View 9 Replies
Jan 28, 2009
When the value of _root.mc1._currentframe is 10 I want the value of _root.mc2._currentframe to be written (sent or changed) to a variable which I can use in mc1. So I want to be able to use this variable in different clips but I do not want it to be changed until the playhead in mc1 is in frame 10. However I do want the variable to be valid even if the playhead is not in frame 10. This should be so simple.
This is what I have in mc1:
Code: Select allon (press) {
press = true;
if (press == true) {
[Code]....
View 1 Replies
Apr 7, 2009
I know it's possible in flash to change one frame of an html frameset with the click of a (flash)button, for example:
Code:
on (release) {
getURL("page.htm", "framename");
[code].....
View 4 Replies
May 22, 2010
i made a full site all based in flash and divided the pages in scenes
i need a button to do exact that. when u click the button it must play some frames and then go to other scene.
i can't tell to go to other scene in the last frame because there are a lot of scenes and buttons that have to do the same.
15 buttons - 15 scenes - play 30 frames and then change the button-scene!
View 1 Replies