You are not logged in.

  • "sachagriffin" started this thread

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

1

Wednesday, July 16th 2014, 2:18am

local attribute scope not working in html5 with onloaded

Source code

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

Wednesday, July 16th 2014, 7:31am

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