PDA

View Full Version : New scrollpane in MX2004 - Where has setscrollcontent gone :(


Immulsifier
09-11-2003, 01:04 PM
Lo Gang

As in the title looking at the helpfiles for the new Flash MX2004 there is no set scrollcontent any more to attach our movieclips with. Looking at the helpfiles we now have ContentPath which looks as though it does the same thing however according to the helpfiles you cannot attach something other than a img from the net, another swf file or an item from the library into the scrollpane.

If we are pulling stuff in from a database we used to create an empty movie clip and then use setscrollcontent to put that into the scrollpane. What can we do now? Surely there must be a method for this but at the moment I cant see it/find it in the helpfiles.

Any help would be appreciated :)

hangalot
09-13-2003, 06:05 AM
look for an xml file called uicomponents.xml in your flash instalation folder, there is the interface definitions (or some of them?) for the scrollpane component.

i pasted the interface xml here as well, so excuse the nasty look!


- <folder name="Properties" id="Properties" tiptext="ScrollPane properties" version="6">
<string name="content" tiptext="Returns the content of the ScrollPane" helpid="3932" text=".content" object="[mx.containers.ScrollPane]" version="6" />
<string name="contentPath" tiptext="Specifies the name of the MovieClip, JPEG or SWF to be loaded" helpid="3021" text=".contentPath" object="[mx.containers.ScrollPane]" version="6" />
<string name="enabled" tiptext="Specifies whether component accepts user-interaction" helpid="3952" text=".enabled" object="[mx.containers.ScrollPane]" version="6" />
<string name="hLineScrollSize" tiptext="The number of pixels to move upon clicking the horizontal scrollbar's arrows" helpid="3025" text=".hLineScrollSize" object="[mx.containers.ScrollPane]" version="6" />
<string name="hPageScrollSize" tiptext="The number of pixels to move upon clicking the horizontal scrollbar's track" helpid="3027" text=".hPageScrollSize" object="[mx.containers.ScrollPane]" version="6" />
<string name="hPosition" tiptext="The pixel offset into the content from the left edge" helpid="3429" text=".hPosition" object="[mx.containers.ScrollPane]" version="6" />
<string name="hScrollPolicy" tiptext="Specifies if horizontal scrollbar is on, off or automatically adjusts" helpid="3028" text=".hScrollPolicy" object="[mx.containers.ScrollPane]" version="6" />
<string name="maxHPosition" tiptext="the maximum offset into the content from the left edge, not the right edge of content" helpid="3276" text=".maxHPosition" object="[mx.containers.ScrollPane]" version="6" />
<string name="maxVPosition" tiptext="the maximum offset into the content from the top edge, not the bottom of content" helpid="3275" text=".maxVPosition" object="[mx.containers.ScrollPane]" version="6" />
<string name="numChildren" tiptext="Returns the number of children" helpid="3400" text=".numChildren" object="[mx.containers.ScrollPane]" version="6" />
<string name="scaleX" tiptext="Specifies the horizontal scale factor" helpid="3974" text=".scaleX" object="[mx.containers.ScrollPane]" version="6" />
<string name="scaleY" tiptext="Specifies the vertical scale factor" helpid="3975" text=".scaleY" object="[mx.containers.ScrollPane]" version="6" />
<string name="scrollDrag" tiptext="If true, enables mouse scrolling of the content with a hand-cursor" helpid="3993" text=".scrollDrag" object="[mx.containers.ScrollPane]" version="6" />
<string name="vLineScrollSize" tiptext="The number of pixels to move upon clicking the vertical scrollbar's arrows" helpid="3024" text=".vLineScrollSize" object="[mx.containers.ScrollPane]" version="6" />
<string name="vPageScrollSize" tiptext="The number of pixels to move upon clicking the vertical scrollbar's track" helpid="3026" text=".vPageScrollSize" object="[mx.containers.ScrollPane]" version="6" />
<string name="vPosition" tiptext="The pixel offset into the content from the top edge" helpid="3430" text=".vPosition" object="[mx.containers.ScrollPane]" version="6" />
<string name="vScrollPolicy" tiptext="Specifies if vertical scrollbar is on, off or automatically adjusts" helpid="3029" text=".vScrollPolicy" object="[mx.containers.ScrollPane]" version="6" />
</folder>
- <folder name="Methods" id="Methods" tiptext="ScrollPane methods" version="6">
<string name="addEventListener" tiptext="Adds a listener for an event" helpid="3958" text=".addEventListener(% %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="createClassObject" tiptext="Creates a sub-object using its class name" helpid="3961" text=".createClassObject(% className:Function, id:String, depth:Number, initobj:Object %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="createObject" tiptext="Creates a sub-object using its symbol name" helpid="3960" text=".createObject(% linkageName:String, id:String, depth:Number, initobj:Object %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="destroyObject" tiptext="Destroys the specified object" helpid="3962" text=".destroyObject(% id:String %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="getBytesLoaded" tiptext="Returns the number of bytes loaded of the ScrollPane content" helpid="3020" text=".getBytesLoaded(% %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="getBytesTotal" tiptext="Returns the size of the ScrollPane content in bytes" helpid="3019" text=".getBytesTotal(% %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="getChildAt" tiptext="Returns the child at the specified position" helpid="3403" text=".getChildAt(% childIndex:Number %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="getFocus" tiptext="Returns the component that currently has focus" helpid="3953" text=".getFocus(% %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="getStyle" tiptext="Gets the style value associated with the style property" helpid="3965" text=".getStyle(% styleProp:String %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="handleEvent" tiptext="Handles all events" helpid="3032" text=".handleEvent(% %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="invalidate" tiptext="Marks an object to be redrawn on the next frame interval" helpid="3966" text=".invalidate(% Void %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="move" tiptext="Moves the object to the specified location" helpid="3970" text=".move(% x:Number, y:Number, noEvent:Boolean %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="redraw" tiptext="Redraws an object immediately" helpid="3971" text=".redraw(% bAlways:Boolean %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="refreshPane" tiptext="Reload content and refresh the pane" helpid="3994" text=".refreshPane(% Void %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="setFocus" tiptext="Sets focus to this component" helpid="3956" text=".setFocus(% %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="setHPosition" tiptext="The pixel offset into the content from the left edge" helpid="3022" text=".setHPosition(% position:Number %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="setSize" tiptext="Resizes the object to the specified size" helpid="3976" text=".setSize(% w:Number, h:Number, noEvent:Boolean %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="setStyle" tiptext="Sets a style value for the specified style property" helpid="3978" text=".setStyle(% %)" object="[mx.containers.ScrollPane]" version="6" />
<string name="setVPosition" tiptext="The pixel offset into the content from the top edge" helpid="3023" text=".setVPosition(% position:Number %)" object="[mx.containers.ScrollPane]" version="6" />
</folder>
- <folder name="Events" id="Events" tiptext="ScrollPane events" version="6">
<string name="complete" tiptext="complete event" helpid="3931" text=".addEventListener("complete", % %);" codehint="false" version="6" />
<string name="draw" tiptext="draw event" helpid="3963" text=".addEventListener("draw", % %);" codehint="false" version="6" />
<string name="focusIn" tiptext="focusIn event" helpid="3950" text=".addEventListener("focusIn", % %);" codehint="false" version="6" />
<string name="focusOut" tiptext="focusOut event" helpid="3951" text=".addEventListener("focusOut", % %);" codehint="false" version="6" />
<string name="keyDown" tiptext="keyDown event" helpid="3954" text=".addEventListener("keyDown", % %);" codehint="false" version="6" />
<string name="keyUp" tiptext="keyUp event" helpid="3955" text=".addEventListener("keyUp", % %);" codehint="false" version="6" />
<string name="load" tiptext="load event" helpid="3968" text=".addEventListener("load", % %);" codehint="false" version="6" />
<string name="move" tiptext="move event" helpid="3969" text=".addEventListener("move", % %);" codehint="false" version="6" />
<string name="progress" tiptext="progress event" helpid="3935" text=".addEventListener("progress", % %);" codehint="false" version="6" />
<string name="resize" tiptext="resize event" helpid="3972" text=".addEventListener("resize", % %);" codehint="false" version="6" />
<string name="scroll" tiptext="scroll event" helpid="3426" text=".addEventListener("scroll", % %);" codehint="false" version="6" />
<string name="unload" tiptext="unload event" helpid="3980" text=".addEventListener("unload", % %);" codehint="false" version="6" />
</folder>

sleekdigital
09-14-2003, 10:32 AM
what else would you want to attach? I know in MX you could use an MC that was already on the stage, but it seemed buggy to do it that way. You could just attach an empty MC from the library and build your scroll content from there by attaching things to scrollpaneInstance.content

-s

Immulsifier
09-14-2003, 05:12 PM
Thats exactly what I have done sleekdigital :)