Sie sind nicht angemeldet.

  • »sachagriffin« ist der Autor dieses Themas

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

1

Mittwoch, 16. Juli 2014, 02:18

local attribute scope not working in html5 with onloaded

Quellcode

1
		<layer name="social_facebook"	zorder="3"  url="%SWFPATH%/skin/facebook_64.jpg"	onover="tween(scale,1.1,easeOutBounce);" onout="tween(scale,1,easeOutBounce);"	align="lefttop" edge="center"	x="100"	y="89"	onloaded="txtadd(onclick,'blink();delayedcall(1,hidewindows();openurl(http://www.facebook.com/sharer.php?u=',get(tour_link),',_blank);)');"	/>


No go in html5

replacing onclick with layer[social_facebook].onclick works fine, tracing onclick in the same stroke traces fine, but the onclick for the layer is really empty. Also this layer is a child.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

2

Mittwoch, 16. Juli 2014, 07:31

Hi,

right there is a small difference here from Flash to HTML5 - the local scope itself is working, but access to local scope attributes is only possible when the attributes are already existing. In Flash the layer event attributes like onclick, ondown, onup, ... are already predefined (with null as initial value), but in HTML5 (currently) not. There these attributes will be created first when setting them in the xml.

As workaround you could add an onclick="" to the <layer> xml, then attribute will be defined and the code will work in HTML5 too.

This will be fixed in the next release. Then the HTML5 version will behave like the Flash version.

Best regards,
Klaus