How to load directly obb in cocos2dx v 2.1.4 - cocos2d-x

I'm working on Cocos2dx project and facing with a problem!
In cocos2dx, i can change data in assets folder to another path and my app can load texture and sound successfully.
This is my code in CCFileUtilsAndroid.cpp. It's work ok
bool CCFileUtilsAndroid::init()
{
m_strDefaultResRootPath = "/mnt/sdcard/Testing/";
return CCFileUtils::init();
}
But I want to read directly obb file without unzip it. I had to set this line into Cocos2dxHelper.java at init function.
Cocos2dxHelper.nativeSetApkPath(Environment.getExternalStorageDirectory()+"/Android/obb/com.example.test/Testing.obb");
But it's fail to load anything in obb file.
I read some solution in stackoverflow same as:
Android OBB/ZIP loading (cocos2dx)
But i can't find solution for me.
Please help me for this issue! Hope your reply!
Thanks you very much

Related

Opening external exe file via fscommand

I have problem opening external exe file by clicking a button in Flash projector. I have seen that the external file must be under the folder fscommand. And this is the code;
private function Fnc(e:MouseEvent):void
{
fscommand("exec", ".\\fscommand\\externalfile.exe");
trace("***button pressed***");
}
However I found that answer and now I am not sure I can open a flash exe by another flash exe.
Addition:
I can succesfully open other exes like Windows Media Player. So the answer might be the case but I don't know.
I don't know why a flash projector can not open another one !! Of course it can, it's just an exe like any other exe file !
You have just a little mistake in the path of the opened exe, so you should write :
private function Fnc(e:MouseEvent):void
{
// flash knows that the exe is in the fscommand dir
fscommand("exec", "externalfile.exe");
trace("***button pressed***");
}
Take a look on this very simple example :
Hope that can help.

cocos2d-x Get data from file (xxx.ccbi) failed

Anyone has the same trouble?It happpens when i want to load the ccbi file into the cocos2d-x project.I have debuged it .The resources path is correct.Maybe it's the version problem of cocosbuilde...Any help appreciated.
i just code as below ,here is the code link:
http://www.plungeinteractive.com/blog/2012/12/26/cocosbuilder-and-cocos2d-x-helloworld-example/
May be it's because of version incompatibility between CocosBuilder and CCBReader as you said. If it is check your log for confirmation.
In XCode if we do folder references for new files sometimes it doesn't includes it properly on next Build. Clear and Rebuilding solves this.
One more time properly check Resource is correct path or not.

How to setup limeJS in a totally offline workspace

I'm trying to setup limeJS, the issue is the Internet connection is a problem. I had closure library, box2d, closure compiler and closure templates downloaded separately as .rar files, but I can't find a guide anywhere to set it up like this, everyone just uses(and with reason!!!) the python bin/lime.py init command to get it working. I managed to figure out(yay!) how to setup box2d and closure library but what about the other two?
My laptop is running 64 bits Windows 7. Any help appreciated
All I need is an advice on directory structure, like where to drop the compiler.jar and soy templates .js files, so that when I run the update/create command it doesn't try to download the compiler or templates like it does right now.
I got it working, after taking a quick look at the lime.py file it told me everything I needed, for example both the SoyJs templates file and the compiler need to be in the /path/to/lime/bin/external folder and for example, the lime.py file was expecting a compiler file named compiler-dateOfLatestCompiler.jar instead of compiler.jar.
In general, If you have LimeJS built up in one machine using Python and all, you can just copy paste the whole package anywhere you want and use it just as ususal.
You don't need network once you have all the files/codes for Lime is downloaded.
Infact, you dont even need python for normal development tasks(Python is required to build your js file once you complete development though)

Flash Builder and External Library

I have downloaded the as3syndicationlib library from here, but I am having trouble adding it to my project. I dragged the folder into my project > src folder, and when I started importing the files from it (com.adobe.xml.syndication.rss.RSS20) all seemed to be fine, until I hit save. Then I started to get error that say:
Multiple markers at this line:
-1084: Syntax error: expecting identifier before
import.
-The import RSS20 could not be found.
-adobe
-The import rss could not be found.
-The import syndication could not be found.
-The import xml could not be found.
-91 changed lines
I have never used an external library with Flash Builder/Flex/ActionScript3 before so I have no idea what to do. I know that this is probably very simple to do, but I am new at flash builder and flex.
Any help is highly appreciated!
Thanks,
Jacob
EDIT:
I got it to work. What I was doing wrong was I was added source code to my project when I should have added the xmlsyndication.swc file to my project.
You need to add it to a lib folder instead of src... if you don't have a lib folder just make one. Then right click the project in Flash Builder and hit properties, in the menu on the left select Library Path (or something like that), click the Add Folder button and type lib. Do a clean build (Build Menu -> Clean).

Getting Type not found error implementing source in as3

I am trying to just compile and run the demos from this article:
Flash talks to max msp via osc
I am using Flash Develop and Flex SDK with an up to date version of air.
When I run the demo: "as3_MaxFlashHarmony" I get an error I don't know how to fix. The source for the entire project is here:
the project
But specifically the error I am getting says:
col: 30 Error: Type was not found or was not a compile-time constant: OSCMessage.
here is the as3 file that it is specifically referencing:
//IHarmonyApp.as
package
{
import org.tuio.osc.OSCMessage;
public interface IHarmonyApp
{
function updateOSCData(msg:OSCMessage):void;
}
}
It uses the libraries Tuio, MinimalComps, and MonsterDebugger. The thing I don't get is that how can it not find OSCMessage if OSCMessage is properly imported? the IDE is making fine references to it and I can open it's declaration. OSCMessage is a public class. I don't get it.
To give some extra info for potential answers, the IDE flashdevelop can find the library org.tuio.osc.OSCMessage just fine, it gives the error regardless of if org.tuio... is a source path or not, and the overall path does not contain any special characters. I don't know if that might matter, but I feel like this is me making a stupid mistake somewhere. I can provide my project zipped if need be.
Thanks!
Edit 9:48, 8/25/12
I do have the file path org/tuio/osc/OSCMessage.as in my project, and the file OSCMessage exists. FlashDevelop can find it just fine and I can navigate to declaration at that location. This is why I got stumped.
Thanks again
In your AS3 folder apart of your de folder you would need to have org folder with relevant folders and classes.
For example to import org.tuio.osc.OSCMessage you would need a file:
../YourPackageRoot/org/tuio/osc/OSCMessage.as
The other way is including a SWC file (all folders and classes zipped into one swc file).
You can include the swc file in FlashDevelop by right clicking the swc file and selecting Add To Library