Levels of volume using the external cursor issues

Hello

I have a video player that requires all controls various outside the .swf via javascript and CSS.  The volume slider that I use will show a range of values depending on the position of the cursor.  What I need to do, is to have this past via ExternalInterface.addCallback("IsStatic",IsStatic), making a little now, however the actual value is not volume control.

JavaScript:

function thisMovie (movieName) {}

If (navigator.appName.indexOf ("Microsoft")! = - 1) {}

return window [movieName]

}

else {}

return document [movieName]

}

}

{$(function()}

var cursor = $('#slider'),

ToolTip = $('.tooltip');

ToolTip.Hide ();

Slider.Slider ({}

range: "min."

min: 1,.

value: 35,.

Start: {function (event, ui)}

tooltip.fadeIn ('fast');

},

slide: function (event, ui) {}

var value = slider.slider ('value'),

volume = $('.volume');

ToolTip.CSS ('left', value) .text (ui.value);

If (value < = 5) {}

volume. CSS ('background-position', ' 0 0');

setVolume (value);

document. Forms ["myForm1"]. Input.value = value/100; output to html field trial to see what value

}

ElseIf (value < = 25) {}

volume. CSS ('background-position', ' 0 - 25px');

setVolume();

document. Forms ["myForm1"]. Input.value = value/100; output to html field trial to see what value

}

ElseIf (value < = 75) {}

volume. CSS ('background-position', ' 0 - 50px');

setVolume();

document. Forms ["myForm1"]. Input.value = value/100; output to html field trial to see what value

}

else {}

volume. CSS ('background-position', ' 0 - 75px');

setVolume();

document. Forms ["myForm1"]. Input.value = value/100; output to html field trial to see what value

};

},

stop: {function (event, ui)}

tooltip.fadeOut ('fast');

},

});

});

function setVolume (value) {}

var intVolume;

value = intVolume;

thisMovie("VideoPlay").setVolume (intVolume/100);

thisMovie("VideoPlay").setVolume (value);

};

With the AS3 value

const DEFAULT_VOLUME:Number = 0.6;

ExternalInterface.addCallback("IsStatic",IsStatic) ("setVolume", setVolume);

in the init function

setVolume (DEFAULT_VOLUME);

function setVolume(intVolume:Number_=_0):void

{

var sndTransform = new SoundTransform (intVolume);

nsStream.soundTransform = sndTransform;

If (intVolume > 0)

{

mcVideoControls.btnMute.visible = true;

mcVideoControls.btnUnmute.visible = false;

}

on the other

{

mcVideoControls.btnMute.visible = false;

mcVideoControls.btnUnmute.visible = true;

}

}

The Flash-based volume slider works without any problem.  The version of Javascript, when I go to move the cursor, the output shows a value of 0.02 a.99, I thought this would be the correct range to SoundTransform.  However, the actual result audio, it is that the audio goes to the else statement in the setVolume function and cut the sound.

Summer banging my head on the wall with this one for awhile and I can really understand how to get only the volume not to mention finding anything similar via research.  Any help would be appreciated.

Thank you!

With a third look, in fact, this is probably what will do the job:

slide: function(event, ui)
{
          var value = slider.slider('value'), volume = $('.volume');
          setVolume(value);
          document.forms["myForm1"].input.value = value / 100;
          tooltip.css('left', value).text(ui.value);

          if (value <= 5)
          {
                    volume.css('background-position', '0 0');
          }
          else if (value <= 25)
          {
                    volume.css('background-position', '0 -25px');
          }
          else if (value <= 75)
          {
                    volume.css('background-position', '0 -50px');
          }
          else
          {
                    volume.css('background-position', '0 -75px');
          }
}

Tags: Adobe Animate

Similar Questions

  • Issue using the external monitor.

    I was given an external monitor that I could connect to my laptop.  I forgot the keys I had hit to use the external monitor.  I got disabling it on the screen that turned my monitor on the laptop.  I can't find a way to re - turn on the monitor.  I can't have anything other than a white one on my laptop screen.  I would really appreciate how to turn my monitor on the laptop.  All information would be welcomed.  Thank you-dukey41

    Hello

    Check with the manufacturer of the laptop's support, their books online and ask in their forums.
    Some have special tools/methods to control one 2nd monitor other than Windows,

    Right click on the desktop - properties Graphics

    Right click on desktop - graphics Options

    Right click on desktop - customize - display settings

    These should help you to implement and control.

    How to set up dual monitors in Windows 7
    http://www.online-tech-tips.com/Windows-7/How-to-Setup-dual-monitors-in-Windows-7/

    Two screens are better than one
    http://www.Microsoft.com/athome/organization/twomonitors.aspx

    Work and play better with multiple monitors
    http://Windows.Microsoft.com/en-us/Windows7/work-and-play-better-with-multiple-monitors

    Move windows between multiple monitors
    http://Windows.Microsoft.com/en-us/Windows7/move-Windows-between-multiple-monitors

    Multiple monitors: frequently asked questions.
    http://Windows.Microsoft.com/en-AU/Windows-Vista/multiple-monitors-frequently-asked-questions

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • Measurement error of the County of edge by using the external sample clock

    Hello

    I'm trying to measure the number of edges (rising) on a square wave at 5 kHz with a generator function on a device of the NI PCIe-6363. I configured a channel of County of front edge of counter at the entrance of the PFI8 device. I use an external sample clock that is provided by the output of the meter of a NI USB-6211 housing channel. If I acquire for 10secs then ideally I would expect to see a total of 50000 edges measured on the meter inlet channel. However, my reading is anywhere between 49900 and 50000.

    When I use the internal clock of time base to measure the edges, the measure is accurate and almost always exactly 50000. I understand that when you use the external sample clock, the precision of the measurements is subject to noise level of the clock signal. However, I checked the clock signal is stable and not very noisy. Any reason why there is an error of measurement and how tolerance should I expect when using an external sample clock compared to when you use the internal time base clock?

    Also, what is best clock Frequency (with respect to the frequency of the input signal) when using an external clock?

    Thank you

    Noblet

    Hi all

    Thanks for all your sugggestions. I was using an input signal with a function generator which had a range of 8V. It turns out that the reduction of the amplitude to 5V solves the problem. I was able to get accurate numbers with the 6211 external clock.

    Thank you

    Noblet

  • Used the external drive for catalog/photos for months. Yesterday-&gt; error msg: "LR cannot open the catalog"StanLRCatalogRepaired"on"Seagate Drive - LR Photos"because LR cannot save changes to this place. LR catalogs cannot be opened on removable disks,

    Used the external drive for catalog/photos for months. Yesterday-> error msg: "Lightroom can't open the catalog named"StanLRCatalogRepaired"located on the 'Seagate Drive - LR Photos' volume because Lightroom can't save the changes to this place. Lightroom catalogs not opening on the network volumes, removable storage, or read only volumes. »

    The first thing to do is to check if somehow the permissions for the drive Seagate or any of its relevant folders/subfolders has changed somehow (an OS update maybe?)

  • Portege R600 - how to use the external monitor on the docking automatically

    Hi - I just got a new Portege; R600-102. It's a great machine - very light and fast.

    I connect to a Slim port replicator to the office and I wish I could anchor and automatically use the external monitor without opening the laptop. Can someone point me in the right direction on how to do it? This process has worked well on my recently retired Dell X 300.

    More precisely:
    # I have the laptop closed Portégé and standby mode
    # I anchor in the Slim Port Replicator (SPR)
    # I press the button 'on' on the SPR
    # I see the message "recovery windows" and the bars of the countdown on the external monitor. (So I know it's connected and you can see the external monitor)
    # The laptop turns on but use the laptop screen (private) LCD
    # I have to open it and manually tell it 'out to watch.
    What can be automatically?

    Thanks for the tips.

    Post edited by: ExDirectory

    Hello

    You use Windows XP Home or Vista edition?

  • What is it's ok to keep Satellite U500 closed while using the external monitor?

    Hello

    I have a Satellite U500.
    At home, I use a monitor and a keyboard. So I closed the laptop while working at home.

    I can do this, or would it damage the display or otherwise hinder ventilation properly somehow laptop?

    Thank you very much for your answers.
    Thierry

    Hi mate

    Of course, you can close the lid when the laptop is connected to the external display.
    I have a Satellite phone as well and it s connected to the external monitor.
    I also have a USB keyboard.

    I use the external keyboard instead of the internal keyboard for laptop and the cover is too firm

    Don t worried if he of ok!

  • I can't enter the bios using the external monitor

    Hello, I use Dell Inspiron n4010 for the last 2.5 years. My laptop monitor stopped working that's why I bought an external Dell monitor... Its works fine but I need to install the windows now... Unfortunately, I cannot get into the BIOS of the external display and can not change the device to initialize DVD ROM.

    Please can someone tell how to enter the BIOS using the external monitor (I put it as a main monitor, but it still does not work)? The Monte screen after windows starts... Is it possible to get it back? Help, please...

    Yes - I know - it's what I'm trying to show you how!

    If you follow my instructions in my last post, you will see nothing for the "six seconds".but the startup process stops at the BIOS screen and FN & F1 or F1 key will rise from the dead internal to external monitor.

  • I would use the external drive to download my photos, documents, etc. but do not know how to proceed.

    I just got my old crash (desk top) computer. I knew it would, so I transferred all my information on an external hard drive. I bought a dell 2020 with windows 8, only bought a few days ago. I would use the external drive to download my photos, documents, etc. but do not know how to proceed.  My old computer won't start at all, that's why I got the external drive. Could someone please help me with this task. Thank you.

    Original title: confused

    You can simply plug it in, connect the external hard drive, make sure it is turned on.

    Then copy and paste on your files.

    In Windows 8, start File Explorer

    Highlight all the files and folders

    Click on copy on the Ribbon (Home tab)

    Then then paste into their respective folders

    Press Windows key + R

    Type: %UserProfile%

    Press enter

  • Examples on how to use the external value of the vro

    I'm trying to use the 'external value' VRA 7 feature to get data for a property definition.  Examples or guides?   I have a quick action that returns the string, but I get this error

    externalvalue.JPG

    Figured it out... the exit on the action must be array/string...

    now working to reproduce the relantionships parent on custom properties that not available in version 7

  • Using the external table error

    Hi all

    This is the first time I use the external table for loading the data.

    I did these steps

    In the D:\sqlloade folder, I have my text file containing data example.txt

    I ran these queries

    CREATE OR REPLACE DIRECTORY  ext_tab_data AS 'D:\sqlloader';
    
    

    Directory created

    CREATE TABLE fxops.t_ext (
    t number
    )
    ORGANIZATION EXTERNAL (
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY ext_tab_data
      ACCESS PARAMETERS (
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        MISSING FIELD VALUES ARE NULL
        (
         t number
        )
      )
      LOCATION ('sample.txt')
    )
    PARALLEL 5
    REJECT LIMIT UNLIMITED;
    
    

    create table

    When I tried to create a view on that table, he throws an error

    CREATE OR REPLACE VIEW fxops.t_view  AS
      SELECT *
      FROM   fxops.t_ext;
    
    SQL Error: ORA-06564: object EXT_TAB_DATA does not exist
    06564. 00000 -  "object %s does not exist"
    *Cause:    The named object could not be found.  Either it does not exist
               or you do not have permission to access it.
    *Action:   Create the object or get permission to access it.
    
    

    Sign in, and then run this:

    Select HOST_NAME from v$ instance;

    is this the same hostname that you are connected?

    Kind regards

    Harry

  • Embedded the swf using the external video (FLVPlayback) error #2035 / #2044

    I struggled with this a lot recently, and I don't even know if it's at all possible.

    I am currently working on a project where I am incorporating a .swf inside another .swf.

    The built-in .swf file however also uses the external videos FLVPlayback to load component, this is where the problem starts.

    When you publish the .fla project I get the 2035 # IOErrorEvent when tracing the problem I get the #2044, it is to be expected however.

    The embedded swf is always looking for external videos, but since the new ROOT is the swf file, in which it is integrated, it will not find these videos.

    I need to know if there is a way I can specify or link these external videos required by the embedded swf file FLVPlayback component.

    I really can't be bothered again all the video content and their incorporation in the timeline.

    Thank you.

    The code inside the SWF will trigger these errors will occur if you don't have the source for sovereign wealth funds to stop it.

    If you do then you can just access SWF files loaded the mother/stub swf you have and check anything with a name or instance on the display list with the code, as all of the FLVPlayback components. You can then tell them the correct path.

    Otherwise, it would take something like a rewrite mod apache to redirect paths incorrect film to the correct path.

  • How to use the external swf semi-transparent mask?

    I want to use the external swf semi-transparent mask for the smooth transition. I use

    clip.cacheAsBitmap = true;

    mask.cacheAsBitmap = true;

    clip.setMask (mask);

    Everything works fine. But when I use

    loadMovie ("http://www.url.com/movie.swf", "_root.clip");

    clip.cacheAsBitmap = true;

    mask.cacheAsBitmap = true;

    clip.setMask (mask);

    It does not work... What am I doing wrong?

    Well, if your loadMovie is on the same timeline as the code that you set as a mask, then you need not _root.

    And sorry, I forgot, there was a problem with the main mc of masking that loadMovie is load in. While I was doing was putting clip inside another mc and called as well as mc 'container' then my code would look like:

    masker.cacheAsBitmap = true;

    container.cacheAsBitmap = true;

    container.setMask (masker);

    container.clip.loadMovie ("movietoload.swf");

    Download two attached SWF files and open the main.swf to see.

  • HP Envy X 2 (15-C001dx): HP Envy X 2 (15-C001dx): question seeks to use the external monitor

    I have a brand new HP Envy X 2 (15-C001dx) with Windows 8.1. So far, it works fine by itself. I tried to connect an external monitor to the laptop using an HDMI cable from the laptop to a LG L246WPQ screen. The problem is that 10-15% of the left side of the content portable screen does not appear on the external monitor. Missing from the external display is the word "Start" in the upper left with roughly 2 columns to tiles. This occurs in the two "dual display" or "show only the screen 2" modes.  It's using a resolution of 1680 x 1050 times the cell phone and the LG appearing in support. Using the touch screen on the laptop I can scroll tiles to the right and see the missing columns at the far left. The information displayed on the external monitor begins as far left this screen will be displayed. In other words, there is no black and white on the left box. Except for the missing information on the left side, from the rest of the external display content seems fine. I have updated video driver of the laptop at the latest on HP.COM.  No change in behavior. I tried all the options I could find on the LG OnScreenDisplay, but nothing does the display not better. I've seen complaints on some forums that some "DPI" support added in Windows 8.1is causing many grief monitor for some people. Who would have something to do with it?

    This sounds like a video driver problem?  Something incorrect or incompatible with this LG monitor? Suggestions on other things to try?

    Thank you

    @outback ,

    Hello and thanks for the display on the HP support forums,

    The first thing I would try this question takes the hdmi cable and plug it on another monitor or a TV.

    If the same problem exists then LG issue.  If the same problem occurs on other screens or TV then looking at a resolution problem on the output of the system.

    Even if you can be able to higher resolutions sometimes native resolution will eventually force you to lower it.

    I have two screens at home who can manage resolution 1680 x 1050, however the native resolution is less than that.  and according to what I connect to the screen will depend on what I can get away with.

    Here are some links that you can see and which can be useful.

    Troubleshooting screen HDMI and sound problems

    I checked on the model of monitor you are using, and it seems to have this problem on many different systems.

    LG L246WPQ

    L246WP 24 '' LG display moved to the left driver Nvidia 8.15.11 - EVGA GTX 260

    Here is a list of the problems of google I found.

    The screen shifted to the left.

    I would like to know how this happens.

    Thanks again for posting and have a great day.

  • How to view the external cursor opened in a session

    Hi all
    Is there a way to display a cursor open external in a session? Suppose if I want to check if there is a public and open cursor that has been defined in a package, how can I do? I try to play with v$ open_cursor, but I can't make sense.

    Best regards
    Val

    Valerie Debonair wrote:
    I want to test a lifetime of a cursor in a session. I don't want to interrogate another session but the same session where the open cursor.

    This probably more experimentation rather than useful in the real world. Suppose I have a package that sets a public cursor (as defined in the package spec) but for reasons of bad programming practice, the cursor is not closed and remains in session until the end view of v$ open_cursor can you tell me if an open cursor exists in the session?

    How do you know if this open cursor has been consumed (not more data), or not? It might be half an hour old, but still perfectly valid (if using the snapshot has not expired).

    I wouldn't say a cursor that was opened for x times a problem. The problem is to have multiple copies of the same open cursor - like which indicates a cursor leak.

    Anyway, you can watch the view V$ OPEN_CURSORS performance virtual - but in my test below, that time is is filled not doing a calculation of time would not work. You can continue this and dig deeper into the data dictionary (and the behavior of the Oracle) to determine if your needs can be met.

    SQL> --// package defines a static session PL/SQL cursor
    SQL> create or replace package FooLib as
      2
      3          cursor c is select object_name from user_objects;
      4
      5  end;
      6  /
    
    Package created.
    
    SQL>  --// open the cursor
    SQL> begin
      2          open fooLib.c;
      3  end;
      4  /
    
    PL/SQL procedure successfully completed.
    
    SQL> --// do at least one fetch making sure that the cursor has been "touched"
    SQL> declare
      2          s       varchar2(30);
      3  begin
      4          fetch fooLib.c into s;
      5          DBMS_OUTPUT.put_line( s );
      6  end;
      7  /
    SYSLIB
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> --// the data in v$open_cursor for the PL/SQL cursors we have opened in our session
    SQL> select
      2          c.sid,
      3          c.user_name,
      4          c.cursor_type,
      5          c.last_sql_active_time,
      6          t.sql_text
      7  from       v$sqltext t,
      8          v$open_cursor c
      9  where      c.address = t.address
     10  and        c.hash_value =  t.hash_value
     11  and        c.sid = (select sid from v$session where audsid =SYS_CONTEXT('userenv','sessionid') )
     12  and        c.cursor_type = 'OPEN-PL/SQL';
    
           SID USER_NAME  CURSOR_TYPE          LAST_SQL_ACTIVE_TIME SQL_TEXT
    ---------- ---------- -------------------- -------------------- ----------------------------------------------------------------
            25 BILLY      OPEN-PL/SQL                               SELECT OBJECT_NAME FROM USER_OBJECTS
    
    SQL>
    SQL>
    SQL> begin
      2          close fooLib.c;
      3  end;
      4  /
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL>  --// cursor should now be gone as it was closed
    SQL> select
      2          c.sid,
      3          c.user_name,
      4          c.cursor_type,
      5          c.last_sql_active_time,
      6          t.sql_text
      7  from       v$sqltext t,
      8          v$open_cursor c
      9  where      c.address = t.address
     10  and        c.hash_value =  t.hash_value
     11  and        c.sid = (select sid from v$session where audsid =SYS_CONTEXT('userenv','sessionid') )
     12  and        c.cursor_type = 'OPEN-PL/SQL';
    
    no rows selected
    
    SQL> 
    
  • Change the Volume using the Slider component

    I am using the slider (aSlider) to control the volume for mySound, which is a class called PlaySound. Created an addEventListener for aSlider with an execution of a function called changeVolume SlideEvent.CHANGE. All other works, but I can't get the cursor to control the volume for mySound. Need help. Here's the current code. TY in advance.


    import flash.events.Event;
    Import fl.controls.Slider;
    Import fl.events.SliderEvent;
    Import fl.controls.Label;

    var mySound:PlaySound = new PlaySound;

    stage.addEventListener (Event.ENTER_FRAME, clock);

    var OFF: Boolean = true;

    function clock(event:Event):void
    {
    var currentdate:Date = new Date();

    arc_mc. Visible = false;
    secondHand_mc.rotation = currentdate.seconds * 6;
    minuteHand_mc.rotation = currentdate.minutes * currentdate.seconds + 6 / 10;
    hourHand_mc.rotation = currentdate.hours * 30 + currentdate.minutes / 2;

    If (secondHand_mc.rotation >-60 & & secondHand_mc.rotation < 0)
    {
    arc_mc. Visible = true;
    If (OFF)
    {
    OFF = false;
    mySound.play ();
    }

    }
    on the other
    {
    arc_mc. Visible = false;
    SoundMixer.stopAll ();
    OFF = true;

    }


    }


    aSlider.addEventListener (SliderEvent.CHANGE, changeVolume);

    function changeVolume(event:SliderEvent):void
    {
    var volumeLevel:Number = 5;
    volumeLevel = event.target.value / 100;
    valueLabel.text = event.target.value + 'percent';
    }

    you follow all the instructions.  use:

    import flash.events.Event;
    Import fl.controls.Slider;
    Import fl.events.SliderEvent;
    Import fl.controls.Label;
    import flash.media.SoundTransform;

    import flash.media.SoundChannel;

    var mySound:PlaySound = new PlaySound();

    var mySoundChannel:SoundChannel;

    stage.addEventListener (Event.ENTER_FRAME, clock);

    var OFF: Boolean = true;

    function clock(event:Event):void
    {
    var currentdate:Date = new Date();

    arc_mc. Visible = false;
    secondHand_mc.rotation = currentdate.seconds * 6;
    minuteHand_mc.rotation = currentdate.minutes * currentdate.seconds + 6 / 10;
    hourHand_mc.rotation = currentdate.hours * 30 + currentdate.minutes / 2;

    If (secondHand_mc.rotation >-60 & secondHand_mc.rotation)<>
    {
    arc_mc. Visible = true;

    If (OFF)
    {
    OFF = false;
    mySoundChannel = mySound.play ();  delcare mySoundChannel outside all functions
    mySound.play ();
    }
    }
    on the other
    {
    arc_mc. Visible = false;
    SoundMixer.stopAll ();
    OFF = true;
    }
    }

    aSlider.addEventListener (SliderEvent.CHANGE, changeVolume);

    function changeVolume(event:SliderEvent):void
    {
    valueLabel.text = event.target.value + 'percent';
    var st:SoundTransform = mySoundChannel.soundTransform;
    St.volume =(event.target.value-event.target.minimum) / (event.target.maximum - event.target.minimum);
    mySoundChannel.soundTransform = m;
    }

    TX 1 million

Maybe you are looking for