[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2010-08-19
2
Medium Priority
?
1,005 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 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

649 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