dcsimg
A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: [RESOLVED] looking for the accent ^ encoding

  1. #1
    Junior Member
    Join Date
    Mar 2016
    Posts
    13

    resolved [RESOLVED] looking for the accent ^ encoding

    looking for the accent " ^ " encoding (AS2)
    Hi !
    Inside an animation with a lot of BUTTONS to CLIC (and not by typing on the computer keyboard !)
    for writting inside a text field (this part is ok),
    I need to send correctly the letters with the circumflex accent ( ^ ), in the same text field.

    And so I'm looking for the small encoding for sending correctly in that text field the letters (a,e,i,o,u) with an accent circumflex.
    For getting that : , , , , ..........
    and not this : ^a, ^i, ^u, ^o, ^e !!!

    (I found a solution with five functions, but it's a little bit to long and complex, and, when I mix with other parts of my animation - caps lock button for instance, it does'nt work anymore... !)

    So, I think in fact that what I'm looking for, is something like the following backspace encoding:
    " enterField = enterField.slice(0, enterField.length-1); "
    but without clearing the previous character !
    Is it possible to find that ?

    Sorry for that possible basic request, but I'm a french designer interested with actionscript encoding, and not a developper !)
    Thank's a lot for answer

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,785
    HI,

    I.m not entirely sure what you mean.

    but if you embed your font, then look at the font properties and then in the also include these characters box, paste these chars into it

    œ€

    and more if you find them

    PHP Code:
    trace(escape("œ€"));
    trace(unescape("œ€")); 
    this may help too

  3. #3
    Junior Member
    Join Date
    Mar 2016
    Posts
    13

    help for accent ^ AS encoding - some more

    - Thanks for your answer (@ fruitbeard ), but yes, it's not exactly what I' look for... : because all the other accentuated characters I' use, are well sent in the flash dynamic text field when we press, in my movie, the butttons " a..... , ... ; ... .., u.. ... ? ... ! etc...
    And the actionscript encoding for these is ok....
    Except... for that special one, the circumflex " ^ " (and the similar trema, if caps on " ") which need a very special attention !

    _ Note : Generally (in french writting), for puting that unusual special character above the five latin vowels (a,e,i,o,u),
    we need (as on a computer keyboard or on the old mechanic typewriters) :
    1 - first to press the " ^ " button (or key)
    2 - and juste after, press the character we need to put that accent in the same place and above it.
    For instance the " a " button, and so get the " " well written.
    (And this works rightly with my computer keyboard; its not a problem) _

    One example... a very small piece (its enough for show) of my flash movie game, see there (the "enter" button is for going next lign) :
    " flashGameAccentExtr.swf" // https://www.dropbox.com/s/x9doop758y...tExtr.swf?dl=0

    - And there, if I first press that " ^ " button
    and just after the " a " button, for getting the special " " I need in the dynamic field text....
    I' just get the normal following " ^ a" !
    (" ^ ++ a" in the string ?).
    And it's the normal way to put one char' after the other.

    BUT the actionscript I' look for is to SHUNT THAT NORMAL PROCESS
    (the "++" of a string ?) for having the "a" in the same type space as the " ^ ", and WITHOUT removing it.

    Something as a "back space" encoding which could sustain the previous character !

    Is it better explained as before ?

  4. #4
    Junior Member
    Join Date
    Mar 2016
    Posts
    13
    Quote Originally Posted by fruitbeard View Post
    HI,

    I.m not entirely sure what you mean.

    but if you embed your font, then look at the font properties and then in the also include these characters box, paste these chars into it

    ߀

    and more if you find them

    PHP Code:
    trace(escape("߀"));
    trace(unescape("߀")); 
    this may help too
    AS2 help for accent ^ - a little more
    (ouppsss my previous reply is gone i don't see where !)
    - Thanks for your answer, but yes, it's not exactly what I' look for... : because all the other accentuated characters I' use, are well sent in the flash dynamic text field when we press, in my movie, the butttons " a..... , ... ; ... " .., u.. ...? ... ! " etc...
    And the actionscript encoding for these is ok....
    Except... for that special one, the circumflex " ^ " (and the similar trema, if caps on " ") which need a very special attention !

    _ Note : Generally (in french writting), for puting that unusual special character above the five latin vowels (a,e,i,o,u),
    we need (as on a computer keyboard or on the old mechanic typewritters) :
    1 - first to press the " ^ " button (or key)
    2 - and juste after, press the character we need to put that accent in the same place and above it.
    For instance the " a " button, and so get the " " well written.
    (And this works rightly with my computer keyboard; its not a problem) _

    One example... a very small piece (its enough for show) of my flash movie game, see there (the "enter" button inside movie is for going next lign) :
    " flashGameAccentExtr.swf" _ https://www.dropbox.com/s/x9doop758y...tExtr.swf?dl=0

    - And there, if I first press that " ^ " button
    and just after the " a " button, for getting the special " " that I need in the dynamic field text....
    ...I' just get the normal following " ^ a" ! !
    (something as " ^ ++ a" in the string ?).
    And it's the normal way to put one char' after the other.

    BUT the actionscript I' look for is to SHUNT THAT NORMAL PROCESS
    (the "++" of a string ?) for having the "a" in the same typing space as the " ^ ", and WITHOUT removing it.

    Something as a "back space" encoding which could sustain the previous character !

    Is it better explained as before ?

  5. #5
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,785
    Hi,

    From using your file I did this (messa round with it), CS5, lowest I can go.

  6. #6
    Junior Member
    Join Date
    Mar 2016
    Posts
    13

    your file CS6/5 and my Flash... CS4... adobe grrr !

    Hi ! thanks, for your file, but.......... I stayed with flash CS4, and no more !!! So, i'go and try to found people with a CS5 version for converting your file in a CS4 one (or I go and dl the CS5 trial version from adobe site)
    Grrrr........ I started a long time ago with the nice near first Macromedia Flash (and Freehand - first dev. by "Aldus"), only Mac version(s), and it was delicious to work with and no pb to exchange from one soft to the other.

  7. #7
    Junior Member
    Join Date
    Mar 2016
    Posts
    13

    accent "^" and capslock problem if "new array"

    Hello,
    thanks twice for your "input" file... very good encoding, clean, light, clear, but, hum !.... I'm sorry, it's not exactly what I looked for.
    See there down, my own flash script file and comments inside the flash movie...
    - I know, it's a little bit crasy and very heavy script, not really a clean and soft one, but it works lonely as I aimed... Except, as seen before, if for example I put a "capslock" new function
    https://www.dropbox.com/s/vw7j2pwzrn...AccPb.fla?dl=0

    And I got the SAME PROBLEM, by working for testing, with your "INPUT" file, as soon as I used a new array (here a capslock function) with the two first others "new arrays" (normal letters AND accent letters).

    So I know now my problem comes from an impossibility to manage 3 "new array" together (or more I am not abble to manage them !!!)...

    At this time I go and test my encoding with a "classical" capslock button and not a clip button with "actionScript" inside, and more frames in the main stage...

    May be I'd come back...

    Thanks to all of you for your good work here

  8. #8
    Junior Member
    Join Date
    Oct 2014
    Posts
    2
    Quote Originally Posted by kniouk View Post
    AS2 help for accent ^ - a little more
    (ouppsss my previous reply is gone i don't see where !)
    - Thanks for your answer, but yes, it's not exactly what I' look for... : because all the other accentuated characters I' use, are well sent in the flash dynamic text field when we press, in my movie, the butttons " a..... , ... ; ... " .., u.. ...? ... ! " etc...
    And the actionscript encoding for these is ok....
    Except... for that special one, the circumflex " ^ " (and the similar trema, if caps on " ") which need a very special attention !

    _ Note : Generally (in french writting), for puting that unusual special character above the five latin vowels (a,e,i,o,u),
    we need (as on a computer keyboard or on the old mechanic typewritters) :
    1 - first to press the " ^ " button (or key)
    2 - and juste after, press the character we need to put that accent in the same place and above it.
    For instance the " a " button, and so get the " " well written.
    (And this works rightly with my computer keyboard; its not a problem) _

    One example... a very small piece (its enough for show) of my flash movie game, see there (the "enter" button inside movie is for going next lign) :
    " flashGameAccentExtr.swf" _ https://www.dropbox.com/s/x9doop758y...tExtr.swf?dl=0

    - And there, if I first press that " ^ " button
    and just after the " a " button, for getting the special " " that I need in the dynamic field text....
    ...I' just get the normal following " ^ a" ! !
    (something as " ^ ++ a" in the string ?).
    And it's the normal way to put one char' after the other.

    BUT the actionscript I' look for is to SHUNT THAT NORMAL PROCESS
    (the "++" of a string ?) for having the "a" in the same typing space as the " ^ ", and WITHOUT removing it.

    Something as a "back space" encoding which could sustain the previous character !

    Is it better explained as before ?


    To be honest, I got a U in French but I think I get the idea. It's a bit down and dirty but is this what you are after?
    I did try a nice elegant solution at first getting and setting chr codes but was burning too much time. Hope this helps.

    System.useCodepage = true;

    mapChars = new Array();
    mapChars.push(new Array("^a", ""));
    mapChars.push(new Array("^e", ""));
    mapChars.push(new Array("^i", ""));
    mapChars.push(new Array("^o", ""));
    mapChars.push(new Array("^u", ""));

    txt_input.onChanged = fn_formatInput;

    function fn_formatInput() {
    for (var x = 0; x<mapChars.length; x++) {
    this.text = this.text.split(mapChars[x][0]).join(mapChars[x][1]).split(mapChars[x][0].toUpperCase()).join(mapChars[x][1].toUpperCase());
    }
    }

  9. #9
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,785
    Hi,

    This should help you go further then.
    I'm sure you can get what you need from the file, CS5.
    PHP Code:
    var useAccent:Boolean false;
    var 
    useLower:Boolean true;
    var 
    enterField:String "";

    var 
    keyboard1:Array = new Array("a""b""c""d""e");
    var 
    keyboard2:Array = new Array("A""B""C""D""E");

    var 
    lowerAccent:Array = new Array("""b""c""d""");
    var 
    upperAccent:Array = new Array("""B""C""D""");

    accent.onPress = function():Void 
    {
        if (
    useAccent)
        {
            
    this.gotoAndStop(1);
        }
        else
        {
            
    this.gotoAndStop(2);
        }
        
    useAccent = !useAccent;
        
    trace("use ^ = " useAccent);
    };

    caseChange.onPress = function():Void 
    {
        if (
    useLower)
        {
            
    this.gotoAndStop(2);
        }
        else
        {
            
    this.gotoAndStop(1);
        }
        
    useLower = !useLower;
        
        
    setKeys();
    };

    function 
    setKeys():Void
    {
        for (var 
    v:Number 0keyboard1.lengthv++)
        {
            if (
    useLower)
            {
                
    this[keyboard1[v]].keyLabel keyboard1[v];
                
    this[keyboard1[v]].normal keyboard1[v];
                
    this[keyboard1[v]].accent lowerAccent[v];

                
    this[keyboard1[v]].onPress = function():Void 
                
    {
                    if (
    useAccent)
                    {
                        
    doInput(this.accent);
                    }
                    else
                    {
                        
    doInput(this.normal);
                    }
                };
            }
            else
            {
                
    this[keyboard1[v]].keyLabel keyboard2[v];
                
    this[keyboard1[v]].normal keyboard2[v];
                
    this[keyboard1[v]].accent upperAccent[v];

                
    this[keyboard1[v]].onPress = function():Void 
                
    {
                    if (
    useAccent)
                    {
                        
    doInput(this.accent);
                    }
                    else
                    {
                        
    doInput(this.normal);
                    }
                };
            }
        }
    }

    function 
    doInput(arg):Void
    {
        
    trace(arg);
        
    enterField enterField arg;
    }

    setKeys(); 
    I'm also sure there is a more tactile way of doing it too, mess around.

  10. #10
    Junior Member
    Join Date
    Mar 2016
    Posts
    13

    french accent circumflex encoding buttons

    Quote Originally Posted by henzy View Post
    To be honest, I got a U in French but I think I get the idea. It's a bit down and dirty but is this what you are after?
    I did try a nice elegant solution at first getting and setting chr codes but was burning too much time. Hope this helps.
    hi henzy !
    thanks a lot for u'r script...
    ...and,
    after trying some lot of work with,
    I' have to see... that I'm not able... yes !!!
    (don't laugh please, I'm just a painter very interested with encoding and not a developper :-))
    ... not able to mix with my own encoding !
    So now, have a look - if you'd'be interested, and just for having a laughing look (!) on my script which is very heavy and a little bit crasy,
    ...but which works !
    See there :
    https://www.dropbox.com/s/6mncz6ggrc...eysOk.fla?dl=0
    I'm sur your script could help me for shorting mine and making it better, but I don't know how to manage it !!!
    Thanks for u'r help (and don't burn time for, cause I' have solved it now, but on a little bit crasy way...)

  11. #11
    Junior Member
    Join Date
    Mar 2016
    Posts
    13

    accent ^... ok

    Quote Originally Posted by fruitbeard View Post
    Hi,

    This should help you go further then.
    I'm sure you can get what you need from the file, CS5.
    PHP Code:
    var useAccent:Boolean false;
    var 
    useLower:Boolean true;
    var 
    enterField:String "";

    var 
    keyboard1:Array = new Array("a""b""c""d""e");
    var 
    keyboard2:Array = new Array("A""B""C""D""E");

    var 
    lowerAccent:Array = new Array("""b""c""d""");
    var 
    upperAccent:Array = new Array("""B""C""D""");

    accent.onPress = function():Void 
    {
        if (
    useAccent)
        {
            
    this.gotoAndStop(1);
        }
        else
        {
            
    this.gotoAndStop(2);
        }
        
    useAccent = !useAccent;
        
    trace("use ^ = " useAccent);
    };

    caseChange.onPress = function():Void 
    {
        if (
    useLower)
        {
            
    this.gotoAndStop(2);
        }
        else
        {
            
    this.gotoAndStop(1);
        }
        
    useLower = !useLower;
        
        
    setKeys();
    };

    function 
    setKeys():Void
    {
        for (var 
    v:Number 0keyboard1.lengthv++)
        {
            if (
    useLower)
            {
                
    this[keyboard1[v]].keyLabel keyboard1[v];
                
    this[keyboard1[v]].normal keyboard1[v];
                
    this[keyboard1[v]].accent lowerAccent[v];

                
    this[keyboard1[v]].onPress = function():Void 
                
    {
                    if (
    useAccent)
                    {
                        
    doInput(this.accent);
                    }
                    else
                    {
                        
    doInput(this.normal);
                    }
                };
            }
            else
            {
                
    this[keyboard1[v]].keyLabel keyboard2[v];
                
    this[keyboard1[v]].normal keyboard2[v];
                
    this[keyboard1[v]].accent upperAccent[v];

                
    this[keyboard1[v]].onPress = function():Void 
                
    {
                    if (
    useAccent)
                    {
                        
    doInput(this.accent);
                    }
                    else
                    {
                        
    doInput(this.normal);
                    }
                };
            }
        }
    }

    function 
    doInput(arg):Void
    {
        
    trace(arg);
        
    enterField enterField arg;
    }

    setKeys(); 
    I'm also sure there is a more tactile way of doing it too, mess around.
    Hi fruitbeard,
    thanks a lot once more for your script (a good lesson for me), but... but, but it's not quite exactly what I aim (yes I know i'm a little sh... !). It's not so far, and you're right; so I try to modify for being as near as possible of my goal. But not exactly with success.
    Cause your very good "loops" encoding are difficult to modify (i'm just a painter...)
    See there if have time (cs5): https://www.dropbox.com/s/n4bcm0enns...s5Mod.fla?dl=0

    I also solved since, on my old way ( with classical button and... 3 frames on the stage, and an invisible keyboard !...).
    See also there (swf): https://www.dropbox.com/s/pkvn6fhe91...3fram.swf?dl=0

    (the first frame and just in open I use, is for avoiding to loose the content of the text file when I go back from Upper Case to Lowercase)
    Its exactly what I need for mixing with the big parts in the follow-up of my work.
    Other way, they don't work right.
    Thanks for all and to all there.

    P.s : I've seen during my tests with cs5 trial that it could be useful to "embed fonts" with these 3 accents more :
    .... , ^,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center