Skip to main content
Jhon Carlo
Inspiring
February 3, 2016
Answered

CheckBox in a wrong place.

  • February 3, 2016
  • 1 reply
  • 541 views

I need to change the position of some CheckBoxes between contiguous frame.

eg

I have a CheckBox1 in frame3 in position x1,

then I copy CheckBox1 in frame 4 in position x2 (manually not with as3).

When I start the application in the frame 4 CheckBox1 remain in position x1.

I don't know why.

This problem doesn't exist if i have one blank frame between the two frames where CheckBox1 are.

I need do have the CheckBoxes contiguous because I need to maintain the same script for several CheckBoxes in diferent (contigous) frames.

Is there a short way, a method, to update the page and positioning the C.Boxes in the places were they are in the edit mode of flash?

Thanks.

This topic has been closed for replies.
Correct answer kglad

use actionscript to assign the position of your checkboxes on frame 3 and actionsript to change the position of your checkboxes on frame 4.

and remove the keyframe at frame 4 on the layer that contains your checkboxes.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
February 3, 2016

use actionscript to assign the position of your checkboxes on frame 3 and actionsript to change the position of your checkboxes on frame 4.

and remove the keyframe at frame 4 on the layer that contains your checkboxes.

Jhon Carlo
Inspiring
February 3, 2016

Thank you very much kglad for your reply.

I'm sorry but in my previuos question I have not explained that I have 20 CheckBoxes (right or wrong answer in a test) and each one of these of this change his position (x and y) for about 30 frames (30 pages which every CheckBox change his possition over a text for every line.

I was looking for a short way to solve the problem, and my previous setting was reasonable, except the problem I have mentioned in the previous question.

In this perspective it is important for me to assume that the your previous hint is the only way to solve the my problem?

In other word if you next answer will be definitively yes I will must write a code that  must change the x y (reading their position in each one of the 30 pages - frame - of the test)  for every 20 checkbox.

(20x30x2 = 1200) :-(

I hope your answer will not be yes :-).

Thank you again.

kglad
Community Expert
Community Expert
February 3, 2016

you're going to have a lot more problems if those checkboxes have the same instance name and you're trying to apply actionscript to them.

to start, you had to

1. put the first one in a keyframe and assign an instance name

2. create no keyframes prior to the keyframe in step 1

3. add all subsequent keyframes and not remove from the stage any checkbox even if replaced and assigned the same name

if you did anything else you'll have unexpected problems like you're seeing.