|
-
[RESOLVED] removing a dynamic scrollpane
Hi,
how do you remove a scrollpane created dynamically?
I have tried a couple of ways but can't find any examples on the net.
Code:
this.createObject("ScrollPane", "cspScrollPane", this.getNextHighestDepth());
this.destroyObject("cspScrollPane");
will not work and adding a listener like the one example in flash 8 won't either.
I know you could create it inside a empty clip and then get rid of the clip, but I'd like to know if there's a way for the sake of learning.
-
.
Hi,
PHP Code:
attachMovie("ScrollPane", "cspScrollPane", _root.getNextHighestDepth());
removeMovieClip("cspScrollPane");
// or removeMovieClip(cspScrollPane);
-
thanks, but it's not a clip I'm mentioning. I'ts a component.
-
.
Hi,
PHP Code:
this.createObject("ScrollPane", "cspScrollPane", this.getNextHighestDepth());
destroyObject("cspScrollPane");
-
-
.
Hi,
Do you have a scrollpane component in your library, if not, drag one to the stage and then delete it.
Perhaps attach your fla if you have no success
Last edited by fruitbeard; 12-15-2012 at 11:09 AM.
-
hi,
done the same as you in the code and have a scrollpane component in the library. Have also tried to follow the commented out example replacing ("my_ti") with my component's instance nAttachment 73983ame and no luck either.
-
.
Hi,
You need to publish for Flash player 9 minimum. Then Hey Presto.
-
Hi again,
There's got to be a way in Flash 8. Can't publish to player 9
-
.
Hi,
Oddly enough it works if you publish for flash player 6 or 9 and above, but not for 7 and 8. Bizare.
-
I'll try it on 6, thanks for the help
-
Solved destroying object
hi, Fruitbeard,
I managed to find a way to destroy the component object publishing in flash player 8. Like so (if you're interested):
Code:
this.createEmptyMovieClip("scrollPaneContainer", this.getNextHighestDepth());
this.scrollPaneContainer.createClassObject(mx.containers.ScrollPane, "cspScrollPane", 20);
scrollPaneContainer.cspScrollPane.setSize(680, 560);
scrollPaneContainer.cspScrollPane.contentPath = "image";
button_btn.onRelease = function():Void {
scrollPaneContainer.destroyObject("cspScrollPane");
}
but I find myself with a final problem before beeing able to finish my page. When the component is in the library, this scripted menu I have based on (http://flashexplained.com/menus-inte...rop-down-menu/) freezes when rolling the mouse out. I was wondering if you might have any idea why this could happen... I don't know much about developing, never really used debugging so I wouldn't know what to look for, but it shows a focusmanager variable or object that made me think whether I should keep trying to read about it or try building my own scroll pane with a mask or somehow. Do you have any idea about if changing the focus could make any difference?
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|