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

JSFL Button getting stuck in pressed state

Explorer ,
Feb 24, 2025 Feb 24, 2025

Hi there, I'm building some extensions for Animate via ActionScript calling JSFL functions. I've built quite a few features now, but for the first time encountering a strange issue - when a button is pressed to run a particular JSFL function, it's remaining pressed even after the code has finished executing.

 

I'm afraid I can't share the code, but just so it's clear you can see the buttons. I'm assuming, for whatever reason, Actionscript is under the impression that the code is still executing? If anyone has come across this before would love to know how you resolved it!

 

Thanks for any help!

570
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 ,
Feb 24, 2025 Feb 24, 2025

are you using a button component?

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
Explorer ,
Feb 24, 2025 Feb 24, 2025

Yes thats right. I should add that I can press the button again (and the code is re run)

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 ,
Feb 24, 2025 Feb 24, 2025

can you dispatch a button up event from your jsfl?

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
Explorer ,
Feb 24, 2025 Feb 24, 2025

I can't do that via JSFL, but I could do it through ActionScript, but AS don't know when the JSFL function is finished.

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 ,
Feb 24, 2025 Feb 24, 2025

then, do you have to use a component?

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
Explorer ,
Feb 24, 2025 Feb 24, 2025

What's the alternative?

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 ,
Feb 24, 2025 Feb 24, 2025

a button and a movieclip 

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
Explorer ,
Feb 24, 2025 Feb 24, 2025
LATEST

Cheers, will give that a try.

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 ,
Feb 24, 2025 Feb 24, 2025

Hi.

 

When are you firing the JSFL call? On click, mouse up, mouse down...?

If you're using mouse down, maybe you should consider using click or mouse up, to make sure AS3 will be able to update the UI as expected.

 

Regards,

JC

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