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

  • Home
  • SEARCH
  • 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 7500335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:08:42+00:00 2026-05-29T20:08:42+00:00

I have created a sprite and inside that sprite I have a label like

  • 0

I have created a sprite and inside that sprite I have a label like this.

CCLabelTTF *myLabel = [CCLabelTTF 
                        labelWithString:text
                        dimensions:CGSizeMake(mySpriteWidth*0.9, mySpriteHeight*0.9) 
                        alignment:UITextAlignmentCenter 
                        fontName:@"Helvetica Neue" fontSize:20.0f];

[myLabel setPosition: CGPointMake((mySpriteWidth/2.0f),(mySpriteHeight/2.0f))];
[mySprite addChild: myLabel];

as you see the label is a child of mySprite.

Then I fade out the sprite using this action

id fadeOut = [CCFadeOut actionWithDuration:0.4];

The sprite fades out correctly, but the label continues there, arrogantly looking at me…

is this a bug or I am missing something? Thanks


the code I use to do the fade is this:

    CCSequence *sequence =[CCSequence actions:
                            fadeIn,
                            [CCDelayTime actionWithDuration:2.5],
                            fadeOut,
                            nil];


    [mySprite runAction:sequence];
//    [myLabel runAction:sequence];

adding the action to the label, makes it vanish, but then the sprite stays on the screen… 🙁

  • 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-05-29T20:08:43+00:00Added an answer on May 29, 2026 at 8:08 pm

    You should be removing the sprite after the fade is complete. when it is removed if you are not going to use it again. or toggle its visibility if you will.

    I’m not 100% sure if fade out will echo to its inner views. it affects objects that inherit from CCRGBAProtocol

    CCFadeout reference

    this should get you around your problem at least. if u want the label to fade out also you can access the label using getChildByTag to give it a fade effect also.

    But you will need to create a new fade effect, the way Actions are implemented in cocos is that 2 objects can run the same action, the latter will.

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

Sidebar

Related Questions

I have created a PHP-script to update a web server that is live inside
I have created this Pool that has 5 static variables. public class FruitPool extends
So i have this sprite that is say arbitrarily 100 x 100 which is
I have created a UserControl that has a ListView in it. The ListView is
I have created a few small flash widgets that stream .mp3 audio from an
i have created a workflow activity that do give the item creater of a
Is it possible to use a pixel shader inside a sprite? I have create
I have a class named insect child of sprite.I have created a instance of
I have a sprite that holds a bitmap data. I want to give the
My problem: I have created a parent sprite which rotates forever. I have created

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.