wonderfl - build flash online

SOLVED: How To File Reference with Starling?

Click the gradient.

If you have the FP debugger, after clicking the gradient you will see the error that Window Prompts such as "browse for file" should be triggered inside MOUSE click handler function (or mouse down).

But since this is Starling, I use TOUCH.END, so the error happens. Do I really need to create a button (that is outside Starling) for this?

SOLUTION:
Use Starling.current.nativeStage to listen for the click event to open the file select window.
(This doesn't do anything after you select a file, just wanted to know how to do it).

bioRex21 bioRex21

    • forked:0
    • favorite:0
    • lines:88
    • license : MIT License
    • modified : 2015-09-09 08:51:13

add to favorites

Embed

Code Fullscreen

Talk

Starling.current.nativeStage.addEventListener('click', function( e:* ):void { 
       /// ON STAGE CLICK 
});

  • by WLAD
  • at 2015/09/03 14:18:19

Thank you so much! :)

Tags

sectKeywords

ページの先頭へ戻る