ActionScript 2.0 :: Use Flash MX- Library Slider (fader) To Set The Value Of A Variably Say 'maxAmmo'?
Feb 19, 2009
I have been trying to use Flash MX- library slider (fader) to set the value of a variably say 'maxAmmo'. I can assign values using these slider components to set say vert and horix speeds of movie clips using the 'onClipEvent' method. But, dynamically setting a global variable and subsequently setting its value in a dynamic text box is eluding - and frustrating me - despite looking through tutorials and the few books I have.
So, basically, when I drag the slider knob on the stage, all I want to do is set the value of a global variable. I think I might need to use update AfterEvent to ensure the value is available to mc's on my stage in real time and not dependant upon frame rate.
I'm using a common library fader movie clip. Inside the movie clip, is another movie clip called vertFader.
The code is simple. vertFader.addEventListener(MouseEvent.MOUSE_UP, putDown); vertFader.addEventListener(MouseEvent.MOUSE_DOWN, pickUp); stage.addEventListener(MouseEvent.MOUSE_UP, putDown); function pickUp(event:MouseEvent):void { vertFader.startDrag(false, new Rectangle(-6.3, -50, 0, 100)); } function putDown(event:MouseEvent):void { vertFader.stopDrag(); }
Here's my problem, everything works great except that vertFader doesn't drag. It will start the drag if I click it. It will also stop the drag if I click again. But if I click and hold the mouse button all day it will never start dragging. I'm not sure if it's a lag issue, or because I'm using a wireless mouse?
I have been trying to come up with a way to have a Timer of which I can modify the Tick time between executions. I have the tick amount as a variable but it seems like the Timer just evaluates that variable once at the start and then ignores it. I've tried adding and removing the EventListeners in between modifying the tick variable but that does not in any way affect the original Timer. For the project I am using this in I cannot simply have a second or third timer to enable with different variables seeing as I would need upwards of 30 of them to do it that way. Can anyone point me in the direction of a way to have a variably timed Timer?
Is it possible to introduce a fade into this script so that on rollover the new random color fades in rather than instantly switches. on (rollOver) { // "square" is the object being tinted myColor = Math.round( Math.random()*0xFFFFFF ); myColoredObject = new Color (_root.square); myColoredObject.setRGB(myColor); } Have attached the .fla
3 circles which can be dragged over a target (one for each circle)When the circle is placed on its target it loads its respective xml playlist into 4 buttons (play, pause, forward, back)I want to be able to create some kind of function to control the volume, either using a slider or a rotary dial, whichever is easiest!
I am getting this annoying error 1172 Definition utils. Fader could not be found. Everything worked fine until yesterday when I started getting this error. Looks like my utils.Fader.as file is attached to my .fla file.
I have noticed a few odd things, and have tried to send off to Tiago himself but have not received any response. I am in dire need of getting this to work properly, and am asking for help from this community. I have a primitive understanding of this AS3 code, and apologize if this may be a noob question.
I need to fix a couple things, with this code. The first thing i noticed is the code seems to call for the .php file before it can load, so at times it will generate a "undefined" for both the quote and author. The second thing is, which may tie into the first, there seems to be the occasion where the code doesn't load the php file at all. The author and quote will be blank for a duration. And the third question i have is how do i get the text to fade out again after the fade in after an interval.
i've got this header in a website that's got images fading in and out of each other. btu now i want them to be loaded externally and randomly. but still fading in and out of each other.i did foudn a post that loads the images externally from a folder and loads any image that's in that folder, but it doesnt work in my version of Flash 8.0 Pro.Does anyone know any good script or short tuto (since time is short) that's makes the movie behave like i want it to?
In Flash CS 5.5, I know you can preview the playback of a video right on the stage using the button and fader of the skin. But then why is there still the [preview] section written in the Component Parameter? (Under the isLive line) And why is it always set to None?
What I have is a map that you can click on points and it will zoom in, you can also click on a "plus/minus" buttons to zoom in and out (I even have the mouse wheel zooming in and out). The client wanted me to add a "zoom slider bar" to it so you know you could move it up and down to scale it. Everything is working except the slider, I can't seem to get it to work with the position of the slider. All of the zoom functionality is there but the slider is killing me.
I am putting up the fla file since there is a lot of code in there and I didn't want to put it all in the forum. if you look in the fla in frame ten on line 726 you can find the function that is supposed to handle the zooming when you move the slider. Up on line 74 you can find the slider onPress and onRelease functions, but those I believe should be fine.
I am trying to create a basic timeline, similar to the timeline we all use in flash (see attached).
I have a playhead slider, which when dragged, just drags within its startDrag() limits.
I also have horizontal window scroller which also when dragged, just drags within its startDrag() limits.
I am trying to work out how to get the horizontal window scroller to scroll when the playhead slider hits the left or right edge. I am using hittest for this collision.
I have the playHeadSlider scrolling along the top. When playHeadSlider collides with hittestThing I want mcContents to then move.
It kind of works.. mcContents moves when the playHeadSlider is in collision with the hittestThing.. but it just moves rather than 'drags' across. I have it set up so that mcContents is twice the width (approx) of mcScrollWindow.
I need to somehow update what I have so that if the playHeadSlider collides with hittestThing on the right, mcContents only moves to the right and if playHeadSlider collides with hittestThing2 on the left, mcContents only moves to the left.
I have a very general requirement that seemed very simple: Step 1: Load a new external JPEG image into a MC with a string var encoding a string caption in the URL link (VALUE="../fadeTest.swf?someTextVar=TestCaption") within the EMBED / OBJECT sections. I know how to do this and it semed to work fine. STEP2: When the JPEG is loaded I would like the substituted Text to Fade In over the JPEG. The JPEG should also fade in before the Text. The fade rate should be programmable.
I'd like to make a news slider for flash that not only shows images and text, but can also play videos that are presented as news, through an XML file or something.A good example is the flash news slider that ea.com uses, which can play videos on clal as well.Can anyone direct me to a tutorial or guide me here on how I cna achieve this through Flash CS4?
where I can get script for xml image loading flash similar to the one at [URL] Notice this is different from "flash carousel" and also has a scroll bar at bottom.
I'd like to make a news slider for flash that not only shows images and text, but can also play videos that are presented as news, through an XML file or something.A good example is the flash news slider that ea.com uses, which can play videos on clal as well.how I cna achieve this through Flash CS4?
have trouble with the Alpha slider (Color Effect>Alpha) not going all the way to 0% or 100%? A lot of the time, I can only get up to 99% or down to 1%, even if I manually enter values into the textbox accompanying the slider. Some of the time, it will not even take a manual entry in the textbox. For example, if the slider is set at 65%, I can enter 0%, and it will just go right back to 65%.
I have a flash website, and an html website. I use Nivo slider on the html site as a slideshow to showcase images and tagline slides, I'm curious if anyone knows if you can put a Nivo slider slideshow in a flash site? Nivo slider uses jquery, with fairly simple html img src code and a css file, is it possible to have this in a flash site?
how do i set up a Flash CS5 Slider component to trace decimal values, from 0.00 to 10.00 when the slider is dragged? i can't seem to find where i need to set these options to permit decimals.
I've got the code below, but for some reason the Flash slider doesn't allow me to slide to some values (it's set between 1 and 360). It goes something like 1, 3, 5, 6, 8, 10. The snapInterval is set to 1.
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.[code]