Skip to content

Commit

Permalink
Change parameter order for Movie
Browse files Browse the repository at this point in the history
  • Loading branch information
David Aurelio committed Mar 14, 2013
1 parent e4805a9 commit d35e0b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/runner/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ define([
exports.KeyframeAnimation = bindConstructorToParameters(KeyframeAnimation, [stage]);
exports.Bitmap = bindConstructorToParameters(Bitmap, [assetLoader]);
exports.FontFamily = bindConstructorToParameters(FontFamily, [assetLoader]);
exports.Movie = bindConstructorToParameters(Movie, [stage]);
exports.Movie = bindConstructorToParameters(Movie, [stage, null]);
exports.Sprite = bindConstructorToParameters(Sprite, [assetLoader]);
exports.Video = bindConstructorToParameters(Video, [assetLoader]);
exports.Audio = bindConstructorToParameters(Audio, [assetLoader]);
Expand Down
2 changes: 1 addition & 1 deletion src/runner/movie.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ define([
* @mixes Timeline
* @mixes displayList.timelineMethods
*/
function Movie(root, url, callback, displayList) {
function Movie(root, displayList, url, callback) {
AssetDisplayObject.call(this, null, url, callback);

if (!displayList) {
Expand Down
6 changes: 3 additions & 3 deletions test/movie-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define([
describe('Movie', function() {

testDisplayList(function(displayList) {
return new Movie({}, null, null, displayList);
return new Movie({}, displayList, null, null, null);
});

it('Sets its root to first argument [usually bound by environment.js]', function() {
Expand All @@ -23,8 +23,8 @@ define([
};
var url = 'http://abc.def/pa/t/h.js';
var callback = function() {};
var m = new Movie(root, url, callback);
expect(root.loadSubMovie).toHaveBeenCalled();
var m = new Movie(root, null, url, callback);
expect(root.loadSubMovie.mostRecentCall.args[0]).toBe(url);
});

testLifeCycle(function() { return new Movie({}); });
Expand Down

0 comments on commit d35e0b9

Please sign in to comment.