Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8148649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:41:15+00:00 2026-06-06T14:41:15+00:00

I thought doing a simple animation would be easy but is is taking hours

  • 0

I thought doing a simple animation would be easy but is is taking hours and Im not getting even close to have the expected effect…

I need to simulate a simple Flash Motion Tween like for iphone/ipad using xcode

this is the desired effect: http://www.swfcabin.com/open/1340330187

I already tried setup a timer adding X position and it doens’t get the same effect, my cooworkers suggested me cocos 2d to do this using actions and sprites, which might would be fine although I wouldn’t like to third party frameworks, but if there is a way to do the same with cocos I would definitively use it.

Does anybody have any suggestions, I feel like it might be simpler than I thought

thanks all

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:41:16+00:00Added an answer on June 6, 2026 at 2:41 pm

    If there is no troubles to you, that you will have to do it insinge OpenGL view, it is really very simple. To show some info, you need CCLabel class. To change it’s position, you need CCMoveTo/CCMoveBy action, to change opacity, you need CCFadeTo/CCFadeIn/CCFadeOut actions, to make delay you need CCDelayTime. To make it all work together you need CCSpawn and CCSequence.

    CCSpawn will run several actions at the same time(for example fade in and move from right to the center), CCSequence will run several actions one by one (sequence to fade in + move to center, delay for same time, sequence to fade out + move from center to the left). Then you should only schedule method, that will create labels and run actions on them. In code it will be something like

    lets define full animation time

    #define ANIMATION_TIME 4.f
    

    schedule method in any place you want to start animation

    [self schedule:@selector(runNextMessage) interval:ANIMATION_TIME];
    

    it will call runNextMessage method every ANIMATION_TIME seconds

    - (void) runNextMesage
    {
        NSString* message = //get next message
    
        CCLabelTTF* label = [CCLabelTTF labelWithString:message 
                                             dimensions:desiredDimensionsOfTheLabel 
                                              alignment:UITextAlignmentLeft 
                                          lineBreakMode:UILineBreakModeWordWrap 
                                               fontName:@"Arial" 
                                               fontSize:20.f];
        CGSize winSize = [[CCDirector sharedDirector] winSize];
        // place the label out the right border 
        [label setPosition: ccp(winSize.width + label.contentSize.width, winSize.height / 2)];
    
        // adding it to the screen
        [self addChild:label];
    
        ccTime spawnTime = ANIMATION_TIME / 3;
        // create actions to run
        id appearSpawn = [CCAction actionOne:[CCMoveTo actionWithDuration:spawnTime]
                                         two:[CCFadeIn actionWithDuration:spawnTime]];
    
        // create show action and disappear action
    
        // create result sequence
        id sequence = [CCSequence actions: appearSpawn, showAction, disappearAction, nil];
        [label runAction: sequence];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I thought I was doing something relatively simple, but I guess not. Running: NSLog(@%f,[[UIScreen
I thought this would be fairly easy, but I'm totally baffled. I want one
i am doing a continuously select every 10seconds, so i thought i would do
Although I have my php validation doing this, thought I may as well pop
can anyone help, i have problem doing a sort, I thought i had it
I have a seemingly simple requirement, but i can't figure out how to write
I thought that there should have been a simple solution to this, given that
I'm doing what I thought was a simple .htaccess rewrite to create nicer urls.
I'm having some trouble with what I thought would be a simple problem. I'd
Another noob regex problem/question. I'm probably doing something silly so I thought I'd exploit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.