-
1. Re: gotoAndPlay in Javascript?
kglad Feb 2, 2014 8:21 AM (in response to jiggy1965)1 person found this helpfulthose are both actionscript snippets. the first is as2 which createJS can't handle. the second is as3 which createJS can handle.
your second snippet would work with flash cc html5 publishing IF you used quotes and double quotes that flash recognizes.
-
2. Re: gotoAndPlay in Javascript?
jiggy1965 Feb 2, 2014 12:56 PM (in response to kglad)don't think so? If you look at the article:
http://blogs.adobe.com/flashpro/2013/12/18/actionscript-to-html5-flashpro-cc-2/
It clearly says that the used actionscript is commented after export to html5 and to be replaced with the javascript variants.
It seems more likely to me that the createJS javascript library is using javascript functions named after the actionscript commands which make the html5 file do the same thing like originally programmed in actionscript. I know it's not typically javascript, things like gotoAndPlay. But I'm guessing that they have copied the actionscript functionally of typical actionscript commands into functions written in javascript code. Functions which, in javascript, do the same thing in html5 like the actionscript does in flash.
So - I think - it's not that createJS reads actionscript (both as2 and as3 are commented after export), but that it makes the exported html5 read the typical actionscript commands as javascript. So, I you know what I mean, the html5 file sees the javascript command, or rather the recreated createJS javascript function 'gotoAndPlay' and executes that createJS javascript function. The function which, programmed in typical javascript syntax, makes the object do the same thing in html canvas or whatever as it's actionscript/flash counterpart.
Am I correct in thinking this way?
-
3. Re: gotoAndPlay in Javascript?
kglad Feb 13, 2015 6:45 AM (in response to jiggy1965)1 person found this helpfulthere have been a series of revisions and refinements to createJS since it was first introduced. when the author wrote that blog, things probably worked whatever way he states. currently, the code you posted works perfectly well.
here's your code in a fla: http://www.kglad.com/Files/forums/test9.fla
when i publish the html page, i see no problem: http://www.kglad.com/Files/forums/test9.html // (click the rectangle and you should be taken to a frame with an oval)
-
4. Re: gotoAndPlay in Javascript?
www.123bee.com Jan 28, 2015 8:32 PM (in response to jiggy1965)Hi i am using flash professional CC and i have generated one flash html5 canvas output and i want to check that output in ios devices,
so how can i check it? should i generate ipa? pls help me i am stuck here
-
-
6. Re: gotoAndPlay in Javascript?
kglad Feb 13, 2015 6:46 AM (in response to Pat481)you're welcome.