AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Flash > Delphi

Ein Thema von endeffects · begonnen am 4. Jun 2007 · letzter Beitrag vom 4. Jun 2007
Antwort Antwort
endeffects

Registriert seit: 27. Jun 2004
450 Beiträge
 
#1

Flash > Delphi

  Alt 4. Jun 2007, 21:23
Hallo,

kann mir vielleicht jemand sagen wie
man folgende flash (action script) methode
in delphi umsetzt?

Delphi-Quellcode:
function decode(key)
{
    var _lc3 = key;
    var _lc1;
    var _lc2 = "";
    for (var _lc1 = _lc3.length - 1; _lc1 >= 0; --_lc1)
    {
        _lc2 = _lc2 + chr(155 - _lc3.charCodeAt(_lc1));
    }
 
    return (_lc2);
}
  Mit Zitat antworten Zitat
Ghostwalker

Registriert seit: 16. Jun 2003
Ort: Schönwald
1.299 Beiträge
 
Delphi 10.3 Rio
 
#2

Re: Flash > Delphi

  Alt 4. Jun 2007, 21:28
Delphi-Quellcode:
  Function Decode(Key:string);
  var
    LC1 : integer;
    
  begin
    result := '';
    for lc1 = length(key) downto 1 do
      result := result+chr(155-ord(key[i]));
  end;
Bitte schön. (ist aber ungetestet aus dem stehgreif gecoded).
Uwe
e=mc² or energy = milk * coffee²
  Mit Zitat antworten Zitat
endeffects

Registriert seit: 27. Jun 2004
450 Beiträge
 
#3

Re: Flash > Delphi

  Alt 4. Jun 2007, 22:03
oh vielen dank, ich hab hier noch eine andere funktion
die ich übersetzen muß, könntest du mir dabei bitte auch noch helfen?


Delphi-Quellcode:
    function decrypt(originalString)
    {
        var _lc2 = "";
        var _lc1;
        var _lc4;
        for (var _lc1 = originalString.length; _lc1 > 0; --_lc1)
        {
            _lc4 = int(_lc1 / 2);
            if (_lc1 % 2 == 0)
            {
                _lc2 = _lc2 + originalString.charAt(_lc1 - 1);
                continue;
            }
 // end if
            _lc2 = originalString.charAt(_lc1 - 1) + _lc2;
        } // end of for
        if (_lc2.charAt(_lc2.length - 1) == "\t")
        {
            _lc2 = _lc2.substring(0, _lc2.length - 1);
        }
 // end if
        return (_lc2);
    } // End of the function
hier nochmal die andere kompilierbare funktion

Delphi-Quellcode:
Function Decode(Key:string): String;
  var
    LC1 : integer; s: string;
  begin
    for lc1:= length(key) downto 1 do
      s := s+chr(155-ord(key[lc1]));
    result:= (s);
  end;
  Mit Zitat antworten Zitat
Ghostwalker

Registriert seit: 16. Jun 2003
Ort: Schönwald
1.299 Beiträge
 
Delphi 10.3 Rio
 
#4

Re: Flash > Delphi

  Alt 4. Jun 2007, 22:19
ok...

Funktion Nr. 2

Delphi-Quellcode:
function decrypt(OrgStr:string):string;
var
  lc1 : integer;
begin
  result := '';
  for lc1 := length(Orgstr) downto 0 do
  begin
    if ((lc1 mod 2) = 0) then
       result := result+Orgstr[lc1-1];
    result := result+orgstr[lc1-1];
  end;
  if (copy(result,length(result)-2,2)='\t') then
    result := copy(result,1,length(result)-2);
end;
Uwe
e=mc² or energy = milk * coffee²
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:51 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz