Selection.setFocus() weirdness

Hi All,
I am getting a bug in Flash player and also in the Flash Test
Movie publish involving the Selection.setFocus() method (authored
using Flash 8).
I have 3 movie clips that require focus toggled between them
via keyboard directional arrow input. Those clips are:
- musicVolume_mc
- effectsVolume_mc
- speechVolume_mc
I initially set the focus to the first movieClip:
Code:
Selection.setFocus("musicVolume_mc");
and then each movieClip uses the following code example
placed on the clip itself to target the next clip;
Code:
on(keyPress "<Up>"){
Selection.setFocus("_parent.speechVolume_mc");
on(keyPress "<Down>"){
Selection.setFocus("_parent.effectsVolume_mc");
Trouble is, the focus doesn't get passed as you would expect
between each of the 3 clips, it gets stuck and jumps to the wrong
clip....it's quite strange and frustrating. Has anyone had this
issue?
What do other people use to set Focus between movieClips
reliably..?
thanks
mitchell

thanks for your reply,
I managed to solve the problem by disabling the tabEnabled
setting with is by default set to "true" and clashes with keyboard
arrow input..
Code:
instanceName.tabEnabled=false;
Also, if anyone else has this issue in future, relative paths
inside the setFocus parameter didn't work for me....so use absolute
ones instead, as in the following example.
Code:
Selection.setFocus("_root.audioOptions.effectsVolume_mc");
cheers

Similar Messages

  • Selection.setFocus(null)

    I have a movie clip that holds a text field that can be
    changed either by typing in to it or clicking buttons (also
    contained in the movieclip). Once the text field has focus there
    seems to be no way of getting rid of it other than clicking in
    another field. I have tried using Selection.setFocus(null) and this
    appears to kill the focus but it is returned straight away and
    while the field has focus the button input fails.
    I am stuck, any thought welcome
    Cheers all

    there must be some event that triggers your textfield to
    loose focus. that can be any user action or a timer or anything
    else that occurs within your swf or anywhere that your swf can
    access. at that point your code should work.

  • Selection.setFocus();

    Why is this one so hard. There are a couple dozen posts out
    there but nothing I have tried works. So here it is.
    An input textbox onScreen with an instance name of: myText -
    that's it. // no text in the box.
    Running the following script in the action layer in frame one
    I have:
    Selection.setFocus("myText");
    Selection.setSelection(0,0);
    This needs to run on Flash Player 6 so I am shying away from
    getCaretIndex(); and a few other scripts I have seen.
    I'll keep digging around, but by the looks of ALL the
    questions and postings - this problem has been around for awhile.
    Does ANYONE have an actual working input textbox
    (test/sample) I can look at? (I am using FlashPro8)

    orion.doty,
    it's just the line Selection.setFocus("textfieldname") and
    the fact that Flash has focus that make the cursor blink. I tried
    with publish settings for player 6 & 8, both AS 1 and AS 2,
    they all work fine in player 8 on Windows. I don't know if maybe
    the Mac player behaves different... In Win it doesn't matter if
    it's the plugin or the standalone player.
    Try a little testmovie: in frame 1, place a stop() and a
    button that has nextFrame() onRelease. In frame 2, place the
    textfield, and add Selection.setFocus("textfieldname") to the
    frame's actions. If you test the movie, the cursor should blink
    when you pressed the button and the movie enters frame 2. It won't
    work if you leave out frame 1 with the button, so I guess Flash has
    to receive the focus through a click inside it to highlight the
    focused selection.
    hth,
    blemmo

  • Path selection acts weird

    Hi everyone,
    Help me please! I made a path and after selecting it the selection makes a different form than the path. Like this:
    This is only happening at this area, other parts are good. Do any of you have an idea what to do with it?
    Thanks a lot.

    Hi,
    I tried to make the selection every way:
    by right clicking in the path and make selection,
    by right clicking on the path on the path panel and make selection,
    by clicking on the path on the path panel while holding ctrl key…
    … and the result is the same all the time.
    I didn't have any other selection.
    I use PS CS5 version 12.0.4 × 32, my operating system is Win 7 Enterprise SP1
    I never experienced anything ilke this before. I restarted the system and tried it again, but it's the same.

  • SELECT SINGLE weird behaviour

    Hi Experts,
    I have written the following query to pick up the address no. In case, there are multiple entries found in table ADRC according to my WHERE clause condition, the query returns the first address no out of those multiple address nos in one system 'A' whereas it returns the last address no. in similar situation in a different  system B.
    SELECT SINGLE addrnumber
                    name1
                    sort1
                    street
                    house_num1
                    city1
                    region
                    post_code1
                    INTO wa_customers
                    FROM adrc
                    WHERE sort2       EQ 'ABC'
                    AND addr_group EQ 'XY'.
    Any idea why the same query is behaving differently in two system?
    Thanks.

    Hi,
    as we should have learned in RDBMS and SQL basic classes ;o) the order of rows returned by a select statement is not defined as long as there is no ORDER BY definition in the statement. As SELECT SINGLE internally gets all records and then takes the first record of the result set, it is not defined which record is returned.
    So even if you run a statement on the same system several times the returned record can be fully random. That it is not always completely random is more a random technical effect of the algorithms and access strategies the data base implements within the frame defined by the DB/SQL standards. So nothing is garanteed the next DB patch could change the behavouir completely if the data base implements a new algorithm. So do not trust in such not defined, not documented and not garanteed system behaviour.
    From the implementation aspect I'd personally prefer a SELECT * INTO TABLE followed by a READ TABLE INDEX 1. The select single w/o full primary key and with ORDER BY bypasses the table buffers and should be slower. If the statement should always return one line there is no need for sorting the table. If there should be one line and two are returned the data is inconsistent, sorting for a certain record won't make this any better. Here I would add an assertion that only one record was found so the application stops if data is corrupt and someone takes care of correcting the data.
    Best Regards
    Roman

  • Selection.setFocus listener

    Hi there!
    How do I write a listener which can trigger the opening of a
    MovieClip ( myMc.gotoAndStop(2) ) when Tab Selection occurs on a
    given TextField ?
    Many thanks in advance for your help!
    Regards,
    Gerry

    Hi kglad !
    I did it this way (see attached code).
    But got no result...
    More : it makes my page (frame) unresponsive.

  • Weird Symbols in my Text! Help! (Unicode?)

    So, InDesign has decided to change certain character combos into weird characters. When I copy them out, they show up right in every other program - but they print and export wrong (otherwise I wouldn't care too much).
    il = S with a v mark on top (I don't even know how to make it with the keyboard, or what it's called.)
    io = Ú
    There may be more that I haven't come across yet.
    It's done this before, but I don't remember how I fixed it. It had something to do with changing to or from some kind of Unicode, I think.
    Working in Snow Leopard, CS6 with Cloud.
    Thanks! -T
    EDIT: It doesn't do it in certain boxes, but I have no idea why some and not others.
    EDIT 2: FIXED! Yay for corrupt fonts! (/sarcasm) Deactivating and then reactivating the trouble fonts fixed the problem.
    It's still an InDesign bug though, since it DOESN'T affect any of my other programs. Omg. That was not cool to happen on deadline.

    Glad you could get it to work again! Nothing like a good deadline to encounter such problems.
    Here is a bit of background information:
    A font consists of 'regular' characters (which you can type in from a keyboard; those are indeed Unicode characters), 'special' characters (ligatures, Real Small Caps, Oldstyle numbering, etc., which typically are not valid Unicode characters), and a list of commands which say "if these two character go in, replace them by this single other one instead". That list of commands specifies OpenType ligatures -- and it doesn't really work on characters, but on glyphs instead. A 'character' has a Unicode value, but a 'glyph' may not have one -- it's just an index in the list of all individual drawings in the font, specifying the nth glyph in there.
    When all's well, this is not something you'd ordinarily notice. InDesign keeps a list of all fonts, and of all characters and glyphs in all of these fonts, and its OpenType Glyph relations (which, as you may deduce, are only valid for the font they appear in -- some fonts have more "glyphs" than others, and the Glyph Order varies wildly from one font to another, as you can see in the Glyphs Panel when sorted on "GID" (= "Glyph ID")).
    What happened with your system is that presumably InDesign got the list of 'glyphs' from one file, but OpenType features from another file, with the exact same font name! So the perfectly normal operation "if you see glyph number 15 followed by glyph number 31, replace it with glyph number 65", meaning for that one font "replace "f" followed by "i" with the glyph "fi"", got confused and instead came to mean "replace "i" followed by "l" with "Š"" (its proper name is "S Caron", with the Caron being this V accent).
    So possibly you had more than one version of the same full font name installed (not the file name, but the internal full font name; "Times New Roman Italic", for example). One of the tricks to check this is to select this weirded-up text and disable Automatic Ligatures. If you see it revert to readable text, then this was the issue.
    It's also possible something inside your system got confused -- InDesign, written by Adobe, accessed loads and loads of Extra Tricks in fonts that your typical other software doesn't care, or even know, about. That's why mishaps of this kind are typically picked up first by InDesign.
    The Find Font dialog is your friend in tackling this issue. You can inspect the file paths of the troublesome fonts, and see if there is anything out of order; for example, you might suddenly see an unexpected file path. A tell-tale sign of Double Font Syndrome is when you physically remove that font file out of InDesign's view, and you can still see it works in InDesign -- but now with another file path in the Find Font dialog. At that point you only have to decide which one of the two was the "correct" font file ...

  • TabIndex & setFocus issues.

    Hi all,
    I am having a real issue with getting tabIndex and setFocus
    to work with my custom TextInput component. I have tried everything
    that I can possibly think of and it just won't work. When I test
    the component and set tabIndex or setFocus nothing happens. Any
    ideas would be greatly appreciated. Below is the actionscript I
    have in my class file. (note: need it to work for fp 7+)
    class brownfreelance.components.AdvTextInput extends
    MovieClip {
    private var _mTextContainer:MovieClip;
    private var _tTextBox:TextField;
    private var _bTabChildren:Boolean;
    private var _nTabIndex:Number;
    public function setFocus():Void {
    Selection.setFocus(_mTextContainer._tTextBox);
    public function set tabIndex(nTabIndex:Number):Void {
    _mTextContainer._tTextBox.tabIndex = nTabIndex;
    public function AdvTextInput() {
    CreateTextBox();
    _mTextContainer._tTextBox.tabChildren = true;
    _mTextContainer._tTextBox.tabEnabled = true;
    _mTextContainer._tTextBox.tabIndex = _nTabIndex;
    private function CreateTextBox():Void {
    _mTextContainer.clear();
    _mTextContainer = createEmptyMovieClip("_mTextContainer",
    getNextHighestDepth());
    _mTextContainer.createTextField("_tTextBox",
    getNextHighestDepth(), 2, 2, (_nWidth-2), (_nHeight-1));
    Thank's in advance.

    On Thu, 6 Sep 2007 12:51:09 +0000 (UTC), "fourthleaf"
    <[email protected]> wrote:
    >I have been having two issues with Dreamweaver over the
    last week.
    >
    > First - it freezes after one upload, any time of file.
    One goes fine and then
    >the next time I try to upload it just gets "caught". The
    upload box comes up,
    >but never goes anywhere and it's unsuccessful. Seems like
    the only way to fix
    >it is to shut down and restart. (Which I usually have to
    do because all of
    >Dreamweaver then freezes.)
    >
    > Also, the files that I did upload are not showing live.
    They show in the
    >remote server has having been uploaded, but when I try to
    view the files
    >on-line, they do not appear. I have refreshed, cleared my
    cache, everything...
    >but the files are not updated or uploaded.
    >
    > Any ideas?
    >
    >
    I would try a different server, maybe that one is choking.

  • SetFocus on TextInput

    Hi
    I need to make the cursor blinking on thet textinput
    component when i run the flash file... at first
    ~~
    Sk

    Hi
    i am placing code on the main time line but it's not running
    fine...
    i kept the textinput component in the firstframe and code
    also in the firstframe..
    but the cursor is not blinking in the textinput component.
    this.onSetFocus=function(){
    Selection.setFocus(tf);
    or else i need to do any change
    can you please tell me...
    ~~SK

  • FocusManager.setFocus

    I have made one loging screen in Flash there I am setting
    focus for the Email Field first when the page loads.
    Following are the lines of code I have used
    Selection.setFocus("emailBox");
    Now the problem I am facing is it works fine Flash Authoring
    environment but it does not works in the Browser unless user clicks
    on the swf object anywhere.
    http://beta.thescoutingedge.com/index.php/clogon1
    Please help me out and also let me know your comments about
    the site look and feel.

    Well I don't see your code, but, "Yup, that is how it works."
    As far as I know the swf has to get focus fromt he user
    before you can setFocus on any object.

  • Automatic select textbox / textfield ?

    Hello,
    Is it possible to get an automatically focus on a textbox (or
    textfield) in Flash?
    I tried this:
    Selection.setFocus(input_txt);
    Selection.setSelection();
    where input_txt is the instance name of the textfield.
    It does not work?
    Does anyone know how to do this?
    Regards,
    Micheal.

    Hi,
    Try this.
    Selection.setFocus("input_txt");
    instance name of the textfield should be within doublecodes.
    It works when you run the swf file seperately
    GHMS

  • SetFocus() causing an infinite loop? is this a known thing?

    hi folks
    i've just started revising a site of mine (
    http://www.darkeststar.co.uk)
    using flash cs3 (was originally in mx2004) and i've come across
    some strange behaviour from one of the components
    when i test the combo box, it freezes and gives
    Code:
    256 levels of recursion were exceeded in one action list
    as an error. This is strange because when i was using mx2004,
    there was no problem.
    Now, when i get rid of a setFocus() used on a TextArea
    component immediately afterwards, the problem is corrected
    (although the user cannot type directly in the textbox and has to
    click in it first which is awkward imo)
    is this a known thing? i haven't used the built-in components
    much before now but they've been almost as much hassle as they've
    solved

    The way that I have always used setFocus() is this
    Selection.setFocus(itemOverlay_mc.amountTextArea_txt);
    Maybe the functionality has changed since mx2004. Try that,
    see what happens

  • SetFocus messes up key listener

    I have a textfield attached to a movieclip attached to a
    movieclip on the stage. I have an object set to listen for key
    events, and that object defines an onKeyDown function. If I run the
    movie and click on the textfield manually, a cursor appears in the
    textfield, and when I enter text the onKeyDown function executes.
    If instead I use Selection.setFocus(myTextfield), the cursor
    does not appear, but I can still type text in the textfield.
    However, this apparently makes a big difference, because now the
    onKeyDown function in the key-listener object does not execute. Is
    there a way to programmatically set focus and still have key
    listeners work? What is the difference between the
    Selection.setFocus kind of focus and the other kind of focus when a
    cursor appears?

    create an array. it's quick and easy if you work cleverly.
    create an empty array and push your ascii keypress codes into
    it. then test your project and keypress the numbers and letters in
    the order you want them to be listed in your array.
    when you're finished trace your array (in order), copy the
    output panel and in the authoring environment paste your ascii
    array.

  • Unable to set focus to login text field AUTOMATICALLY on page load

    Hi,
    I'm trying to have my flash (AS 2) login page have the
    username field start blinking right away after the page is loaded
    but so far, no success.
    I've added the following Javascript to the HTML wrapper:
    But it still doesnt work. Can anyone help?
    See whats happening by
    clicking here.

    Use the following in the Flash code:
    Selection.setFocus(username_field_instance_name);

  • Problem with setSelection and components

    Hi! I have a problem with setSelection function when there is
    any component on the stage or in the library. Just look on the
    sample
    here The first
    button sets focus and sets selection, the second one removes focus.
    It works good, but add any component to break it. Is there any
    other way to unset focus? Maybe this is the problem... Any help?
    BTW Sorry for my english :)

    Selection.setFocus(component) removes current
    selection

Maybe you are looking for

  • System Preferences shuts down when trying to apply .CR2 image as background

    Hello- I have been trying to apply a photograph taken in RAW as a desktop background image. The file is .CR2 and when I click done to set it as the background, the background does not change and the notice comes up that System Preferences has unexpec

  • Payment Means - Bank Transfer

    In SAP 8.8, we recorded a bank transfer incoming payment from one Business Partner for a partocular Sales Order. This is under Banking > Incoming Payments. When I open that Sales Order transaction, I clicked on 'Payment Means' icon and go to 'Bank Tr

  • Which is better? JDO or Java Persistance API?

    Hi folks I'm trying to build an app on Google's cloud service. Looking into this ( [http://code.google.com/appengine/docs/java/overview.html|http://code.google.com/appengine/docs/java/overview.html]), it tells me that for java projects there are 2 po

  • Transitions (yet again!)

    I know there have been other questions about this but I still haven't solved my problem. I can only use fade and wash transistions (all others are greyed out, but I can preview them). PLEASE PLEASE PLEASE I beg you! Has anyone got any idea what I am

  • DMS Characteristics Table

    Hi We are in Petroleum Company and using ECC 5, I am trying to create Document Management System (DMS) for maintaining information and routing with PO. While creating characteristic, using character field in Basic TAB, in Restriction TAB put 017, how