ActionScript 3.0 :: Flash MovieClip With Scrollpane - ListMC?
Dec 20, 2010
I have setup a flash MovieClip with a scrollpane in it, and another MovieClip that run's a FOR loop to create a list of buttons dynamically. I have the script pull the dynamic MovieClip and load it as a source to the scrollPane but the scrollbars are not appearing. To make sure that the scrollpane was working, I added an event listener to the scrollpane that when I clicked it it will run scrollPane.invalidate() and the scrollbars will pop on.
So here's my problem/question: If I'm dynamically adding a listMC to this scrollPaneMC, how do I get listMC to throw the invalidate() to the parent scrollPaneMC? Here's another way to look at it: Root adds a child scrollPaneMC. ScrollPaneMC uses listMC as a source from the library. listMC run's its FOR loop and dynamically creates a list and appears in the scrollPaneMC, but no scrollbars.
View 1 Replies
Similar Posts:
Oct 16, 2011
what I'm trying to do is accessingsnapText = scrollPane.source.textSnapshot;from an external swf. I've tried:
trace("-->: "+scrollPane.source.textSnapshot.getText(0, 1000));
trace("-->: "+myLoader.content.textSnapshot.getText(0, 1000));
trace("-->: "+mc.textSnapshot.getText(0, 1000));
[code].....
View 3 Replies
Jun 23, 2011
I have a ScrollPane component to stage and I give it as source a new MovieClip instance. How can I access the movieclip inside scrollpane? This is what I have so far but it returns null:
var regForm = new RegistrationForm();
regForm.name = "rForm";
regFormSP.source = regForm;
var form = Object(regFormSP.content).getChildByName("rForm");
trace(form) // returns null
[Code]..
There is an object "instance20" as a parent to rForm...Why is that?
View 1 Replies
May 9, 2011
I'm using a movieClip inside a ScrollPane to show a list of CheckBoxes. The amount of CheckBoxes shown is dynamic, it depends on a SQL query. After the query is done, I add as many CheckBoxes as rows in the result set. What I am trying to do is to access some methods I wrote in the MovieClip inside the ScrollPane to get the length of the CheckBoxes, check which ones are selected and the label they have (their label is also defined by the SQL query).
I've tried this
valueINeedToGet = Object(root).scrollPaneInstance.source.functionINeedToRun();
But it returns error #1006
How can I access the code inside the MovieClip inside the ScrollPane?
View 1 Replies
Feb 13, 2012
I'm a beginner actionscripter, so I hope you will take that into account when replying. The problem I am having is that a client has asked me to place a call to action button inside a textbox that scrolls. My idea was to create a movieclip containing the text and the button, then place that movieclip inside a scroll pane. I've been monkeying around with it all day and have made minimal headway. I'm not even sure of the best way to accomplish this.
If one of you learned actionscripters out there could point me in the right direction, perhaps I can find my own solution. The client wants me to use custom icons for the scrollbars, and as altering a scrollbar component seems like such a PIA, I'm trying to avoid using components.
View 2 Replies
Nov 22, 2010
I haven't been able to find a non-hack way to use Drag and Drop with the AS3 ScrollPane component.
Here's what I'm doing:
I create a container mc, which I then add a bunch of children to. The children are what I want to drag.
However, dragging is constrained to the boundaries of the ScrollPane. This seems to me like a limitation of the ScrollPane component.
I know it can be worked around with attaching a dupe mc to the cursor pos, then manipulating other mcs on mouse up, but..
View 1 Replies
Oct 13, 2003
is it possible to get an "absolute" X and Y for _root.dropDown1MC.listMC.item?As is stands, I'm placing dropDown2MC on the stage using the following code:
[AS]_root.attachMovie("dropDown2", "dropDown2", 30, {_x:_xmouse, _y:_ymouse});[/AS]
and that gets it on the stage, but it doesn't function as I need it.In a perfect world, I'd like to place dropDown2MC at the X and Y of item, BUT, there is a mask to only show a certain area of listMC (it's how I'm making a scrollable dynamically populated list).So, is there a way to get some sort of absolute value, relative to root or something, of item's X and Y coordinates?
View 4 Replies
Feb 3, 2011
Is there a video tutorial that could show me how to easily put a movieclip inside a scrollPanel using Flash CS4 ?
View 1 Replies
Oct 4, 2011
i have a xml , swf and html page.i want to give path of xml via flashvars. i am using scrollpane component to display the data dynamicly but it doesn't work in html page.
View 0 Replies
Jun 29, 2005
I've got a scrollpane (the UI component), inside wich I've got an mc. How could I "talk" to that mc inside the scroller? I ask this because the scrolled mc ha no instance name, but comes straight from the library, so something like this wont work:
scroller.myMc.play()
View 1 Replies
Dec 21, 2004
In the first frame of my main movie I include a AS file. In that as file there is a MC attached from the liberary named 'shoutbox_holder'. In the shoutbox_holder mc I attach 5 movieclips 'window1', 'window2'.. also from the library. This works very well, because I see the mc's in the debug mode.
shoutbox_holder
|_window1
window2
window3
..
I want the 'shoutbox_holder' to attach to a scrollpane, so I did drag a scrollpane to the main stage from the componentspanel, deleted it and drag a instance from the library to the stage, then In the contentpath field I insert 'shoutbox_holder' (pointing to the mc created in the as file). But this will not work 'I already tried different paths' but nothing!
View 3 Replies
Feb 16, 2011
I have a MovieClip inside a ScrollPane. Inside this MovieClip i have buttons. What i want to know is: how to click a button inside a Movie Clip, that is inside a scrollpane, and make it load a swf outside the scrollpane?
View 2 Replies
Mar 30, 2010
import fl.containers.ScrollPane;
recentMsg_bt.addEventListener (MouseEvent.CLICK,resentMsgClick);
var sp:ScrollPane = new ScrollPane();[code].......
Everything works just fine, except for the last msg gets only half displayed as if the scrollpane wouldn't scroll to the end.
View 3 Replies
Jun 29, 2009
I have an XML file that loads into flash and is dynamically displayed on the stage. What I cannot figure out is how to add a scroller to the movieclip so that when the data from the XML file is larger (overlaps the stage) then the content would be scrollable. I have checked and searched for about 1-2 hours and have came up with nothing.
View 5 Replies
Sep 7, 2010
I need to get my main swf A to tell the swf B (swfB is my scrollpane content or source) to gotoAndStop at frame 2 but it doesn't communicate.Here is my code on my main swfA:
Code:
function xbutton (e:MouseEvent):void {gotoAndStop("p1");MovieClip(sp.content).gotoAndStop(2);}
button.addEventListener (MouseEvent.CLICK, xbutton);
Here is my code on frame 2 in swfB:
Code:
stop();
SoundMixer.stopAll();
to better visualise what i am doing; swfA is my website with lots of pages, swfA has one page* that holds my scrollpane, inside my scrollpane is swfB with a flPlayback (*this page is the tv page). when I exit the tv page to another page on my website the tv must stop. swfB has my flPlayBack on frame 1, frame 2 is blank (no tv).
Ps: The code in swfB works fine independently! I know this because tested it by adding a button (when pressed it goes to frame 2 and the code does stop the tv).
View 1 Replies
May 6, 2009
I have attached a movieclip with several frames on it. Onclick of a button I change the frame of the movieclip and stops it.
Code:
_mv.addEventListener(MouseEvent.CLICK, function(_e:Event){
MovieClip(_scp.content).gotoAndStop(_frm);
});
But the scrollbars are not adjusting according to the height of the content. How can I do that.
View 1 Replies
Jul 17, 2009
I have a MC that is too tall for my stage and want to place it inside a ScrollPane. The probelm is accessing functions inside the MC. I have tried scrollpane.content.mc.function but that doesn't work. How do you access a mc inside tghe scrollpane?
View 12 Replies
Sep 8, 2009
I have a Scrollpane with a movie clip inside of it and am trying to link to a frame in a parent movie clip and keep getting an error. I am linking it the same way I do any other links. I was using this code.
stop();
import flash.events.MouseEvent;
//-------------Home Button
home_btn.addEventListener(MouseEvent.CLICK, homeClick);
function homeClick(event:MouseEvent):void{
MovieClip(parent).gotoAndStop("home");
}
Is there something special I have to do because its linking to a frame FROM a scrollpane? Never done this one before.
View 4 Replies
Apr 19, 2010
how to build a button inside a movieclip. I have a template that has movieclips within movieclips, and when I create a button (all using AS2) the button will work if I test the scene, but in the whole flash movie it does not work. I also have some buttons located inside a ScrollPane that also do not call correctly.
For my button I am using this code:
facebookbtn.on (release) {
getURL("http://www.facebook.com/","_blank","GET");
}
[Code]....
^ This also does not work, with or without the button name before on(release).
View 1 Replies
Apr 19, 2010
I'm trying to understand how to build a button inside a movieclip. I have a template that has movieclips within movieclips, and when I create a button (all using AS2) the button will work if I test the scene, but in the whole flash movie it does not work. I also have some buttons located inside a ScrollPane that also do not call correctly.
For my button I am using this code:
facebookbtn.on (release) {
getURL("http://www.facebook.com/","_blank","GET");
}
[Code].....
^ This also does not work, with or without the button name before on(release).
View 1 Replies
Jun 29, 2010
I have a couple buttons that work outside of the ScrollPane but don't work within it. This is my exact code, how do I get them to work?
scrollPane.source = myContent;
scrollPane.setSize(173,500);
K1Button.addEventListener(MouseEvent.CLICK, playVid);
function playVid(e:MouseEvent):void{
myVideoPlayer2.myFLV2.source = "video/K.mp4";
[Code] .....
View 6 Replies
Nov 12, 2009
I'm in desperate need of some help here. I've been working on a website for months and I'm so near the end, but I just need to rectify one problem (and judging by my google searches for the past two days, it seems to be quite a common problem). I'm pretty much a novice/beginner when it comes to actionscript and need some help to figure this out.I have a movie clip (called 'CLvertlist_mc') which is simply some text and buttons. This movie clip has been placed inside a scrollpane, which sits inside another movie clip ('Client list 2'). Also sitting inside 'Client list 2' is a third movie clip called 'clientlist_mc', which has a few different labelled frames in it.Now, I want to get the buttons in 'CLvertlist_mc' to link to the labelled frames in 'clientlist_mc'. At the moment I've put an actions layer in 'Client list 2' with the following actionscript:[code]'clb_cch' is the instance name of one of the buttons in 'CLvertlist_mc', and 'SM' is one of the frame labels in 'clientlist_mc'. I keep getting a 1120 'access of undefined property' error.
View 3 Replies
May 12, 2011
I have a scrollpane who's source is a movieclip filled with checkboxes.It works fine, except that some of the checkboxes names are cut off.The checkboxes are for science words.Biology is fine Astromony comes out Astronom with the y cut off. Adjusting the scrollpane width does not help Adjusting the movieclip width makes it look bizarre like it's stretched.
View 0 Replies
Aug 28, 2006
I would like to set the content of a scrollpane to a dynamically generated movieclip.
I am authoring in Flash 8, publishing to FP8.
View 3 Replies
Jun 29, 2010
I have a couple buttons within a movie clip of a ScrollPane that are not working. This is my exact code, how do i get them to work?
***************************
scrollPane.source = myContent;
scrollPane.setSize(173,500);
K1Button.addEventListener(MouseEvent.CLICK, playVid);
[code]....
View 1 Replies
Jan 10, 2004
I create a super simple .fla using flash MX 2004 professional. I put this code under the button I created.
on (release) {
var mc = _root.createEmptyMovieClip("trianglemajor", 1);
mc.createEmptyMovieClip( "triangle", 5000);
with (mc.triangle) {
lineStyle (5, 0xff00ff, 100);
[Code] .....
I just see a blank screen when I click on the button. My objective is to show the movieclip mc inside my created scroll pane?
View 3 Replies
Oct 2, 2011
Im trying to make a flash map game.Now i have got items in a Movieclip and want this Movieclip into a scrollpane component but i have got probs cause the dragging dont go outside of the scrollpane.
Here is my Code
container.mc_item.buttonMode = true;
container.mc_item.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
function onDown(event:MouseEvent):void {
[Code].....
View 1 Replies
Oct 27, 2011
im currently working on building a search app which allows filtering of a list of products.
NOTE: shift+leftClick to drag and reorder the lists, just left click to use scrollbars and buttons.
[URL]
here is a preview of the stage as it is at the moment.
when the scroll pane is created (dynamically) i also create a new instance of my own class which is as follows . . . (the content for the scrollpane)
ActionScript Code:
package {
import flash.display.*;
import flash.events.*;
[Code].....
holding shift and clicking allows you to drag the scroll panes into a different order. clicking one button in each of the scroll panes works fine. if you try clicking a second button in either of the scroll panes you will notice you have to click twice.
View 0 Replies
Apr 7, 2012
I am using ScrollPane component of as2.0, but I want to move the scrollPane left an right by clicking external button does it possible? this button can work like the functionality of LeftArrow anf RightArrow in scroll pane.
View 1 Replies
Nov 23, 2009
I have a scrollPane component set up with a long form in it. When a user gets to the bottom he can submit the form, the button then navigates him away from the scrollPane. If the user comes back to the scrollPane, the content in the scrollPane is scrolled all the way to the bottom where they clicked away. How do I reset the content so if they return to the form, the top of the form is visible in the scrollPane instead of the bottom of the form?
View 1 Replies