[SOLVED] Widget Flash and some questions


photo

Recommended Posts

Hello everyone !

 

I have a Flash widget that holds the attached animation in my world.

 

I could see it and what it contains but events over flash buttons don't do anything (on the three on the bottom).

 

I don't have any errors or warnings in the console.

 

You could launch the swf file alone to see its correct behavior and then embed it into Unigine using this code :

 

Gui gui = engine.getGui() ;
WidgetFlash widgetFlash = new WidgetFlash(gui, "MenuTests.swf") ;
widgetFlash.setHeight(gui.getHeight()) ;
widgetFlash.setWidth(gui.getWidth()) ;
gui.addChild(widgetFlash) ;

 

 

Am I doing anything wrong ?

 

Thanks for your time !

MenuTests.rar

Link to post

Did you check samples/widgets/flash_01 sample? There mouse hovering over and button press events are detected.

 

If it does not help, please provide a test world and *.fla file.

Link to post

Of course, but did you opened the joined Flash file ?

 

If you open it with Adobe Flash player, the mouse over on the 3 bottom buttons will do an effect, but not with Unigine and there are not any errors in the log file.

 

I'm not talking about how to call Unigine script from Flash (or the inverse) but about the Flash behavior itself, which is wrong with Unigine.

 

I've joined the FLA file to this post.

 

Test world if just loading the SWF file in the init method with the code above.

 

Thank you !

MenuTests.rar

Link to post

Hello !

 

Strange ! That don't work in Unigine in my case (the buttons don't move up on mouse over).

 

Seems that something is not up-to-date on my side :/

 

Really sorry for loosing your time :s

Link to post
  • 2 weeks later...

Everything works as expected in the last SDK (2012-07-17) but not in the previous one.

 

So, be up to date ;)

Link to post
  • 4 weeks later...

Hi !

 

I have another question : is it possible to turn on anti-aliasing for flash animations ?

 

When using native flash player, I have a smooth rendering.

With Unigine one, I have a not so good quality.

 

You could see it in the attached picture (look around shapes) : http://desmond.imageshack.us/Himg6/scaled.php?server=6&filename=screenkp.png&res=landing

 

Thank you if you have some tips ;)

Link to post

Also, could you please give some informations about this log :

WidgetFlash::isFunction(): can't get engine object

 

The Flash file is correctly working the first frame and then, calling an action script method give this error and I can't understand why.

 

Which are the conditions to obtain this log message in the widget flash implementation ? I might help me to understand ;)

 

Thank you !

Link to post

I have another question : is it possible to turn on anti-aliasing for flash animations ?

 

When using native flash player, I have a smooth rendering.

With Unigine one, I have a not so good quality.

 

Right now we don't support flash anti-aliasing.

Fonts aliasing can be solved by using truetype fonts. You should place a corresponded *.ttf file into the engine data folder.

Link to post

Also, could you please give some informations about this log :

WidgetFlash::isFunction(): can't get engine object

Do you call a WidgetFlash::setFrame() function before that?

A simple reproduction sample can solve almost any problem.

Link to post

 

Right now we don't support flash anti-aliasing.

Fonts aliasing can be solved by using truetype fonts. You should place a corresponded *.ttf file into the engine data folder.

 

I understand for fonts, but Shapes built inside Flash are also aliased.

 

Do you plan to add AA support in the future ?

 

Do you call a WidgetFlash::setFrame() function before that?

A simple reproduction sample can solve almost any problem.

 

I don't call setFrame function before.

 

I would like to give you a sample but I can't right now, I will look that.

 

 

Thanks for your quick replies ;)

Link to post
  • 2 weeks later...

Flash anti-aliasing will be available in the next SDK with enabled video_renderable console variable and activated video anti-aliasing.

Link to post