Hi,
I have a problem with a scrollarea created dynamically in a container, all in another container.
It's for a sliding and drop-down menu. I don't see the parameter(s) that cause it to crash.
It also flickers sometimes.
Without the scroll everything is fluid but I can't see my entire submenu with the height of the layer I chose....
All this for the "Canal du Centre" in the end.
Note that in the scrollarea an arrow is supposed to be clearly visible and allows you to return to the main menu. We only see a small bit of it at the top right.
I also have trouble setting it
The project : https://multimedia.damienlachas.com/barrage_reservoir_360/
Layers
<layer name="BlocNavCanal" type="container" keep="true" parent="bigBlocNav" visible="true" enabled="true" capture="true" handcursor="true" cursor="cursor" capturewheel="true" scalechildren="true" zorder="" align="bottomright" edge="bottomright" x="60" y="5" rotate="0.0" width="425" height="325" scale="1" bgroundedge="0" bgcapture="true" alpha="0" bgcolor="0xffffff" bgalpha="0.5" bgborder="0 0x5E93FF 1" onloaded="tween(alpha, 0.8);" ondown="draglayer();" enablechildren="true" maskchildren="true" >
<layer name="navCanal" type="container" keep="true" parent="BlocNavCanal" visible="true" enabled="true" capture="true" handcursor="true" cursor="cursor" maskchildren="true" scalechildren="true" zorder="1000" align="topright" edge="topright" x="0" y="0" rotate="0.0" width="425" height="325" scale="1" bgroundedge="0" bgshadow="" bgcapture="false" alpha="0.8" bgcolor="0x000000" bgalpha="1" bgborder="0 0x5E93FF 1" onloaded="tween(alpha, 0.8);" />
<layer name="navBarrage" type="container" parent="BlocNavCanal" keep="true" visible="true" enabled="true" capture="false" handcursor="false" cursor="cursor" maskchildren="true" scalechildren="true" zorder="2000" align="topright" edge="topright" x="-100%" y="0" width="425" height="380" scale="1" bgcapture="false" alpha="0" bgalpha="1" bgborder="0 0x5E93FF 1" bgcolor="0x000000" onloaded="tween(alpha, 1);" enablechildren="true" >
<layer name="scroll" type="scrollarea" width="425" childmargin="20" x="300" align="right" edge="right" scrolltype.desktop="smooth" scrolltype.tablet.or.mobile="inertia" direction="v" draggable="true" mwheel="true" capturechildren="true" autoscrollbars="null,vscrollbar_grip,10" onhover_autoscrolling="false"
flow="true" flowspacing="20" flowoverflow="true" flowchildren="v" >
<layer name="retourNavCanal" type="image" parent="navBarrage" url="skin/fleche.png" keep="true" visible="true" enabled="true" capture="true" handcursor="true" cursor="pointer" zorder="3000" align="right" edge="right" x="30" y="30" width="45" height="45" rotate="180" scale="1" bgcapture="true" onover="tween(colorize,0xbcff3c );" onout="tween(colorize,0xffffff );" alpha="1" capturefocus="true" onclick="ReverseTranslationBlocNavCanal();" />
</layer>
</layer>
<!-- Non scrolling layers (scrollbars, buttons, ...) here: -->
<layer name="vscrollbar_bg" type="container" align="right" width="16" height="100%">
<layer name="vscrollbar_grip" type="container" align="righttop" width="8" x="4" height="16" bgcolor="0xbcff3c" bgalpha="0.5" bgroundedge="7" bgcapture="true" />
</layer>
</layer>
Display More
Style of layers in scrollarea
<style name="styleTitreCanal" type="text" parent="navCanal" visible="true" keep="true" zorder="100" enabled="true" alpha="1" scale="1.0" autowidth="true" padding="10" vcenter="true" wordwrap="false" handcursor="true" bgcapture="true" capture="true" align="topleft" edge="topleft" x="10" height="25" bg="true" bgalpha="0.0" bgborder="0" mergedalpha="true" onloaded="tween(alpha, 1);"
css="font-family:Raleway; font-size:18px; text-align: left; color:0xffffff;"
onover="set(css, font-family:Raleway; font-size:18px; text-align: left; color:0xbcff3c;);"
onout="set(css, font-family:Raleway; font-size:18px; text-align: left; color:0xffffff; );" />
<style name="styleListeBarrage" type="text" visible="true" keep="true" zorder="100" enabled="true" alpha="1" scale="1.0" scaley="1" autowidth="true" padding="10" vcenter="true" wordwrap="false" handcursor="true" bgcapture="true" capture="true" align="topleft" edge="topleft" x="10" height="40" bg="true" bgalpha="0.0" bgborder="0" bgroundedge="0" mergedalpha="true" onloaded="tween(alpha, 1);"
css="font-family:Raleway; font-size:18px; text-align: left; color:0xffffff;"
onover="set(css, font-family:Raleway; font-size:18px; text-align: left; color:0xbcff3c;);"
onout="set(css, font-family:Raleway; font-size:18px; text-align: left; color:0xffffff; );" />
Function
<-- panoramagroup is my own xml attribut -->
<action name="getNomBarrage" args="nomDuCanal" scope="local">
set(hauteur,30);
for(set(i,0), i LT panoramagroup.count, inc(i),
removeLayer(get(panoramagroup[get(i)].title));
if(panoramagroup[get(i)].canal === get(nomDuCanal),
set(layer[titreCanal].html, get(panoramagroup[get(i)].canal));
translationBlocNavCanal();
addlayer(get(panoramagroup[get(i)].title));
assignstyle(layer[get(panoramagroup[get(i)].title)], 'styleListeBarrage');
set(layer[get(panoramagroup[get(i)].title)].parent, 'scroll');
set(layer[get(panoramagroup[get(i)].title)].html, get(panoramagroup[get(i)].title));
set(layer[get(panoramagroup[get(i)].title)].x, 20 );
inc(hauteur, 30);
set(monPano, get(panoramagroup[get(i)].linkedscene));
txtadd(appelload, 'loadscene(', get(panoramagroup[get(i)].linkedscene), ,null,MERGE,BLEND(0.5));');
copy(layer[get(panoramagroup[get(i)].title)].onclick, appelload );
);
);
</action>
Display More
I hope i'am clear ... and that I have given enough elements
Thanks for your help,
Damien