Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to do an interactive Morse code Animation

New Here ,
Jan 04, 2021 Jan 04, 2021

Hi everybody, thanks for viewing my message.

i wanna make an interactive morse code animation like  in the Strangers things scene. 

I am new on Animate. 

The principle is to press buttons in Morse code so that the bulbs associated with the letters light up.
I planned 3 buttons: one for the "dot" (short presses), one for the "dash=(long presses), and a last to stop the shine. For example, I would like to be able to press the "dt" button and then the "dash button so that the letter A lights up. Only I do not manage to chain actions. I am familiar with some scripting.

so i need the scripting for  one character so that i will copy that for every character.

please help me on this

Thanks for reading this loooooong message.

hoping for some scripting.

TOPICS
ActionScript , Code , How to , Performance
938
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 05, 2021 Jan 05, 2021
LATEST

you need to use a timer (eg, Ticker in canvas/html) to do this properly so you can indicate separate letters and words.

 

then i'd use an object to define the library of dit's and dah's that define each letter/number.  eg, 

 

var obj = new Object();

obj["dit,dah"] = "A";

obj["dah,dah,dah,dit"] = "B";

etc

 

then assemble the array (eg, codeA) of dit/dah entered by the user for each letter and use the object to convert dit/dah to a letter.  finally assemble the letters into an array (letterA) to form words.

 

letterA.push(obj[codeA.join()]);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines