Skip to content

Commit

Permalink
disable second chapter button
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-bateman committed May 15, 2012
1 parent b59faaa commit f18e13f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
9 changes: 8 additions & 1 deletion development/flash/src/com/away3d/gloop/level/ChapterData.as
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,25 @@ package com.away3d.gloop.level
public class ChapterData extends EventDispatcher
{
private var _title : String;
private var _idx:uint;
private var _posterUrl : String;

private var _posterBitmap : Bitmap;

private var _levels : Vector.<LevelProxy>;

public function ChapterData()
public function ChapterData(idx:uint)
{
_idx = idx;
_levels = new Vector.<LevelProxy>();
}


public function get idx() : uint
{
return _idx;
}

public function get levels() : Vector.<LevelProxy>
{
return _levels;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ package com.away3d.gloop.level
for each (chapter_xml in xml.chapter) {
var chapter : ChapterData;

_numChaptersLoading++;

chapter = new ChapterData();
chapter = new ChapterData(_numChaptersLoading++);
chapter.parseXml(chapter_xml);
chapter.addEventListener(Event.COMPLETE, onChapterComplete);
chapter.loadPoster();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,13 @@ package com.away3d.gloop.screens.chapterselect

dx = ev.stageX - _mouseDownX;
if (dx < 10 && dx > -10) {
var poster : ChapterPoster;
var poster : ChapterPoster = ChapterPoster(ev.currentTarget);

if (poster.chapterData.idx)
return;

SoundManager.play(Sounds.MENU_BUTTON);

poster = ChapterPoster(ev.currentTarget);
_db.selectChapter(poster.chapterData);
}
}
Expand Down

0 comments on commit f18e13f

Please sign in to comment.