|
-
Senior Member
how to save score over fames
How can save the users score for the next frame?
Im using dynamic text box and it all gose somthing like this
sory for the mistakes it rote it up just now
Code:
//frame1 - 2 layer score
_root.score = 0;
// Varible for the dymanic text box
scorer
// MC called my.MC layer game frame1
on(release){
_root.score +=1;
_root.scorer.text = _root.score;
}
Why dose the dynamix text box still come up with 0 on frame 2 should _root.score show the same number as before from frame 1
92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!
-
Senior Member
set the variable in the textbox in frame 2 to be _root.score, not scorer. if you use .text then you have to set the name of the textbox. The name field is to the far left, while the variable is to the right (in the properties panel).
Now you have asked at least 3 questions in less than a day that are realy simple. Do you think you could read the tutorials instead of asking every time?
-
Senior Member
If you have different dynamic text boxes with same name in frame1 and frame2 then it means text box is destroyed and rebuilt in frame2. When dynamic text box is created, it does not get value for its text by default, you have to set it every time yourself.
So, use text box in other layer where it covers both frames without new keyframe or set the text again in frame2 using _root.scorer.text = _root.score;
(Or follow the advice from ihoss).
-
Senior Member
What do you mnea i have asked 3 q's in a day that was my only i think... i also asked were to find a certain sound loop... i must have short term memory loss or somthing
thanks for the advice
92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!
-
Senior Member
sorry, there were just a lot of noobs here today
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|