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 8541587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:51:56+00:00 2026-06-11T11:51:56+00:00

I want to do: id action = [CCScaleTo actionWithDuration:0.5 scaleX:self.Xposition scaleY:1]; id ease =

  • 0

I want to do:

id action = [CCScaleTo actionWithDuration:0.5 scaleX:self.Xposition scaleY:1];
id ease   = [CCEaseInOut actionWithAction:action rate:4];

[someObject[i] runAction:ease];

But I want to be able to hook into each frame of the action to do some stuff… I am wondering if there is any way to accomplish this other than creating an update method on someObject? I am trying to avoid doing that because it’s a CCSprite, and I don’t currently have an object wrapper for it.. It literally is just defined as something like CCSprite *someObject[4] in the header… So I just wondered if there is any way to specify a per-frame callback in the context of runAction?

  • 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-11T11:51:57+00:00Added an answer on June 11, 2026 at 11:51 am

    There is no native way to do this.

    If this is what you really want to do rather than using an update method you could create a class similar to how the Ease actions work. Taking another action as a parameter and overriding update to modify its behavior.

    For example if you called it CCCallBackAction it would be created as follows:

    id action = [CCScaleTo actionWithDuration:0.5 scaleX:self.Xposition scaleY:1];
    id ease   = [CCEaseInOut actionWithAction:action rate:4];
    id callback = [CCCallBackAction actionWithAction:ease target:self selector:@selector(callback:)];
    
    [someObject[i] runAction:callback];
    

    In CCCallBackAction you would override update

    - (void)update:(ccTime)dt
    {
         [target performSelector:SEL];
         [other update:dt];
    }
    

    Note to avoid misunderstanding: CCCallBackAction is not a cocos2d class, it is hypothetical in this example

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i just want an Action to print a barcode image, but i can´t get
I write code in jtree for method click, but i want the action only
I've the below code from a tutorial,i want the action but i just want
I want each action taken on certain tables to be logged. I want logging
I want to perform action on change in count of rows of an HTML
in this tutorial of Yii framework http://www.yiiframework.com/doc/guide/1.1/en/basics.controller#action i want to put my Actions from
I want to implement an action bar for my own android app like the
I want to parse data-action in the string below. I've managed to get the
I want to perform rubyf action in VIM when I press F5 if the
I want to create an Action to automate GCJ compilation. Since I couldn't make

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.