Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Help
  3. Detaching widgets from viewport

Detaching widgets from viewport

Scheduled Pinned Locked Moved Help
4 Posts 2 Posters 758 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • TheNicknameGovT Online
    TheNicknameGovT Online
    TheNicknameGov
    trusted helpers
    wrote on last edited by
    #1

    How do I do this?

    I'm back!!!

    CreatiCodeI 1 Reply Last reply
    0
    • TheNicknameGovT TheNicknameGov

      How do I do this?

      CreatiCodeI Offline
      CreatiCodeI Offline
      CreatiCode
      wrote on last edited by
      #2

      @tng

      Widgets (like buttons/lables) always stay at the same position on the stage, so they have no relations with the viewport. What are you trying to achieve?

      TheNicknameGovT 1 Reply Last reply
      0
      • CreatiCodeI CreatiCode

        @tng

        Widgets (like buttons/lables) always stay at the same position on the stage, so they have no relations with the viewport. What are you trying to achieve?

        TheNicknameGovT Online
        TheNicknameGovT Online
        TheNicknameGov
        trusted helpers
        wrote on last edited by TNG
        #3

        @info-creaticode Well since the prints feature is acting weird atm, I’m using a progress bar for object hp

        And they follow the viewport on my screen. I move a bit, and the widget follows.

        80021c5c-8a73-4c15-a4da-ce6d0f34572a-Screen recording 2025-07-19 9.27.25 AM.gif

        I'm back!!!

        CreatiCodeI 1 Reply Last reply
        0
        • TheNicknameGovT TheNicknameGov

          @info-creaticode Well since the prints feature is acting weird atm, I’m using a progress bar for object hp

          And they follow the viewport on my screen. I move a bit, and the widget follows.

          80021c5c-8a73-4c15-a4da-ce6d0f34572a-Screen recording 2025-07-19 9.27.25 AM.gif

          CreatiCodeI Offline
          CreatiCodeI Offline
          CreatiCode
          wrote on last edited by info-creaticode
          #4

          @tng

          The progress bar is not “following”. It is just staying at the same position in the stage, regardless of where your sprite is or where the viewport is.

          If you want the progress bar to stay with the tree, there are some other options. For example, you can add additional costumes of the tree, all with the same tree, but with an additional progress bar on top of it at different percentages. So you can change the tree’s costume in your code.

          Or you can create a new sprite that’s just the progress bar at different percentages, and then move that sprite above the tree. It will stay with the tree when you move the viewport.

          And another option is still use the progress bar widget, but change its position when you move the main sprite. You will need to calculate the position of the tree relative to your sprite, and calculate the position of the progress bar using that relative position.

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • CreatiCode