Actionscript for dimming knob

I currently have a volume knob that works with sound and turns 360 Deg. I now want to use this rotary knob to control the brightness of an image/symbol.
Please help

Find a tutorial on how to control brightness (search Google using terms like "AS3 brightness control") and then figure out how to manipulate the rotation property of the knob to give you the control values.  Here is a link to one of the results of that search...
http://code.tutsplus.com/tutorials/create-a-brightness-editor-in-actionscript-3--active-34 38
If you were to follow it, you would see that a slider is used with values ranging from -150 to +150.  What you could probably do is make use of the rotational value (degrees) of the knob relative to 180 degrees getting a -180 to +180 range, meaning take the rotational value and subtract 180 from it for the brightness factor.

Similar Messages

  • Need Help with ACTIONSCRIPT for Interactive Music Video

    I am trying to create an interactive music video in After Effects and Flash.
    The concept is that while the music video is taking place the user can  decorate the hair of the woman with any of the objects they select.   There will be predetermined animations and destination spots but the  user can choose whatever objects they select to be delivered to the  predetermined spot.  I need to figure out how to let the user to select  an object that will become part of the animation.  I created a PDF  Roughly explaining what I am trying to do.  If anyone can help me I'd be  very grateful as I am more versed in After Effects, I don't know  ActionScript well enough to execute what I am trying to do.
    Below is a rough example of what I am trying to do.  There will be a music video of an animated woman singing.  As she is singing the user will be able to click any of the objects , below the numbers 1-10.  Below it is illustrated that the user wants to press the blue number 2.  If the user presses the 2 the 2 will animate in the mouth of a bird to a predetermined pre-animated spot.  I assume I need to send a movieclip to a blank  holder on the timeline and use a gotoAndPlay() action ???  I am not well versed in ActionScript so any advice would help
    Now whatever number (movieclip) the user chooses next needs to be placed in another blank spot in the timeline? Below the user selcts the Pink 5.
    If the user just wanted to Place two "Blue 2's" then the "Blue 2's" would follow the same animated path and end up at the same predetermined space.
    If the user selected just 5's and 7's they would go to the predetermined preanimated paths
    How would I go about writing the Actionscript for this?

    Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
    If I say that the code for placing one MovieClip into another is:
    clip1.addChild(clip2);
    will it make any difference in terms of implementation?
    Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
    I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
    What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start.

  • Need help with actionscript for media controller

    I seem to be having a slight problem. I've been looking
    around and everything I see is for .flv playback. Anyways, here's
    my problem.
    Client wants a video that's interactive. When a transition
    occurs a simple tex button shows up which links to certain web
    pages. Deploying this as a .swf would be no problem, but they want
    a controlbar with it so a user can scrub back and forth in the
    video. So the best way to do this would be progressive or
    streaming.
    I created a source file that utilizes the "loader component"
    and inserted the "media controller component". I'm not very good
    when it comes to actionscript and can't seem to find the proper
    script which utilizes the media controller so the user can scrub
    back and forth. Everything else seems to work fine with the loader
    as it loads an external .swf file.
    Just need to get the controller working properly. Total
    frames of the swf is a little over 3,000 and dividing the total
    frames by 30 was 107.7 seconds. So I round that to 108 seconds. The
    online docs seem to be fragmented and not always consistant
    especially when i'm not using the flvplayback or display.
    Does anybody know the actionscript for this? Or where I can
    find the information on this? I've associated the loader with the
    controller and vice versa in the behaviors panel as well if that's
    any help. Any help is much appreciated thanks.

    Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
    If I say that the code for placing one MovieClip into another is:
    clip1.addChild(clip2);
    will it make any difference in terms of implementation?
    Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
    I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
    What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start.

  • Can anyone recommend any good books on leaning actionscript for flash?

    Can anyone recommend any good books on leaning actionscript
    for flash?
    Intermediate level
    I have been using flash for about 2 years more as a hobby
    than anything else, some websites etc but now I realise I am going
    to need to learn more actionscripting to do what I want, I have
    come to terms with the simple stuff like goto – basic
    variables – load mov – enough to programme up website
    navigation.
    I ideally want to learn more about the dynamic side of flash,
    mostly for designing user interfaces and websites etc
    I’m after a book that doesn’t get too heavy too
    fast yet I’m a little past the more basic functions
    Any thoughts?
    Cheers

    You appear to be stuck on iOS 4.2.1. That means up really have a 2G iPod. A real 3G can go to 5.1.1
    .To find compatible apps more app for 4.2.1 see:
    Old Apps
    VintApps 3.1.3 for iPhone, iPod touch, and iPad on the iTunes App Store
    apps for ios 4.2.1: Apple Support Communities
    Finding iOS 4.2.1 Apps Compatible with Older Devices - Apple Club
    HT4972 Touch Game 4.2.1 Apps: Apple Support Communities
    apps for 4.2.1 (also works for 3.1.3)
    Tip - Finding 4.2.1 apps that work on an...: Apple Support Communities
    4.2.1 iPod 2nd generation unable to use any...: Apple Support Communities

  • Actionscript for download time

    Hello,
    I would apreciate some help in creating action script version
    2.0 for an information site, that would hold hundreds of sfw files
    with expanding topics each using a diferent graphic picture.
    I would like to give visitor a check box choice before
    entering my site that would disable downloading the background
    pictures for external sfw files, so that users with slower
    connection, wouldn't have to wait a lot. At the same time, user
    with good i-net connection would get valuable information and at
    the same time enjoy wonderful collection of pictures, that would
    enchance remembering of presented information.
    As far as I see it, i should use an IF statement checking
    weather checkbox is clicked, and if picture mode is on, external
    sfw file checks that by evaluating _global variable, but if not,
    external sfw file use no background but main swf loads an 70%
    transperent white rectangle symbol, over main sfw background, so
    there still would be good visual aperance.
    I can't get 2 things at the moment
    1 actionscript for Loading of rectangle if box is unchecked
    2 actionscript for placing background in external sfw is
    checked.
    Could u please help me?
    Thank you,
    Hekaya

    1. if the rectangle symbol is an external swf, use loadMovie,
    loadMovieNum or loadClip. if it's a library symbol, use
    attachMovie.
    2. same as above.

  • Reason for dim fact tables ratio

    Friends.
    What is the exact reason for Dim tables not be greater than 20 % of Fact tables.
    How does that really impact performance?

    Hi,
    In an extended star schema, dimension tables stores the DIM IDs and SID IDs to access the data from the actual characteristics. These dimension tables are attached with fact table with DIM IDs. Now if the size of the DIM table is as large as the size of fact table, then the cause of DIM table will not be used at all. It is as good as referring the master data for each record from fact table itself.
    That's why it is ideally suggested that the ratio size of DIM table to that of fact table is 1:10.
    Hope this info helps you.
    Regards,
    Yogesh.

  • ActionScript for kids

    Hi,
    I need to find a site that teaches ActionScript for kids
    because I looked up were all for adults and its hard to understand
    sometimes. The site needs to be for around year 7 so 13 & 12
    years old.
    Thanks in advance.

    hello,
    i have an undefined i dont know why ;(
    please could you help me for have the name of my picture and
    the title of my
    picture
    and the title of my "titre_diaporama"
    thank you for your help
    "nardove" <[email protected]> a �crit
    dans le message de news:
    e4cg0o$eka$[email protected]..
    > var arreglo = new Array();
    >
    > var file_xml = new XML();
    > file_xml.ignoreWhite = true;
    > file_xml.onLoad = function(sucess) {
    > if (sucess) {
    > processCase(file_xml);
    > }
    > };
    > file_xml.load("yourfile.xml");
    > function processCase(xmlDoc_xml) {
    > for (n in xmlDoc_xml.firstChild.childNodes) {
    > arreglo[n] = new Array();
    > arreglo[n][0] =
    >
    xmlDoc_xml.firstChild.attributes.thumbpath+xmlDoc_xml.firstChild.childNodes[n].c
    > hildNodes[0].firstChild.nodeValue;
    > arreglo[n][1] =
    >
    xmlDoc_xml.firstChild.childNodes[n].childNodes[1].firstChild.nodeValue;
    > }
    > }
    >
    > trace the arreglo to see the results and find out how
    can you manipulate
    > to
    > use the data
    >
    > hope that helps
    >
    > rS
    >

  • Can anyone write a actionscript for flash project

    Hi All,
    Can anyone write a Actionscript for my project.
    I want to develop my project with the flash.
    My project scenario is, I have total no of 60 (.swf) flash
    movies and are about to take 4 to 5 minutes each, my aim is to
    display 20 .swf files randomly at a time on the screen.
    i.e., if we click on a button for the first time, it should
    display a 20 flash movies on the screen and when we click for the
    second time it should display other set of 20 flash movies it may
    or may not repeat the previous ones. It means every person should
    be displayed with a different set of flash movies, no two persons
    can get the same set of movies. The movies should be randomly
    selected.
    Could you please direct me to meet my scenario, could you
    please write a script for my flash.
    Thank you for your precious time.

    Ndippy,
    Folks on here are pretty good about helping out others who
    are trying to learn actionscript, or have trouble with
    understanding concepts. They are less likely to volunteer to do an
    entire project for you. I'd suggest trying to do it yourself, and
    asking specific questions about the process. Both of your posts are
    way to general to allow anyone to give advice that would be
    worthwhile. You have said that you have 60 .swfs in your first
    post. However, in your second, you said they were 60 quicktime
    files. There are very different processes for each option there.
    Are you planning to display 20 at once, or let people scroll
    through them? What size are your clips and what size are you
    developing for?
    Start small, like just trying to load one movie clip
    randomly, and then work your way up. Experiment with changing the
    positions, sizes, etc. When you run into trouble, ask a specific
    question about what you are trying to do, and people will be happy
    to help.

  • All I need is actionscript for a MovieClip

    I just need actionscript that then you rollover a movie clip
    it plays and when you roll off the Movieclip plays in reverse.
    I have provided a fla file for convience.
    http://www.geocities.com/demetriusmcclain/

    check this forum for a playF() method that i wrote (and
    posted within the past 24 hours) that allows you to play any
    movieclip from frame m to frame n (forward or backward) at any
    speed (the host computer can handle).

  • Memory (RAM) model in Flex or ActionScript for local variables in a method

    I have a method in AS3 to handle certain event generated from some Components in <mx:Repeater>. Two different Components can fire the same event
    at the same time so the same method must handle the two events together. My question is if the two calls on the same event handler method will step on each other. The event handler method only uses the local variables.
    In Java, the local variables of a method for the two callers are in two different memory (RAM) addresses. So they will not step on each other. Not sure about
    Flex/ActionScript.

    Actionscript runs in a single thread.  One of the events will get fully
    processed before the other.

  • ActionScript for getting the name of an artboard?

    I'm getting errors when I try this:
    for (var artboardIndex:int=0; artboardIndex<app.activeDocument.artboards.length; artboardIndex++)
        var thisArtboard:Artboard = app.activeDocument.artboards.index(artboardIndex);
        var thisArtboardName:String = thisArtboard.name;     // compiler complains here
    And when I'm debugging, I don't see a "name" property for an artboard, though I can get at "artboardRect."
    What am I doing wrong here?  The Illustrator Scripting Reference shows a "name" property.
    Thanks for any help,
    - Rich

    My copy of the reference has this:
    Artboard properties
    Property Value   type             What it is
    artboardRect     rect             Size and position of the artboard.
    name             string           The unique identifying name of the artboard.
    parent           Document         Read-only. The parent of this object.
    rulerOrigin      Point            Ruler origin of the artboard, relative to the top left corner of the
    artboard.
    rulerPAR         number (double)  Pixel aspect ratio, used in ruler visualization if the units are
    pixels. Range: 0.1 to 10.0
    showCenter       boolean          Show center mark.
    showCrossHairs   boolean          Show cross hairs.
    showSafeAreas    boolean          Show title and action safe areas (for video).
    typename         string           Read-only. The class name of this object.
    Am I misconstruing what I'm reading here?  Can there really be no way to get the names of the artboards via ActionScript?

  • Actionscript for mobile

    Does any one have any good links they can spare with good (pererably video) tuts ect on starting with AS fro mobile within FB rather than flex, I can make a start but it woudl be nice to find out the stuff regarding mobile specific items such as touch, gestures, lists, creatign view effects etc that flex does without blinking, any thing woudl be great
    thanks
    Si

    Well I gatehr there are no tuts out there for creating Actionscript Mobile Projects?

  • ActionScript for buttons

    Hello everybody,
    I am new to flash, and I really don't have much expirience
    with ActionScript in Flash.
    Does anyone know what actionscript should I write for opening
    a new page in the same window?
    For example, I have allready created my button, and made
    adjustements to all 4 states, but when I import it in Dreamweaver,
    I'll need some actionscript to put it to work, so when I click on
    the button in the Internet Exproler that button opens a new
    link(page) in the same window?
    Thank you.
    Dusan Cvetkovic
    [email protected]: cool;

    Ok here is what I got.
    When kg told me to use ac2, I did, but I didn't adjust the
    publish settings. So when I did that, everything went well except
    when I imported the button in Dreamweaver and when I tested it, the
    command to open an url didn't work.
    On the other hand, when I tried to put the command that last
    comand in AC3 and right publish settings, I got the following
    message:
    Compiler Errors 1
    Line 6 1120: (Description) Access of undefined property
    my_btn. (Source) my_btn.addEventListener(MouseEvent.CLICK,
    gotoURL);
    What's the problem? Yes, I do have CS3 Web Premium.
    Thanks

  • Actionscript for Dynamic Text

    I am designing my first flash site, and created a Dynamic
    text field called header_txt. I want the content inside this field
    changed based on which page the user navigates to. I have used an
    "IF" statement inside a Declared Function , but wonder if that is
    the best option, also, my IF statement is no working. Here it is:
    function headingChange() {
    if (_root._currentframe == "contact") {
    header_txt.text = "Contact Us";
    } else if (_root._currentframe == "about") {
    header_txt.text = "About Us";
    headingChange();
    var header_txt:String = "";
    Why is this not working, and what would be a better way of
    changing this field?
    Thanks for the help!
    Chuck

    _currentframe only returns a number. You can't access the
    frame's label with actionscript, except to specify it as a
    parameter in the gotoAndPlay() method.
    I would assume that you are calling the headingChange()
    function at each labeled frame. If you are, then just change the
    function call to this:
    At frame labeled "contact": headingChange("contact");
    At frame laveled "about": headingChange("about");
    Change your function to read as follows:
    function headingChange(s:String) {
    if (s== "contact") {
    header_txt.text = "Contact Us";
    } else if (s== "about") {
    header_txt.text = "About Us";
    Or, you could just access your dynamic textfield directly
    everytime you get to a new frame with a label by executing the
    following code in a frame:
    At the frame labeled "about": header_txt.text = "About Us";
    Either way would work. Though I like keeping stuff like this
    in a function. It makes it easier to update so that it does more in
    the future.
    Tim

  • ActionScript for Random Card Game

    Hello helpful user:
    I am fairly new to scripting in Flash and am struggling big time with a game I'm creating.
    An overiview of the game might help: It is a matching/Poker game. The first level requires one to beat a random pair of cards by selecting cards that are face down on the stage to drag and drop into a designated slot before the time runs out. Second level is a three of a kind, third is a flush, fourth is a straight , fifth is a full house, then four of a kind, then straight flush.
    I have the cards already on stage, set as movieclips and instance names reflecting there value (number,suit). You double click to flip the card. Drag and drop. Beat the presented hand to progress forward. Pretty basic, in theory.
    Where I am struggling is how to have the cards appear in randomized spots on stage. I also want the "hand to beat" to be selected from the cards already on stage, but randomly(except for the largest pair so it doesn't accidentally make it so you can't win). And lastly, how can I make it so it will recognize when the "hand to beat" has been beaten and one can advance.
    I'm afraid it will require 'if' statements and arrays, which I am still learning how to manipulate. I know what I want, but can't visualize the code to accomplish it. Please Help!
    Thank You!

    sorry, the actionscript i have so far for the pairs is as follows:
    bcJs.addEventListener(Event.ENTER_FRAME, goCoverjaxSpade);
    function goCoverjaxSpade(e:Event)
        bcJs.x = jaxSpade.x;
        bcJs.y = jaxSpade.y;
    bcJs.doubleClickEnabled = true;
    bcJs.addEventListener(MouseEvent.DOUBLE_CLICK, goDimbcJs);
    function goDimbcJs(e:MouseEvent)
        bcJs.scaleX = .01;
        bcJs.scaleY = .01;
        trace("disappear");
    bcJh.addEventListener(Event.ENTER_FRAME, coverbcJh);
    function coverbcJh(e:Event)
        bcJh.x = jaxHeart.x;
        bcJh.y = jaxHeart.y;
    bcJh.doubleClickEnabled = true;
    bcJh.addEventListener(MouseEvent.DOUBLE_CLICK, goDimbcJh);
    function goDimbcJh(e:MouseEvent)
        bcJh.scaleX = .01;
        bcJh.scaleY = .01;
        trace("disappear");
    jaxHeart.doubleClickEnabled = true;
    jaxHeart.addEventListener(MouseEvent.MOUSE_DOWN, itsPressedjaxHeart);
    jaxHeart.addEventListener(MouseEvent.MOUSE_UP, letGojaxHeart);
    jaxHeart.addEventListener(MouseEvent.DOUBLE_CLICK, reAppearbcJh);
    function reAppearbcJh(e:MouseEvent)
        bcJh.scaleX = .99;
        bcJh.scaleY = .99;
        trace("reappear");
    function itsPressedjaxHeart(e:MouseEvent)
        e.target.startDrag();
    function letGojaxHeart(e:MouseEvent)
        e.target.stopDrag();
        if (jaxHeart.hitTestObject(pairSlot1))
            jaxHeart.x = pairSlot1.x;
            jaxHeart.y = pairSlot1.y;
    jaxSpade.doubleClickEnabled = true;
    jaxSpade.addEventListener(MouseEvent.DOUBLE_CLICK, reAppearbcJs);
    jaxSpade.addEventListener(MouseEvent.MOUSE_DOWN, itsPressedjaxSpade);
    jaxSpade.addEventListener(MouseEvent.MOUSE_UP, letGojaxSpade);
    function reAppearbcJs(e:MouseEvent)
        bcJs.scaleX = .99;
        bcJs.scaleY = .99;
        trace("reappear");
    function itsPressedjaxSpade(e:MouseEvent)
        e.target.startDrag();
    function letGojaxSpade(e:MouseEvent)
        e.target.stopDrag();
        if (jaxSpade.hitTestObject(pairSlot2))
            jaxSpade.x = pairSlot2.x;
            jaxSpade.y = pairSlot2.y;

Maybe you are looking for

  • WD my Cloud 3T causes Kernel Panic in my New iMac?

    Dear Friend please I need help. I got my WD a few days ago, I was able to back up and transfer files to my old iMac, then I got my new iMac   Model Name:iMac   Model Identifier:iMac14,2   Processor Name:Intel Core i7   Processor Speed:3.5 GHz   Numbe

  • ME22N User Exit

    Hello all, Here is what I want: I need to check the 'User entered' values of Vendor confirmation (EKES) details from ME22N and validate the same in one of the User exits, BEFORE the PO is saved. I have checked most of the User exits for the transacti

  • W_DAY_D is not getting Loaded with Enterprise WEEK or FISCAL week informati

    HI Experts, We have OBI Application 7.9.6.1 (FIN,SCM,PSA analytics application). We are using Oracle EBS 12.0.6 as the source system. we are using the Enteprise Calendar in EBS to load the W_DAY_D,but the W_DAY_D is not getting Loaded with Enterprise

  • Making a FaceTime call on the touch

    SO how does that work with making a FT call from an iPod Touch to an IP4, when there is no data plan or "paid service" for the iPod Touch? Or is there? Or will the only one being charged be the IP4 owner? What if the call is enjoyed between two 2 tou

  • To create a output condition record

    Hi Gurus In order to print the output for contact person(PARNR) in Billing document, In VV31, What are the fields that i have to assign/combine to create a conditon record for  contact person(PARNR), Partner Function for this is CP. Regards Stephen