Skip to content

Commit

Permalink
Globally accesible callback function cannot have forward slash in nam…
Browse files Browse the repository at this point in the history
…e - Flash cannot invoke it.
  • Loading branch information
Michal Aichinger committed Dec 11, 2014
1 parent 16cce71 commit de729ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Storage.as
Expand Up @@ -80,7 +80,7 @@ package {
// since even logging involves communicating with javascript,
// the next thing to do is find the external log function
if(this.loaderInfo.parameters.namespace) {
jsNamespace = "SwfStore." + this.loaderInfo.parameters.namespace + ".";
jsNamespace = "SwfStore." + this.loaderInfo.parameters.namespace.replace("/", "_") + ".";
}

log('Initializing...');
Expand Down
4 changes: 2 additions & 2 deletions src/swfstore.js
Expand Up @@ -33,7 +33,7 @@

var counter = 0; // a counter for element id's and whatnot

var alpnum = /[^a-z0-9_\/]/ig; //a regex to find anything thats not letters and numbers
var alpnum = /[^a-z0-9_\/]/ig; //a regex to find anything thats not letters, numbers underscore and forward slash

/**
* SwfStore constructor - creates a new SwfStore object and embeds the .swf into the web page.
Expand Down Expand Up @@ -133,7 +133,7 @@
this.log('info', 'js', 'Initializing...');

// the callback functions that javascript provides to flash must be globally accessible
SwfStore[config.namespace] = this;
SwfStore[config.namespace.replace("/", "_")] = this;

var swfContainer = div(config.debug);

Expand Down

0 comments on commit de729ee

Please sign in to comment.