Send to the Google Play and come back from there got black screen? - cocos2d-android

I have a CCScene, In the CCScene there is button "More Apps / rate App".
When I tapped on, It'll take me to the play store and when I press the back button I got the black screen
but What is open that time "CCScene which have the button "More Apps /Rate app" ".
Anybody suggest what is the matter ??

I think your screen orientation may be changing when you moving from that activity so that it killing that scene,So place this line in your activity of manifest file and try
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"

Related

Audio issue in After Effects

I am learning after effects. I have got one template for after effect and trying to render it. all thing is working fine but just issue in audio output. I have selected audio output also in render but I am not getting audio, as well in preview ram. what I am missing ?
Thanks
Audio is simply muted. Check speaker icon, must help
Check your mute button or click RAM preview. Wait for video to render and click RAM preview button several times. I think it will solve the problem. I got this problem too but I clicked the RAM preview button and waited for it to render. And boom it worked.

How to force mouse focus to a windows app

I am converting a game from the 1997 source and updating it to HD. It's all going well except for one niggling element. When I launch the game, the mouse does not have focus on the app. (it shows a blue circle spinning around). When I hit CTRL ALT DEL (to bring up the task manager menu) and then hit ESC. The mouse is now focused on the game and all it well! It's been a while since I've programmed windows but this seems bizarre. If anyone has any ideas on how to get my game to get mouse focus out of the gate I would much appreciate it! :)
Thanks

Two finger moving smooth and kinetic scrolling with trackpad or touchpad?

I am working on a Qt application which resembles hex editor for Mac.
(picture from Google)
It has a very large portion of data to scroll vertically(upward and downward) because it shows all large files data in hex format.
In my application, I'd like to add two finger smooth scrolling in both direction: up and down like that in Macbook Air two finger scrolling.
It work properly with mouse wheel but not with trackpad two finger move scrolling.
If someone has a solution, please help me out. Thanks in advance.
The scroller allows for gestures like click and drag to do kinetic scrolling.
http://qt-project.org/doc/qt-5/qscroller.html#details
Note on this page:
QScroller::TouchGesture 0
The gesture recognizer will only trigger on touch events. Specifically it will react on single touch points when using a touch screen and dual touch points when using a touchpad.
So then the example they give would turn into this for you:
QWidget *w = ...;
QScroller::grabGesture(w, QScroller::TouchGesture);
There is more on doing new things with touch screens and touch pads by handling the QTouchEvent:
http://qt-project.org/doc/qt-5/qtouchevent.html#details
Hope that helps.

how to scene restart with restart button after sprite falls below certain hight?

I am struggling with my first semi basic game for iPhone. The game operates well but I want a button to display saying restart and then when clicked it restarts the scene. This button should only appear when my sprite (called sprite) falls below the bottom of the iphone screen. I am using both cocos 2d and box 2d if that makes a difference.
Thank you for the help in advanced, it is greatly appreciated!
Quick answer for having the button appear once the sprite falls below a certain point: When you create the button, set its state to not visible. resetButton.isVisible = NO; Then write an if statement about your sprite's position and enable the button once that happens.
if (sprite.position.y >= 0)
{
resetButton.isVisible = YES;
}
This should get you started on that aspect. I'm not at my Mac right now, but if memory serves, a non-visible button is not enabled, so clicking on its location won't matter. If that's incorrect, just add in resetButton.isEnabled = NO; and YES appropriately.
As for resetting the scene, this can get a little tricky depending on what exactly you want to accomplish. You need to essentially replace the scene with itself, but this can cause undesirable flashes. A quick google search found a bunch of forum posts on this. If you can elaborate on what you've already tried and where you're getting caught up, I can try and get more specific.

What's the best way to achieve a popup in Cocos2D?

I am developing an iOS game using Cocos2D. I would like to show a popup, something like UIAlertView, but completely custom. What is the best way to achieve this?
Thanks a lot!
Benza
I would suggest to use a layer for this and to pause the scene. Here are a couple forum posts from the Cocos2d site that go over this a bit:
http://www.cocos2d-iphone.org/forum/topic/6511
http://www.cocos2d-iphone.org/forum/topic/1954
Unfortunately pausing the scene means you will also pause whatever you have in your popup.
Maybe it's not your case, but I quite often have scrolling lists in my popups. If I pause the scene it will not work.
I've added a method to CCNode which goes through all children and stops their activity rather than pausing the scene.
If you open the popup as a child of your scene then first you deactivate all children of the scene and then open the popup. This means that you can still do whatever you want in your popup and everything else is paused or does not respond to touch [like menus].