Html code for in game buttons

I wanted to build a booster that adds butttons to the game(f.e. for running other scripts), but the buttons are made with flash. Is there a way to build clones of themon top of the flash app with html?

1 Like

Yup, that’s completely doable! You’ll just want to append an element (your button), and set its CSS position property to absolute or fixed - that means that it will be positioned manually (i.e. with left/right/top/bottom), irrelevant of the other elements on the page (basically).

It has certainly been done, but it may not be quite as easy as LFP6 suggests. I don’t know what is true with today’s flash/browser combinations, but historically flash has not been compliant with any standards, and will blast its bits where it wants to.  If you do a routine web search, you’ll find all sorts of advice, but my impression is that things that work one year might not work the next.

But I think it is a great goal, and you would be doing the community a big service if you identified a robust way to do it with the game UI.

Ah, didn’t realize this was an issue. Just did a little Googling, and found a possible workaround: https://www.google.com/search?q=html+over+flash&rlz=1C1ASAC_enUS516US516&oq=html+over+flas&a…

Basically, you need to add a wmode param to the applet. Haven’t tried it myself though.

Yes, I also did some searching before I responded, to see if there seemed to be a clear answer.  I saw separate suggestions for both wmode=transparent and wmode=opaque, and both had responses that said it fixed things for the responder. But there were also completely different solutions that worked for other people.  So I think MasterStormer (or anyone else) needs to approach the question of what will work for us as a mystery to be solved by experiment.

Isnt there a way (from the dev side of things) to make a fubction that creates a button for x,y, image, and onclick parameters? From my knowlage of engines it doesnt sound more complicated than adding the boosters themeselves, but I never worked with flash, so I dont really know…

If you don’t require the extension to be on-top of the Flash player you can relatively easily add HTML buttons below the pane. It means scrolling up and down some. I have written some boosters that do this. Perhaps this will do for now? http://www.eternagame.org/web/script/7330231/ is one example.

Keep in mind that you can prevent the scrolling issue by changing the height of the applet (i.e. Via CSS). The applet should automatically adjust iirc.

That should be technically feasible. There would need to just be an additional API function on the applet, which would generate the button, and Flash has the ability to call JS, so the “on click” would be handled that way.