Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: No Subject
From: Peter Brouwers
Date: Thu, 17 Feb 2000 12:20:14 GMT

Hi all,

just a small contribution to the Flash community.
A script which will convert a given number [stored in /:input] into a BaseX
number. Output is /:endstr. So convert a number to base 2: binary, octal or
hex.

It also features the simulated MOD function.

Regards,

Peter

========================================
Comment: put in Button action
Comment: base can only be between 2 and 36
On (Release)
Set Variable: "/:base" = 16
Call ("cnvAnyBase")
End On
========================================
Comment: Function layer:
Comment: name := cnvAnyBase
Comment: paste as Frame Action

Set Variable: "/:endstr" = ""
Set Variable: "hold" = /:Input
Set Variable: "NumGuide" = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Set Variable: "Num1" = ""
Loop While (Num1 ne "0")
Set Variable: "Num1" = Int(hold / (/:base))
Set Variable: "MOD" = hold - (Num1 * base)
Set Variable: "/:endstr" = SubString(NumGuide, MOD + 1, 1) & /:endstr
Set Variable: "hold" = Num1
End Loop


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]