Solved

How do I set a checkbox to be checked through Lingo in Director 11.5?

Posted on 2010-08-19
2
996 Views
Last Modified: 2013-12-24
I've added a checkbox (the built in flash component) to the stage in my Director 11.5 movie and I can correctly test through script whether the checkbox has been checked or not through the sprite(checkbox).selected property but whenever I display this checkbox again it doesn't remember the last state.

I can set it to be checked or not checked by default in the property inspector but can't find the correct way to update the "selected" property through the script.

I have tried sprite(checkbox).selected = true/1 but this throws a syntax error since .selected is not a valid property of the sprite object.

I assume there must be a way to specify that I wish to update the .selected property of the flash object, but this is my first time using a flash object in my movie and I have been unable to figure this out.

Could somebody please point me in the right direction?

Thanks,
LLMorrisson.
0
Comment
Question by:LLMorrisson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
Chris-Chambers earned 250 total points
ID: 33476372
Hi,

You have to wait a frame for the sprite to be initialised before setting this property.

Try the code below:

Chris.
property spriteNum
property pSprite
property pInitialized
property pLoaded

on beginSprite(me)
  pSprite = sprite(spriteNum)
  pInitialized = false
  pLoaded = false
  (the actorList).add(me)
end

on stepFrame(me)
  if (pLoaded) then
    if not(pInitialized) then
      (the actorList).deleteOne(me)
      pInitialized = true
      pSprite.selected = true
    end if
  else
    pLoaded = true
  end if
end

Open in new window

0
 
LVL 5

Author Closing Comment

by:LLMorrisson
ID: 33548399
Hey Chris,

Sorry for the delay getting back to you about this, been very busy moving!

This has helped me out a great deal. Thank you for the reply.

Regards,
LLMorrisson.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question