Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Controlling buttons across multiple scenes?! Help!

Guest
Jan 30, 2013 Jan 30, 2013

Hello!

I am new to flash, so I started out my project using scenes, which I now realise is preventing me from working something out. I have a 'menu' screen which is a map with points on it, those points then lead to other scenes with descriptions of those places. I want to be able to make it so that on the map screen the second point, which is a button, is only visible once you have clicked on the first point, looked at that scene and then gone back to the map again; and so on with the third and fourth etc. Basically so that you have to go through the scenes in sequential order, but always going back to the map. I tried making all the buttons (except the first) visible = false in the map scene, and then adding visible = true (for each in turn) to the 'back to map' button in the appropriate scenes, but that obviously doesn't work because the code doesn't carry over between scenes. Can any one help me think of an alternate way of approaching this? I have looked at using a document class, but dont entirely understand it.

Thanks

TOPICS
ActionScript
790
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 30, 2013 Jan 30, 2013

If they are animated scenes, yes, they will be playing.  If that's the case, then you can spread them out on the main timeline and still accomplish what you want. 

Scenes can just be problematic things when it comes to navigating them with coded designs, so they are better avoided than entertained.

What you need to do in the case of moving around the main timeline is to have a layer for Actionscript that extends the length of the timeline where you retain boolean status variables for the buttons.

...
Translate
LEGEND ,
Jan 30, 2013 Jan 30, 2013

Scenes are dinosaurs that are best avoided unless you are doing codeless animations.

What you could do is keep all your design in frame 1 and control the visibility of items.  Convert your current scenes to movieclips and place them all together in frame 1.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 30, 2013 Jan 30, 2013

thanks

I thought of this, but I am building it for AIR for ios. Given that of course performance is an issue, wont having all those movieclips going at the same time slow things down?

I find that on the device it loads everything seperately for each scene, which helps me keep the performance balanced

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 30, 2013 Jan 30, 2013

What do you mean when you say all the movieclips are "going at the same time"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 30, 2013 Jan 30, 2013

I'm not sure what I mean tbh haha. I suppose I'm assuming that with all the scenes now as movie clips on the same frame, all the scenes that are not the one visible, will be playing the background? And that will hinder performance. Or does it not work like that?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 30, 2013 Jan 30, 2013
LATEST

If they are animated scenes, yes, they will be playing.  If that's the case, then you can spread them out on the main timeline and still accomplish what you want. 

Scenes can just be problematic things when it comes to navigating them with coded designs, so they are better avoided than entertained.

What you need to do in the case of moving around the main timeline is to have a layer for Actionscript that extends the length of the timeline where you retain boolean status variables for the buttons.  That way when you return to the map frame you use those status variables to make the buttons visible that you wish to... just have a function that  goes thru all the buttons and sets their visibility based on their status.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines