While i am translating button one position to another position, the animation add within container only. Actually i need to translate the Button some inner container xy points to parent container xz points. This is my code.
tileAnimation[count]=ParallelAnimation::create(mPlayField[count])
.add(TranslateTransition::create().toY(1200).duration(3000))
.add(FadeTransition::create().to(0).duration(3000));
How can i do this? Its working fine in single container. If my design has container within container its making problem.
I do not believe you can translate an object out of its parent (at least that does not make any sense to me). What you should do is have the button you want to move in the outer Container position so that is overlays the inner Container, then translate it to the location you want in the outer container.
Related
To make the how to play popup for my game I created a bunch of label nodes manually in the SKS file:
:
I had to make a lot of labels as they do not have a multi-line property. This is what it looks like when I actually run the code.
What can I do to fix this, is there an easy way out?
note: It is not the same labels that show up every time they are always different. Also, it is not only the labels as the sprite in the bottom right corner has the same problem.
In my experience, this happens only when it's run in the simulator. I don't believe it can handle the amount of draw calls it takes to draw that many labels at once. Run it on a device and all should be fine.
I have an image view in which the image is having various small child images in it. But the thing is I am getting this entire image(parent image with child images) as one single image from a Web Service at run time.
How can I handle taps on these child images(pasted or attached on the main image) after the parent image is received at run time?
I know I can add uiview on those small images and then handle their taps. But the problem is I dont know how to extract coordinates of child images in parent image, hence can't place uiviews on the child images...
Is the solution to this problem even possible? I am quite stuck.
Any help will be greatly appreciated.
Sorry in advance ,if the question is vague. I'm new to iOS development.
Get the point of the gesture:
CGPoint loc = [tap locationOfTouch:0 inView:imageView];
Then you can check the loc againts the cordinates of the child images, that is if you know child images' cordinates in the parent image.
I ran into a problem which that I have a function "PlaceOneSpawn" which will spawn a MovieClip "A_Y" that will addChild into a movieclip Container.
Everything spawns and everything works, I spawn everything in the timeline Actions by calling the function.
I couldn't find a tutorial anywhere that shows a movieclip drag scroller (Like iOS scrolling) for vertical scrolling with .y limiter using a class.
Most of the tutorials out there only use a direct timeline action coding, I want to try to stay clear of that type of coding if possible.
Thanks in advance!
Tutorial... tutorial... none needs tutorials for such easy task. All you have to do is to declare a Point in which you store the mouse position when the user clicks/touches and then calculate the offsets for the container when the user moves the mouse/swipes. For example, if the user clicks at (200,200), and swipes down 50px, then your container's y position should be container.y-(200-50).
So as the user swipes down, the content goes up. And for a limit, just set a limit for the container's y position (must be negative).
I'm basically trying to move an overlay along a path as time moves along. This is how I'm doing it right now:
Imagine that this is all in an NSTimer with new values for position each time.
circle.position = (some moved position)
[overlay remove];
overlay = [smallMap addGroundOverlayWithOptions:circle];
And it basically works but introduces some flickering sometimes, which makes sense because one overlay is being deleted and a new one is added. Is there a function to actually change the position of an overlay without having to remove the old one and add a new one?
At the bottom of the this page it says:
If you wish to make modifications to an overlay after you've added it
to the map, ensure that you assign the overlay to an
id object when it is added.
So could you save the return value of addGroundOverlayWithOptions, and then update its position property later, instead of removing and adding the overlay again?
I haven't tried this, but it seems like it should work.
I have a situation where I have one container like contentContainer and the second container mainContainer. I want to make the second container scrollable and the first container as non scrollable.
try referencing the inside container:
trace( Maincontainer.insidecontainer);
also if its a component you set the scrollable property to false, if you dont understand me or need help let us no i will make you a sample file to explain...