Problems related scrollingtextfield

  • Engineers Hello, in the case concerning scrollingtextfield use can not be achieved in practice, is to have both a hot spot in each scene, click on the hot text box pops up, each scene separately display different text, and buttons shut down.
    One problem: in tour.xml, it has been added to a button, but click = "" how to write?
    Second problem: the case of the XML file how to call?
    Question three: each scene has character, how these words are concentrated in one file and call? .


    Thanks for help My e-mall:2210509@163.com

  • Copy the following code to tour.xml scenario can be realized click on the pop-up text box hot scene, as if each scene so the code too much, how only into a hot spot in the code tour.xml, Other external file into another go?


    <hotspot name="text_spot1" url="%FIRSTXML%/skin/book.png" ath="0" atv="0" onhover="showtext(显示文字,STYLE4);" scale="0.5" onclick="switch(layer[textfield].visible)" />
    <layer name="textfield" visible="false" zorder="2" url="%FIRSTXML%/skin/textfield.png" align="center" x="0" y="0" width="50%" height="300" scale9grid="6|6|268|188">
    <!-- the scrolling text -->
    <layer name="textmask" type="container" align="lefttop" x="5" y="5" width="-30" height="-10" maskchildren="true">
    <layer name="textscroller" url="%FIRSTXML%/plugins/scrollarea.swf" alturl="%FIRSTXML%/plugins/scrollarea.js" mwheel="true" direction="v" overscroll="0" align="lefttop" width="100%" height="100%" onscroll="if(hoverflow GT 0, div(yp,toverflow,hoverflow);Math.min(yp,1);Math.max(yp,0); copy(th,layer[scrollbar].pixelheight);sub(th,layer[scrollup].pixelheight);sub(th,layer[scrolldown].pixelheight);sub(th,layer[scrollslider].pixelheight); mul(yp,th);add(yp,layer[scrollup].pixelheight); copy(layer[scrollslider].y,yp); );">
    <layer name="text" url="%FIRSTXML%/plugins/textfield.swf" align="lefttop" x="0" y="0" width="100%" autoheight="true" background="false" border="false" onautosized="copy(layer[textscroller].height, height);" padding="10 15"
    html="data:text-01"
    css="color:#000000; font-family:Arial; font-size:14px;"
    />
    </layer>
    </layer>
    <!-- the scrollbar -->
    <layer name="scrollbar" type="container" bgcolor="0x000000" bgalpha="0.25" align="righttop" x="5" y="5" width="19" height="-10">
    <layer name="scrollup" url="%FIRSTXML%/skin/dirbutton.png" align="righttop" x="19" rotate="-90" crop="0|0|19|19" onovercrop="0|19|19|19" ondowncrop="0|38|19|19" ondown="asyncloop(pressed, layer[textscroller].scrollby(0,+1));" />
    <layer name="scrolldown" url="%FIRSTXML%/skin/dirbutton.png" align="rightbottom" x="19" rotate="+90" crop="0|0|19|19" onovercrop="0|19|19|19" ondowncrop="0|38|19|19" ondown="asyncloop(pressed, layer[textscroller].scrollby(0,-1));" />
    <layer name="scrollslider" url="%FIRSTXML%/skin/sliderbutton.png" align="righttop" x="0" y="19" crop="0|0|19|19" onovercrop="0|19|19|19" ondowncrop="0|38|19|19" ondown="if(layer[textscroller].hoverflow GT 0, copy(cy,y);copy(sy,mouse.stagey);dragging(); );" dragging="if(pressed, sub(dy,mouse.stagey,sy);add(ny,cy,dy);Math.max(ny,layer[scrollup].pixelheight); copy(th,layer[scrollbar].pixelheight);sub(th,layer[scrolldown].pixelheight);sub(th,layer[scrollslider].pixelheight);Math.min(ny,th); copy(y,ny); sub(ny,layer[scrollup].pixelheight);sub(th,layer[scrollslider].pixelheight);div(ny,th); copy(fh,layer[textscroller].hoverflow); mul(fh,-1); mul(ny,fh); layer[textscroller].stopscrolling(); copy(layer[textscroller].y,ny); delayedcall(0,dragging()); );" />
    </layer>
    <layer name="text_close" type="image" url="%FIRSTXML%/skin/btnClosePanel.png" visible="true" zorder="1" align="righttop" x="20" y="265" scale="1.0" alpha="1.0" onhover="showtext(关闭,STYLE4);" onclick="set(layer[textfield].visible,false);" />
    </layer>
    <-! The text for testing ->
    <Data name = "text-01">

    <P> Along with the warm spring in March, this morning, a lecture entitled "Beautiful Taiwan" Taiwan masters of modern classical art exhibition in the Museum of Fine Arts and the majority of mainland Chinese audience. Exhibition by the Chinese Culture Association, China Federation of Taiwan Compatriots, Taiwan Cultural Center Foundation, the China Art Gallery, co-sponsored by China National Art Gallery. </ P> </ data>

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!