[Cocos2dx - TiledMap]Get black vertical lines when move map - cocos2d-x

I make a game with cocos2d-x and tilemap follow tutorial Cocos2D-X Tile Map Tutorial
It working fine but when i move map, i get black vertical lines on screen.
http://i689.photobucket.com/albums/vv255/thansaulove/error2.png
Anyone have solution to fix it?
Many thanks in advance.

There is a way to fix this. It worked for me.
Find the ccCongig.h file and change the value of CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL to 1

Related

Away3D 4.0 TextureMaterial activateForDepth()

I am new to Away3D, and I’m using version 4.1.1b.
I am having trouble with the rendering order of Meshes added to the scene.
(Objects in the distance are rendering infront of Objects closer to the Camera)
I found that in version 4.0 you could call activateForDepth() on a TextureMaterial.
It seems as though this method has been removed.
Can someone please point me towards how to fix this in 4.1.1.
I have also tried,
_view.renderer = new DepthRenderer( true, true );
This seems to fix the depth/distance problem, but everything is bright blue with circles instead of textures.
Thanks
Matt
This has now been solved, for anyone looking for the answer see this other post.
http://away3d.com/forum/viewthread/4673/

Adding a canvas-sprite object to a canvas?

I've been playing around with HTML5 and canvas and sprites and I've managed to get myself a bit stumped. I was wonderring if there was anyone out there with just a bit more experience than me who could help me 'tune' this (and also make it work).
I've got all the code up on GitHub https://github.com/AlexChesser/jsSprite and have put a live demo up over here http://chesser.ca/jsSprite
What you can see from Test 01 and 02 is that I'm able to send the Minotaur directly to the on-page canvas, I'm able to animate the Minotaur on the canvas... but when I try to create the Minotaur and add it to another canvas - I'm getting a blank screen.
(attempting to implement https://github.com/AlexChesser/jsSprite/blob/master/03-animated_minotaur_on_canvas.php)
I know it must be something small and sill that I'm doing wrong here, but I've been staring at it for hours and I can't track down the problem.
I thought I'd try posting up here to see if there's anyone who can see it 'in one go' AND to maybe let me know if there's anything I can do better.
If you're interested in getting a little further under the hood on this stuff, the lion's share of the code for this is coming from a Blog post http://www.johnegraham2.com/web-technology/html-5-canvas-tag-sprite-animation-demo/
Anyways, maybe it's one of those things that "comes to you" once you've walked away from the problem for a little bit. Fingers crossed I can either figure it out or someone out ther ecan give me that little push in the right direction.
Thanks!
:)
I just stepped through your code.
MainContext.drawImage(m.canvas, 0, 0, m.width, m.height);
is occuring before drawFrame gets called because the image isn't ready yet.
So the mainContext.drawImage is drawing a canvas that has nothing painted on it yet.
Then the Sprite's canvas is loaded and ready to go, but its too late!
For confirmation, you can call MainContext.drawImage(m.canvas, 0, 0, m.width, m.height); in the browser console and you will see the minotaur appear.
As Simon Sarris said, you are drawing the canvas too soon. What you'll need to do is either loop until the sprite is ready, or add a callback to your sprite that is called after it draws.
You already have a function attached to the image's onload event, you should be okay to do something similar for the whole sprite.

AS3 Flash Flip image

I could really need some help here. I'm trying to create a simple image-fliping-app that looks something like this: http://www.skistar.com/sv/Are/Skidskola/Skistar-Experience/om/
My app, just like this one, loads it's images dynamically (using XML). My app will only contain 4 fliping objects (i.e. 8 images).
Has anybody some guidance or code for that matter that I can study to get this working?
That would be really sweet! :-)
// Nicke
img.scaleX = -1;
img.scaleY = -1;
you can fake the flipping with a simple scaleX scaling. Basically you've got the two images on top of each other and when the mouse is over them you scale down the visible one and when it's scaleX value equals 0, you start scaling up the other image. The reference point of the images should be centered.
I will try to give you an example but a bit busy at the moment.
Hope it helps,
Rob

dot hover area offset in gRaphael line chart

I'm trying to get a hover effect for displaying information against points on a line chart using gRaphael. I've got a basic version working here http://www.matthewhollings.co.uk/svg/raphael-line-test.html but there seems to be an offset against the point that the hover responds to when two lines are close together. Does anyone know how I can fix this so that each point responds when the mouse pointer is closest?
Also, I'm trying to make the line chart look more like the one on the raphael website, where the hover flag contains both the x and y value of the point and is animated along the path. Any help with that would be greatly appreciated!
Many thanks in advance,
Matt

How to place one object (image) on top of the other(video) in Flex 4

I'm looking to place an image (object) on top of the other object (default video player in Flex 4), any suggestions are most welcome. Do we've to use canvas? can I do it without using canvas? An example would be greatly appreciated, thanks.
Regards
You can have a look at this tutorial for more info:
http://www.republicofcode.com/tutorials/flash/as3displaylist/
but adding an object on top of another one , is as simple as this
addChild(child1);
addChild(child2);
basically the first object added is at the bottom of your stack. now if the object you want placed under was added after the first one. you still can do this:
addChild(child2);
addChildAt(child1, 0 );
there are, of course ,more options to manipulate the children positions but you should find what you need in the tutorial above.
Oops , sorry the word Canvas , got me confused. I thought you were trying to do this within Flex. Do you mean to say you want to do that in HTML. If you do, please retag your question, because it wouldn't really be a flash issue .
Hope it helps ;)