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

WORKING WITH TIMELINES

New Here ,
Jan 25, 2013 Jan 25, 2013

Hi

I have a game designed in flash using the Object Oriented Approach. This implies I have various classes with a main class.

I also have two versions of the game collaborative and non-collaborative which can be palyed using three different game controllers. so in total I have 6versions as shown below:

collaborative palyed with gamepad

collaborative played with wiimote

collaborative played withbalance board

non- collaborative palyed with gamepad

non-collaborative played with wiimote

non-collaborative played withbalance board

Now I want to have a screen with links to all these verions for example when I run the game I want to get an intro screen with the versions written on it and then with button clicks play the particular version I want.  Can I do this on the Timeline. if possible what is the procedure?

TOPICS
ActionScript
534
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

Community Expert , Jan 29, 2013 Jan 29, 2013

in your new main swf:

var loader:Loader=new Loader();

addChild(loader);

var a:Array=[collaborative_palyed_with_gamepad_btn,collaborative_played_with_wiimote_btn,collaborative_played_withbalance_board_btn,non__collaborative_palyed_with_gamepad_btn,non_collaborative_played_with_wiimote_btn,non_collaborative_played_withbalance_board_btn];  // <-create those movieclip btns

for(var i:int=0;i<a.length;i++){

MovieClip(a).addEventListener(MouseEvent.CLICK,clickF);

MovieClip(a).ivar=i;

MovieClip(a).buttonMode=t

...
Translate
Community Expert ,
Jan 25, 2013 Jan 25, 2013

you can (but there's no good reason to do that).

but, if you want, use a loader to load one of the size swfs into a new main swf that contains your intro screen and the loader code.

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
Guru ,
Jan 25, 2013 Jan 25, 2013

Would it not be better to let Flash detect the Input devices automatically, with GameInput ?

That way you can check if the user even has the required Controllers connected and inform him that he needs one of the three Controllers you mentioned.

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
New Here ,
Jan 29, 2013 Jan 29, 2013

Hi thanks for your replies

@moccamaximum I have checked the gameinput out but i think the feature is supported only n AIR for TV devices. Besides, wiimotes connect remotely through a bluetooth so i guess it may not work with wiimotes.

@kglad, could you please, throw more light on your suggestion?

Thanks

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
Community Expert ,
Jan 29, 2013 Jan 29, 2013
LATEST

in your new main swf:

var loader:Loader=new Loader();

addChild(loader);

var a:Array=[collaborative_palyed_with_gamepad_btn,collaborative_played_with_wiimote_btn,collaborative_played_withbalance_board_btn,non__collaborative_palyed_with_gamepad_btn,non_collaborative_played_with_wiimote_btn,non_collaborative_played_withbalance_board_btn];  // <-create those movieclip btns

for(var i:int=0;i<a.length;i++){

MovieClip(a).addEventListener(MouseEvent.CLICK,clickF);

MovieClip(a).ivar=i;

MovieClip(a).buttonMode=true;

}

function clickF(e:MouseEvent):void{

var ivar:int=MovieClip(e.currentTarget).ivar;

loader.load(new URLRequest(a[ivar].split("_btn").join(".swf"));  // assuming your swfs are named collaborative_palyed_with_gamepad.swf (sic) etc

}

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