[FLASH Actionscript] Simple getURL in function doesn't work
I'm modifying an mp3 player by flabell, and try to get some buttons to work. However, I can't seem to get the getURL to work, even though it works in other parts of the script. This is my code:
It works. It's only inside the function, it doesn't work.
Here is the original code that works:
Code:
private function downloadRelease(mc : MovieClip) : Void
{
var title : String = mc._name;
var index : Number = Number(title.substring(title.lastIndexOf("n")+1,title.length));
getURL(songsSource[index], Main.getInstance().mcAlbums.linksTarget);
}
The problem is that most likely you did not give "rate1" an instance name (in the properties panel) and/or mc an instance name.
Reading the code goes like this...
Inside the symbol "mc", (movie clip or whatever) there is another symbol, "rate1", and onRelease, do the function.
But when you drill down like that, both symbols must have instance names.
Best wishes,
Eye for Video www.cidigitalmedia.com
The problem is that most likely you did not give "rate1" an instance name (in the properties panel) and/or mc an instance name.
Reading the code goes like this...
Inside the symbol "mc", (movie clip or whatever) there is another symbol, "rate1", and onRelease, do the function.
But when you drill down like that, both symbols must have instance names.
Best wishes,
Eye for Video www.cidigitalmedia.com
Well, for once the trace works fine, so the instance names should be fine. I checked anyway, and they look fine. The movieclip was created thusly (code not written by me):
Code:
var mc : MovieClip = mcContent.attachMovie("mcPlaylistButton", "mcPlaylistButton" + i, i);
Bookmarks