Jump to content

[SOLVED] Widget Flash and some questions


photo

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

Fonta, what is wrong exactly? Cause I do not see any problems.

 

post-13-0-36322100-1344527730_thumb.jpg post-13-0-26852200-1344527735_thumb.jpg

Posted

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

  • 2 weeks later...
Posted

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

 

So, be up to date ;)

  • 4 weeks later...
Posted

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 !

Posted

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.

Posted

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.

Posted

 

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 ;)

  • 2 weeks later...
Posted

Romain, I'm afraid at the current moment there are no plans to support AA for shapes.

Posted

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

Posted

Really nice ! Will check it !

 

Thank you !

×
×
  • Create New...