Hikari (v0.3)
- DanielSefton
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
- Contact:
ExternalInterface has had many reports of being buggy in AS2. But I'll try what you suggested, because AS3 does my head in.
I'm not sure if it would work in Hikari, but it is possible to communicate between C++ and < Flash 8. Not as trivial, but it's possible with setvar().
It would be useful to cater for backwards compatibility, because then you can target a wider set of users. I can't imagine many C++ developers will have the latest copy of Flash.
This might be of interest:
http://www.macromedia.com/devnet/mx/...s/flash_vb.pdf
Either way it depends how much hassle it is. Doesn't affect me personally, but I'm just speaking for anyone with an older version of Flash that might want to use Hikari.
I'm not sure if it would work in Hikari, but it is possible to communicate between C++ and < Flash 8. Not as trivial, but it's possible with setvar().
It would be useful to cater for backwards compatibility, because then you can target a wider set of users. I can't imagine many C++ developers will have the latest copy of Flash.
This might be of interest:
http://www.macromedia.com/devnet/mx/...s/flash_vb.pdf
Either way it depends how much hassle it is. Doesn't affect me personally, but I'm just speaking for anyone with an older version of Flash that might want to use Hikari.
- ajs15822
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
- Contact:
Well, I intend to implement setting the values of ActionScript variables at runtime and, to ensure more compatibility with older versions, I could also implement support for FSCommand as an alternative to ExternalInterface.call (although, of course, FSCommand would only allow users to pass a single argument at max).
- DanielSefton
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
- Contact:
There's quite a few around the web, but your never going to find a complete IDE.Sweenie wrote:Anyone know of any good flash editor(with AS support)?
Found FlashDevelop but I was more thinking about some kind of visual designer.
Adobe CS3 is way too expensive for me.
You could try a few apps at:
http://www.osflash.org/open_source_flash_projects
If you want the best alternitave to Flash, try SwishMax. It's actually pretty good, and much cheaper at $150:
http://www.swishzone.com/
Otherwise, just download the trial of Flash, and complete your GUI within 30 days.
- Nauk
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
- Contact:
wow another successful AJ-coup, totally cool
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
- AshMcConnell
- Silver Sponsor
- Posts: 605
- Joined: Fri Dec 14, 2007 11:44 am
- Location: Northern Ireland
- x 16
- Contact:
That's pretty interesting. Can you use actionscript (written externally in flashdevelop for example) with SwishMax? If not, is there any "front end" to create flash UIs that do use actionscipt 3? I quite like it as a language, seems to work nicely.If you want the best alternitave to Flash, try SwishMax. It's actually pretty good, and much cheaper at $150:
http://www.swishzone.com/
I will read a bit more about it, but thought you might know
All the best,
Ash
Last edited by AshMcConnell on Thu Jun 12, 2008 12:00 pm, edited 1 time in total.
- DanielSefton
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
- Contact:
Unfortunately SwishMax doesn't support AS3. It usually takes a couple of years after the release of a language to have it ported into third party products. But SwishMax is a full IDE - it's got everything you need, if not more than what Flash itself offers. Whether or not it will work perfectly with Hikari is another question. Download the trial to see what it's like.AshMcConnell wrote:That's pretty interesting. Can you use actionscript (written externally in flashdevelop for example) with SwishMax? If not, is there any "front end" to create flash UIs that do use actionscipt 3? I quite like it as a language, seems to work nicely.
-
- Greenskin
- Posts: 102
- Joined: Tue May 10, 2005 11:42 pm
- Location: SF, California
- Contact:
We used Hikari to create a Mini Map. It worked out pretty well I think. Check it out here:
http://nimblebit.blogspot.com/2008/06/m ... yment.html
http://nimblebit.blogspot.com/2008/06/m ... yment.html
- ajs15822
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
- Contact:
Yeah, I can confirm the issue-- I'll see what I can do about getting IME to work in a windowless OLE context.liyu wrote:wow, this is really cool, thanks for the share! however, it seems the text will be wrong when input text use ime(input method for some language, chinese eg). Does anybody occured this?
Wooo, that is definitely kick-ass! It's even more amazing how quick yall rolled that out; thanks for being such eager guinea pi--er, alpha testers!Murphy wrote:We used Hikari to create a Mini Map. It worked out pretty well I think. Check it out here:
http://nimblebit.blogspot.com/2008/06/m ... yment.html
- Brocan
- Orc
- Posts: 441
- Joined: Tue Aug 01, 2006 1:43 am
- Location: Spain!!
- x 8
Great !Murphy wrote:We used Hikari to create a Mini Map. It worked out pretty well I think. Check it out here:
http://nimblebit.blogspot.com/2008/06/m ... yment.html
- Zeal
- Ogre Magi
- Posts: 1260
- Joined: Mon Aug 07, 2006 6:16 am
- Location: Colorado Springs, CO USA
- DanielSefton
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
- Contact:
Nah, but you can turn the alignment grid on: "View -> Grid -> Show Grid". It's easy to neatly organize your movieclips, because it also has a 'magnet' feature which snaps to the position of surrounding movieclips e.g. if you want to line them up. The only annoying thing is that the pixels go into decimals, and me being a perfectionist, I can't stand it when it jumps to 100.9 or 17.3.Zeal wrote:*for example, does anyone know if its possible to add padding to your movieclips/buttons? So you can make nice evenly spaced guis, ect... (using flash cs3)
There's plenty of them. Although, if you have a problem, just search Google, because Flash has such a huge userbase, that almost every single problem is guaranteed to have already been asked.Anyone know of any good flash support forums? I need somewhere to ask my noob questions (I have lots of those).
flashkit.com, kirupa.com and actionscript.org are the major ones.
Or just ask here, and I'll try to help - that's if ajs doesn't mind.
-
- Ogre Magi
- Posts: 1266
- Joined: Tue Aug 12, 2003 1:53 am
- Location: Melbourne, Australia
- x 1
- Contact:
http://proto.layer51.com/ for all your scripting needs. Avoid any AS1 stuff though
- DanielSefton
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
- Contact:
I've just about finished the prototype of my GUI. Took me quite a few days, but also because I prefer to code everything manually in AS, including the animations. It's far more efficient that way. Goodness though, if I had used CEGUI, it would have taken me years to achieve the same result.
Again, it's just a prototype. It's nowhere near finished.
http://www.openracer.org/images/gui1.jpg
http://www.openracer.org/images/gui2.jpg
Cheers ajs for such an excellent library. Who needs Scaleform?
Again, it's just a prototype. It's nowhere near finished.
http://www.openracer.org/images/gui1.jpg
http://www.openracer.org/images/gui2.jpg
Cheers ajs for such an excellent library. Who needs Scaleform?
-
- Gnome
- Posts: 334
- Joined: Wed Aug 02, 2006 9:27 am
- Location: Toronto, Canada
It integrates well with my sample framework except for one minor thing:
crashes in OGRE's UTFString _cleanBuffer() call which means the string is being deallocated (weird). I changed it to dynamic allocation, which is horrible and hacky, but it stops throwing an exception:
I suspect this is to due how callFunction() is implemented.
Framework/code is available:
http://www.casuallyhardcore.com/free/Si ... Hikari.zip
Code: Select all
const RenderTarget::FrameStats& stats = renderWin->getStatistics();
fps->callFunction("setFPS", Args((int)stats.lastFPS));
Code: Select all
Ogre::DisplayString* f = new Ogre::DisplayString("setFPS");
fps->callFunction(*f, Args((int)stats.lastFPS));
Framework/code is available:
http://www.casuallyhardcore.com/free/Si ... Hikari.zip
- Zeal
- Ogre Magi
- Posts: 1260
- Joined: Mon Aug 07, 2006 6:16 am
- Location: Colorado Springs, CO USA
Yeah I am using the magnet feature to ALLIGN all my movieclips (using mostly the built in as3.0 windows gui components). The problem is, everything is so bunched together, I want to add some padding between everything (like 3-4pix).it also has a 'magnet' feature which snaps to the position of surrounding movieclips
I suppose I could write a script that goes through all the movieclips and adjusts their position, but I was hoping there was some built in 'padding' feature.
- DanielSefton
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
- Contact:
That's what the grid is for. But if all else fails, you can easily do the basic maths to space them out ([x/y]+[movieclip width/height]+[spacing]). You don't need to write a script. That's why I always have a calculator handy, it's quicker to enter the position manually.Zeal wrote:I suppose I could write a script that goes through all the movieclips and adjusts their position, but I was hoping there was some built in 'padding' feature.
- ajs15822
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
- Contact:
I really like the simplicity of the composition, great prototype!DanielSefton wrote:I've just about finished the prototype of my GUI. Took me quite a few days, but also because I prefer to code everything manually in AS, including the animations. It's far more efficient that way. Goodness though, if I had used CEGUI, it would have taken me years to achieve the same result.
Again, it's just a prototype. It's nowhere near finished.
http://www.openracer.org/images/gui1.jpg
http://www.openracer.org/images/gui2.jpg
Cheers ajs for such an excellent library. Who needs Scaleform?
You're welcome~.
My, how weird-- I was able to reproduce the bug using your exact frameworking code but the HikariDemo shows no symptoms of this.voxel wrote:It integrates well with my sample framework except for one minor thing:
crashes in OGRE's UTFString _cleanBuffer() call which means the string is being deallocated (weird). I changed it to dynamic allocation, which is horrible and hacky, but it stops throwing an exception:Code: Select all
const RenderTarget::FrameStats& stats = renderWin->getStatistics(); fps->callFunction("setFPS", Args((int)stats.lastFPS));
I suspect this is to due how callFunction() is implemented.Code: Select all
Ogre::DisplayString* f = new Ogre::DisplayString("setFPS"); fps->callFunction(*f, Args((int)stats.lastFPS));
Framework/code is available:
http://www.casuallyhardcore.com/free/Si ... Hikari.zip
I think what's happening with Ogre::DisplayString is that when I make the conversion to a std::wstring, it messes with the state of its internal buffers, a quick look at the Ogre source code finds this:
Code: Select all
// Ogre::DisplayString::_getBufferWStr, found at line 2220 of ogreutfstring.h
void _getBufferWStr() const {
if ( m_bufferType != bt_wstring ) {
_cleanBuffer();
m_buffer.mWStrBuffer = new std::wstring();
m_bufferType = bt_wstring;
}
m_buffer.mWStrBuffer->clear();
}
As theorized, changing the first parameter of FlashControl::callFunction to "Ogre::DisplayString" instead of "const Ogre::DisplayString&" eradicated the issue. I'll integrate this short-term fix in the next iteration but I'd really like to ultimately get this issue confirmed/fixed in the Ogre source.
- ajs15822
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
- Contact:
Revision 9 is in the SVN trunk, here's the summary of recent changes:
The only change that I think needs more clarification is the FlashValue value-type interpretation. Here's the story: I was debating with myself whether or not to add the ability to do runtime-type-checking (to ensure that a certain parameter is of a certain type) but decided not to implement this just yet due to implementation and usage concerns. As a compromise, I instead implemented flexible type-conversion in the FlashValue::getWhatever member functions so that users could work with the value regardless of its internal representation.API Changes:
- In FlashControl:
-- FlashControl::getName has been added
-- FlashControl::getExtents has been added
-- FlashControl::setDraggable has been added
Core Changes:
- FlashValue now supports value-type interpretation
- Removed dependency upon shlwapi.
Bugfixes:
- FlashControl overlays weren't being sorted correctly by z-order during focus, this has been fixed.
- Patched up a memory leak in FlashControl, thanks to Adis.
- Applied a potential workaround for heap corruption due to Ogre::DisplayString in FlashControl::callFunction.
- ibito
- Gnoblar
- Posts: 5
- Joined: Mon Oct 03, 2005 8:08 am
Hi, I'm new to Ogre and Ogre forums too, just for curiosity, I was wondering if this flash thing (hikari) can be added for example, to a face of a cube (or any other entity) or it's just for GUI purpouses... I don't know if this was asked before (haven't read all the pages of the post).
I think it's a good idea
Sorry about my english
I think it's a good idea
Sorry about my english
- DanielSefton
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
- Contact:
Thanks for the update.
Yay!FlashControl::setDraggable has been added
I believe it can be added to 3D objects, yes. You can use render to texture to apply it to the face of a cube. I'm sure ajs can explain further if you need more info.I was wondering if this flash thing (hikari) can be added for example, to a face of a cube (or any other entity) or it's just for GUI purpouses...
- ajs15822
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
- Contact:
Sure, you can create a "FlashControl" in Hikari two ways:ibito wrote:Hi, I'm new to Ogre and Ogre forums too, just for curiosity, I was wondering if this flash thing (hikari) can be added for example, to a face of a cube (or any other entity) or it's just for GUI purpouses... I don't know if this was asked before (haven't read all the pages of the post).
I think it's a good idea
Sorry about my english
- As a viewport overlay (a movable rectangle aligned to the screen)
- As an Ogre Material (that you can apply to any mesh or entity)
Here's an example using HikariManager::createFlashMaterial (see Hikari.h for the API):
Code: Select all
FlashControl* myControl = hikariMgr->createFlashMaterial("myControl", 420, 375);
myControl->load("myMovie.swf");
myEntity->setMaterialName(myControl->getMaterialName());