Solved

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

Posted on 2010-08-19
2
987 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

763 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