Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7164097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:00:49+00:00 2026-05-28T14:00:49+00:00

Could someone help me figure out how to get the hslide value in Flash

  • 0

Could someone help me figure out how to get the hslide value in Flash Builder to have an extra zero if the value is below 10? The problem is that I need to get a two digit value out from the hslide, but if I put in the min/max values 0-23 I will only get one digit if the value is below 10.
Example: I want to use the hslide as a time slide. If I choose 4am I need the value to be 04, not 4.

Below is my example code, it is the hslider1.value and hslider2.value that needs to be two digits.

<fx:Script>
    <![CDATA[

        protected function button1_clickHandler(event:MouseEvent):void
        { navigateToURL(new URLRequest("tel:*23*"+hslider1.value+hslider2.value))  ;
        }       
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Button y="155" width="269" height="80" label="Button" click="button1_clickHandler(event)"
          color="#FFFFFF" enabled="true" fontSize="24" horizontalCenter="0"/>
<s:HSlider id="hslider1" top="405" width="90%" height="30" dataTipPrecision="0"
           horizontalCenter="0" liveDragging="true" maximum="23" minimum="0" stepSize="1" />

<s:HSlider y="469" width="90%" height="30" id="hslider2" 
           horizontalCenter="1" liveDragging="true" maximum="55" minimum="0" stepSize="5" dataTipPrecision="0"/>


<s:Label x="88" y="291" width="194" height="22" fontSize="24"
         text="{hslider1.value}" textAlign="right"/>
<s:Label x="284" y="291" width="7" height="22" fontSize="24" text=":"/>
<s:Label x="294" y="291" width="194" height="22" fontSize="24" text="{hslider2.value}"/>

Any type of help would be deeply appreciated!
Best regards from Camilla in Sweden.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:00:50+00:00Added an answer on May 28, 2026 at 2:00 pm

    hi just replace the button1_clickhandler function with the following one..

    protected function button1_clickHandler(event:MouseEvent):void
    {
        var str1:String = "";
        var str2:String = "";
        if(hslider1.value < 10)
        {
            str1 = "0" + hslider1.value.toString();
        }
    
        if(hslider2.value < 10)
        {
            str2 = "0" + hslider2.value.toString();
        } 
        navigateToURL(new URLRequest("tel:*23*"+str1+str2))  ;
    }
    

    Have a Nice Day…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder if someone could help me figure out how to parse a string
Could someone help me with this issue. I'm trying to figure out how to
I was hoping someone could help me figure out how to change the setmessage
EDIT: I added a bounty, if someone could help me figure out what I
Could someone help me figure out what this C++ code does I got it
Could someone help me out with this JQuery? I have a bunch of list
could someone help me on this problem, i want to access facebook API through
Could someone help me on this, I have created simple web services using axis2
Could someone please help explain why I can't get this to work? I properly
Could someone help me translate the following pseudo-code into code understood by Helicon Tech's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.