How to Position Thumb on Slider Component

Hi all:
I am relearning ActionScript after 6 years away, so please
excuse what may be a really stupid question. I am trying to use the
built-in Slider Component to resize a graphic in my movie. I've
used the Code example from the Flash online documentation and got
it to work. Trouble is, the thumb on the slider is starting at 10
percent when the movie loads, and I want it to start in the middle
(50%).
I tried setting the aSlider.value = 50; And that works,
except as soon as I finish dragging the slider, the thumb snaps
back to 50. I tried resetting it within the ChangeHandler function
to the new event.value, but that doesn't work. I tried assigning it
to a variable called thumbpos and setting that, also doesn't work.
How can I make the new event.value persist outside of the
function? See attached code. Thanks!!!
**************************************************

1. To set focus to a component, we call the Item.Specific.Click method on the component
2. I think that the order that fields are added to the form determines the tab index.  I'm not aware of any property that would change this
3. Handle the ItemEvent event and check pVal.EventType to see if its type is et_VALIDATE.  This means that the field specified by pVal.ItemUID is about to lose focus.  If you set BubbleEvent to False, you can cancel the action and force the user to enter a new value without leaving the field.

Similar Messages

  • Dragging Slider Component

    How can I alter the Slider Component so that it slides
    horizontally, left or right, by simply mousing over and moving the
    mouse WITHOUT clicking and holding down the mouse (as is the
    default behavior of the Slider)... just simply touching the Slider
    and rolling the mouse left or right.
    What I am trying to accomplish: I would like the ability to
    mouse over invisible buttons while using the Slider Component. The
    mouse over effect does not function on the buttons beneath the
    Slider because the mouse button is held down when passing over
    them.
    Thanks so much in advance for any help on this.

    I figugured it out I had to put mc.play(); instead of:
    mc.frameTxt.text = aSlider.value;

  • Sound position and length on Slider Component AS3

    Hello:
    I have the following working great:
    stop_btn.setStyle("icon", square_mc);
    player_btn.setStyle("icon", next_mc);
    import flash.events.Event
    import flash.events.MouseEvent;
    import flash.media.SoundTransform;
    var alreadyDefined:Boolean;
    volumen.value = 1;
    if(!alreadyDefined){
    alreadyDefined=true;
    var isPlaying:Boolean = new Boolean();
    var pausePosition:Number = new Number();
    var soundClip:Sound = new Sound();
    var sndChannel:SoundChannel;
    soundClip.load(new URLRequest("audio/music.mp3"));
    soundClip.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
    player_btn.addEventListener(MouseEvent.MOUSE_DOWN, btnPressController, false, 0, true);
    stop_btn.addEventListener(MouseEvent.MOUSE_DOWN, btnPressStop, false, 0, true);
    function onComplete(evt:Event):void {
        sndChannel = soundClip.play();
        isPlaying = true;
    function btnPressController(evt:MouseEvent):void
        switch(isPlaying)
            case true:
                //controller.text ="Sound Paused";
                player_btn.setStyle("icon", pause_mc);
                pausePosition = sndChannel.position;
                sndChannel.stop();
                isPlaying = false;
            break;
            case false:
                //controller.text ="Sound Playing";
                player_btn.setStyle("icon", next_mc);
                sndChannel = soundClip.play(pausePosition);
                isPlaying = true;
            break;
    function btnPressStop(evt:MouseEvent):void
        pausePosition = 0;
        sndChannel.stop();
        //controller.text ="Play Sound";
        player_btn.setStyle("icon", next_mc);
        isPlaying = false;
    volumen.addEventListener(Event.CHANGE, sliderChanged);
    function sliderChanged(evt:Event):void {
    var vol:Number = volumen.value;
    volumen.liveDragging = true;
    var st:SoundTransform = new SoundTransform(vol);
    if(sndChannel != null){
        sndChannel.soundTransform = st;
    exit_btn.addEventListener(MouseEvent.CLICK, fexit);
    function fexit(event:MouseEvent):void{
        SoundMixer.stopAll(); 
        Loader(this.parent).unloadAndStop();
    I have another slider component on the movie with instance name PROGRESO
    I would like for PROGRESOnto indicate (update) the sounds progress as it plays and be able to scrub through the sound.
    Any idea how I can achieve this? Thanks for any help

    Thanks Andrei.
    But I really dont understand. You see, I am not too good (actually pretty bad) with Ationscript 3.
    Att.,
    Edwin
    I managed to get it to move each second though with this:
    var myTimer:Timer = new Timer(1000);
    myTimer.addEventListener(TimerEvent.TIMER, runTimer);
    myTimer.start();
    function runTimer(event:TimerEvent):void {
    trace("Hello");
    progreso.value = progreso.value+1;

  • ShowTrackHighlight in spark Slider component

    how to use showTrackHighlight in spark slider component in flex 4

    Thanks for posting your solution to this. I used it successfully with Flash Pro CS5.5. It's necessary for a slider that might be used with a touchscreen. Other links that I found stated that thumb width and height could not be changed and that it was necessary to extend the Slider component to access these properties.
    MB

  • How do you change the slide background colour in the keynote app?

    How do you change the slide background colour in the keynote app?

    You can't (not in Keynote for iOS). The background color is a function of the template selected when you create the file initially and cannot be altered. the only workaround I know of is to add a graphic file to the slide and position it behind all other content, but this would need to be repeated on any slide you wish to "recolor".

  • Any sources for styling \ skinning the Slider component?

    Any sources for styling \ skinning the Slider component?
    ie setting the background invisible or using another graphic in place of the line/rectangle graphic.   using another graphic for the thumb.  replacing the current graphic thumb has restrictions in dimensions,

    :  http://flash.sikotiko.com/2009/05/05/as3-skinning-slider-component/

  • Using A Slider Component As A Button

    Hi
    I've got what to small problems when using my slider component.
    I'm building a small quiz and I am using the slider component to let the user rate their opinion. It'd be great if I could make the slider play the movieclip (to the next quiz questio) when the user has cast their opinion -  on mouse up. Is this possible.
    Also I'm using a 'score' uint variable to collect the polling results but I need this variable to reside on the root of my flash file so that I can add to it from various diffrent movieclips. How can I target the variable from a movieclip.
    Heres my code:
    import fl.events.SliderEvent;
    voteSlider.value = 5;
    voteSlider.addEventListener(SliderEvent.CHANGE, voteCast);
    function voteCast (event:SliderEvent):void {
              score += event.target.value;
              trace(score);
    This is what i would like to target in the root
    var score:uint = 0;
    Thanks

    your voteCast() function executes after a mouseup.  add your code there:
    import fl.events.SliderEvent;
    voteSlider.value = 5;
    voteSlider.addEventListener(SliderEvent.CHANGE, voteCast);
    function voteCast (event:SliderEvent):void {
              score += event.target.value;
              trace(score);
    gotoAndStop("label");  // assuming the current timeline is the one you want to direct.

  • How do I center my slide in the window in keynote

    how do I center my slide in the window in keynote?
    I know I can fit to window, but can I have the slide smaller than my window and centered?
    It stays in the upper left hand corner.

    You don't say, but I'll assume you mean that this occurs when Keynote is in "edit" mode. The positioning of the slide boundaries snug to the upper left is fixed in Keynote and can't be changed.
    Many have looked for ways to add new objects, images, etc., coming from above and/or from the left off-slide. This can be done with some creative steps.
    The simplest solution to this is to attach (group) an "invisible" handle to the object and use the handle to move the object out of sight to the left or above. Create an object such as a narrow rectangle, assign it NO FILL, NO LINE and while it is selected, Shift-Click on the object you wish to hide and then Arrange > Group. Now you have an invisible handle that you can use to hide your object off-slide.

  • How can I copy multiple slides with a HP Scanjet 4050 to photoes using Maverick? HP apparently no longer supports this product for this OS.

    How can I copy multiple slides with a HP Scanjet 4050 to photoes using Maverick? HP apparently no longer supports this product for OS Maverick.

    VueScan
    VueScan FAQ

  • How do I find out the component ID on a certain page?

    How do I find out the component ID on a certain page? problems is that I'm using some page template which I do not have source code for that.I need to find out the component id to pass to UIComponent.findComponent(id) as parameter. is there anyway?
    Thanks

    If you go to the partial trigger property of any of your page component you can open the edit partial trigger browser.
    There you can find the components of your template and their ids

  • How do I view what slide I'm on out of how many I have total in keynote? I know on powerpoint it's at the bottom right of the window but I can't find it on keynote nor can I find the option to make it appear. Any help would be greatly appreciated.

    How do I view what slide I'm on out of how many I have total in keynote? I know on powerpoint it's at the bottom right of the window but I can't find it on keynote, nor can I find the option to make it appear. Any help would be greatly appreciated.

    Your steps so far are OK but you may want to try:
    1 Trash your user library Caches folder (House Icon with short name in Finder window (hard drive window)GOTO:House icon > Library folder > caches folder
    2 Trash the com.apple.Safari.plist file in User library > preferences folder > Safari.plist as well as removing the library Safari folder its self.
    3 you can selectivly re-install Safari 2.0 from your OS Tiger Install disk 1, (see Knowledge base article 301229 for how to just select the Safari Application) without doing a complete system Archive and Install.
    4. Create a new Test user account on the system and test how Safari responds in the Test user, see if its a user related issue and not system issue.
    5. Still no Safari response? have to do an Archive and install (not preserving user and network settings)article 107120
    PS. Issue may be related to actual internet connection connectivity, power cycle cable modem and router or airport if using one as well as the computer(keep unplugged for 3-5 min) and plug the cable modem in and then the router/airport then power on the computer. Do the Airport Admin utiliy (applications, utilities on HD_1)update.
    - do a hard reset of airport knowledge base article 108044(Express base) and 107451 (Extreme base)
    - Check with internet provider for connection issues "cannot find server" ect.

  • How to find out the Target Component name and Target view name

    Hi All Expert,
                      I want to know ,how to find out the target component and target view in WEB UI,when i click on a field which shows as a hyper link in WEB UI .At GUI level ,i know the how it will work.Any way to find out the component name and view name which is show the details of that field at GUI level .IF you go to transaction CRMD_ORDER then open the service contract id .then goto the item level value .there is 1 service data tab is available at item level.there is two button is available.first one is available time and second one is response time .if i click on any button then one popup is open which is shows the details of that button.I dont know how to find out the component name and view name from GUI level.
    Thanks in Advance....
    Vishwas Sahu

    Hi Vishwa,
                 The control would be something like this for navigation in Get_p_xxx method u mention as link and u mention a event name which gets triggered on the click of this hyperlink. So your GET_P_XXX method would have the following code:
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_event_link.
        WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
          rv_value = 'EXAMPLE'.
    Now you have to create a method as EH_ONEXAMPLE at your IMPL class and within which you would give an outbound plug method. Within the outbound plug the target data would be filled in the collection and window outbound plug would be triggered.
    This is a huge topic and  i have just mentioned you basic things.
    Regards,
    Bharathy.

  • How do I download a slide show with captions and music to my IPad?  It is not happening when I sync.

    How do I download a slide show with captions and music to my IPad?  It is not happening when I sync.

    The way that you would transfer photos from iPhoto to the iPad would be to sync with iTunes. Connect the iPad to your Mac with the cable and launch iTunes. Select your iPad under the devices heading on the left. Then click on the Photos tab in the iTunes window on the right. You can select the folder from which you want to sync your photos in the drop down menu bar - so select iPhoto there. Then select the album or events that you want to sync from the windows below. After you have made your selections, click on Apply in the lower right corner of iTunes.
    I am not sure how the iPad will handle a slide show in the photos app that was created on your Mac. You can create basic slide shows on the iPad using the different albums, events or faces that you have in the Photo app, but as for the captioning that you have already set up, I don't know how that will work in the app when you sync the slide show.

  • How to get the current slide Index or Id?

    I can get the selected slide of presentation use blow method.
    Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange, function (asyncResult) {
    if (asyncResult.status == Office.AsyncResultStatus.Failed) {
    write('Action failed. Error: ' + asyncResult.error.message);
    else {
    write('Selected slides: ' + JSON.stringify(asyncResult.value.slides));
    But, How can I get the executor slide?

    ​Hi,
    >> How to get the current slide Index or Id?
    In my option, when you select a slide, it change to current slide. So, you could use the getSelectedDataAsync method to get the current slide, and then get the index or id by using the Slice object. You could refer the link below for Slice Object.
    # Slice.index property (JavaScript API for Office)https://msdn.microsoft.com/EN-US/library/office/jj715285.aspx?f=255&MSPPError=-2147217396
    Some key code as below:
    <script>
    function getText() {
    Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange,
    { valueFormat: "unformatted", filterType: "all" },
    function (asyncResult) {
    var error = asyncResult.error;
    if (asyncResult.status === Office.AsyncResultStatus.Failed) {
    write(error.name + ": " + error.message);
    else {
    // Get selected data.
    var dataValue = asyncResult.value;
    write('Selected data is ' + dataValue.slides[0].index);
    // Function that writes to a div with id='message' on the page.
    function write(message) {
    document.getElementById('message').innerText += message;
    </script>
    >> How can I get the executor slide?
    What do you mean by this? Is this a new issue which is different from the above issue? If so, I will recommend you post a new thread for this issue and share us more information about this.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to make a round Slider with an image ?

    hello everybody,
    I'm back and i have a new question : how to make a round Slider (like a volume knob) with an image ?
    I see this very interisting tutorial : http://fxexperience.com/2012/01/fun-javafx-2-0-audio-player/ but it use a private class from com.sun.javafx.scene.control.skin.SkinBase...
    thank you for your answer.
    Gaëtan.

    I'm guessing you could subclass Slider to create a class SliderKnob.
    At some stage in the process, not sure where (perhaps after calling super in the constructor), you could look up the slider region's child thumbnail and track and call setVisible(false) and setManaged(false) on them, create an ImageView for your knob, add the knob ImageView to the slider's region and bind the ImageView's rotateProperty to the slider's valueProperty(). Not sure that that is any better than using the SkinBase stuff, but at least it is an alternative idea.
    Everything to create your own controls has not been added to the public API, so if you want to make your own controls in the same way the JavaFX does them (i.e. with Skin's and Behaviours and stuff like that) you have to make use of com.sun classes unless you can subclass and modify the workings of existing controls similar to what is proposed in the preceding paragraph.

Maybe you are looking for

  • Hi gurus

    hi gurus any body can u help me what is the new futers in ECC 6.0 vertion in sap sd plese forward u valuable information thankyou

  • Workflow to make PAL dvd

    I have DVC Pro 720p and need to make a dvd in PAL for festival submission. I know Compressor isn't the best way to go for quality. What's a good workflow? I am thinking convert to PAL DVDPro50, then create an MPEG2 from that. Any setting ideas would

  • What to do with this error

    for example: public class BitwiseDemo { static final int VISIBLE = 1; static final int DRAGGABLE = 2; static final int SELECTABLE = 4; static final int EDITABLE = 8; public static void main(String[] args) { int flags = 0; flags = flags | VISIBLE; fla

  • Water leaked on my macbook pro

    I don't know what happened, I just came back and water has spilled on my MacBook, it won't turn back on. Is it done, what do I do?

  • External HD absent from Disk Utility

    Hello all- I recently received a brand-new MacBook Pro and-when trying to allocate some files from my 1TB Western Digital MyBook drive-discovered that this HD was not recognized by Finder. After opening Disk Utility, I found that it's not even presen