Scrollpane Component Styling
Ok, I've got so far as to style my scrollbar in the Scrollpane component by editing the themes dragged into the fla library. I want to give the scrollthumb ( ie. the bit that you click and drag ) a different colour to the scrolltrack. Problem is this: no matter how I edit the theme movie clips they always end up being the same colour. I have even tried setting the component instance styles in the actionscript - but no change.Does anyone have any experience with this, have any ideas/clues on how to solve the problem please? All I've read on the net is that the Scrollpane component is a nightmare to customise, and so far I have to concur.
Adobe > Flash General Discussion
Posted on: 09/03/2007 08:22:46 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Custom Component Styling Help
Hi
i'm trying to create a component , everything is working so far , except for one problem.
i had my class inherit from the FUIComponents Class so i could easily use skins in my component.
i have a skin called window_mc
it has three skin elements. i used something like
component.registerSkinElement(background_mc, "background");
to register them.
i have added this to the first frame in the timeline
mycomponent.setStyleProperty("background", 0x000099);
and it works ! the thing turns blue.
the problem now is if i add 2 instances of the component on the stage.
if i then set the components to 2 different colors
they will show the correct 2 different colors in my live preview movie but not when i publish it. both the component will have the same color if you test the movie.
if have tested alot , the components have other variables that do work with more than 1 instance. even alpha works seperate , only the styles are messed up.
i know that this is probably a what the **** is this guy saying to a lot of people , but i'm hoping some of you actually know what i'm talkin about
here is the link to the fla if you want to check it out
http://users.pandora.be/dreams/component_test.fla
here is a link to the html if you just want to preview it
http://users.pandora.be/dreams/component_test.html
so to summarise :
the components colors work inside the fla , but not when you view the swf. in the swf they all have the same color.
i'm not totally expecting an answer on this one , but sure am hoping :-)
Styling 04's Button Component
currently the mouseover highlight is green, which doesnt work too well with most sites designs / colour schemes ...
so how would i change the green highlight to blue?
More Component Skinning/styling ?'s
more component skinning/styling ?'s
I cant seem to find out how to:
1.) change my drop down box to have SQURE corners instead of the halo ones.. I want 'simple' ones I guess..
2.) cant figure how to change the BORDER of the comboBox..I can change it for the drop down of the comboBox..but not the comboBox itself.
and 3.. I still cant figure out how to change the scrollbar in the tree component.
PLEASE..anyone..throw me a bone here..
Styling Button Component
How do you style a button Component(how ever you spell it)?
I want to chang the default text and size.
Styling List Component
Hi guys, I am looking to style the list component and I haven't been able to do what I am looking for.
Is there anyway to control the height of each line? IE: I need to condense the line height so the list isn't so spread out. I find that there is too much room above each item in the list.
Also, there is a left-margin that I would like to get rid of.
Any tips or links regarding re-styling the list component would be of great help. Thanks!
List Component Styling Question
Hey everyone,
I'm currently skinning and styling a List component. I'd like the text color of the items to change on a rollover but I'm not sure what the most efficient way of doing that is. I guess I could setup event listeners and use change the cellRenderer property when the event is triggered but that seems like reinventing the wheel to me. Is there an easier way to do it?
I thought of extending the CellRenderer but I do not know what methods to overwrite to include changing text color. Any ideas?
Targeting/Styling Items In List Component
Hello all,
This question specifically deals with AS3 and list components.
I've got an XML/Flash Video player that lists the videos with a thumbnail and description in a list component. I got the source files from an Adobe tutorial: http://www.adobe.com/devnet/flash/ar..._playlist.html.
I'm able to style everything the way I want it. The problem comes when I try to attribute a specific text style to a selected item. I understand how the information is being taken from the XML and looped into the list component. What I don't get is how you reference a particular item in the list and whether or not you can attribute a different style to that item when the event listener fires.
Here's the AS code referring to the event listener for a selected item:
Code:
public function initMediaPlayer(event:Event):void {
var myXML:XML = new XML(xmlLoader.data);
var item:XML;
for each(item in myXML.vid) { // populate playlist.
var thumb:String;
if(item.hasOwnProperty("@thumb")>0) thumb = item.@thumb;
tileList.addItem({label:item.attribute("desc").toXMLString(),
data:item.attribute("src").toXMLString(),
source:thumb});
}
tileList.selectedIndex = 0; // Select the first video.
tileList.addEventListener(Event.CHANGE, listListener);// Listen for item selection.
myVid.source = tileList.selectedItem.data;// And automatically load it into myVid.
myVid.pause();// Pause video until selected or played.
}
// Detect when new video is selected, and play it
function listListener(event:Event):void {
myVid.play(event.target.selectedItem.data);
//DEFINE STYLES FOR SELECTED ITEM
textStyleOn = new TextFormat();
textStyleOn.font = "Arial";
textStyleOn.color = 0x97b9f9;
textStyleOn.size = 10;
// HERE'S WHERE I'D LIKE TO REFERENCE THE ITEM SELECTED
// AND CHANGE IT'S STYLES. QUESTION IS, HOW DO I REFERENCE
// ONLY THIS LIST ITEM?
}
In the interest of full disclosure, there's another AS file being referenced that grabs the thumbnailed images for the list
Yo!
Targeting/Styling Items In List Component
Hello all,
This question specifically deals with AS3 and list components and styling a selected item, if that's even possible.
I've got an XML/Flash Video player that lists the videos with a thumbnail and description in a list component. I got the source files from an Adobe tutorial: http://www.adobe.com/devnet/flash/ar..._playlist.html.
I'm able to style everything the way I want it. The problem comes when I try to attribute a specific text style to a selected item. I understand how the information is being taken from the XML and looped into the list component. What I don't get is how you reference a particular item in the list and whether or not you can attribute a different style to that item when the event listener fires.
Here's the AS code referring to the event listener for a selected item:
Code:
public function initMediaPlayer(event:Event):void {
var myXML:XML = new XML(xmlLoader.data);
var item:XML;
for each(item in myXML.vid) { // populate playlist.
var thumb:String;
if(item.hasOwnProperty("@thumb")>0) thumb = item.@thumb;
tileList.addItem({label:item.attribute("desc").toXMLString(),
data:item.attribute("src").toXMLString(),
source:thumb});
}
tileList.selectedIndex = 0; // Select the first video.
tileList.addEventListener(Event.CHANGE, listListener);// Listen for item selection.
myVid.source = tileList.selectedItem.data;// And automatically load it into myVid.
myVid.pause();// Pause video until selected or played.
}
// Detect when new video is selected, and play it
function listListener(event:Event):void {
myVid.play(event.target.selectedItem.data);
//DEFINE STYLES FOR SELECTED ITEM
textStyleOn = new TextFormat();
textStyleOn.font = "Arial";
textStyleOn.color = 0x97b9f9;
textStyleOn.size = 10;
// HERE'S WHERE I'D LIKE TO REFERENCE THE ITEM SELECTED
// AND CHANGE IT'S STYLES. QUESTION IS, HOW DO I REFERENCE
// ONLY THIS LIST ITEM?
}
In the interest of full disclosure, there's another AS file being referenced that grabs the thumbnailed images for the list
Yo!
Styling Text In A List Component (or Components In General)
Hey,
I need to style a list to have the following format (it lists a bunch of products)...
A
then a bunch of products that start with the letter A
B
then a bunch of products that start with the letter B
C
then a bunch of products that start with the letter C
and so forth... I think you get the idea
The letters A,B,C, etc need to have their own line as well as their own font size, as well as be centered in the list.
How can I achieve this effect?
BTW all my data will come from a XML file.
Loading Component Inside Scrollpane Component
Hello,
Can anyone help me out in adding a scrollpane on to the screen through actionscript and after that adding any component inside the added scrollpane component.
Thanks in advance.
[Component] Targeting Flash 6 ScrollPane Component
Hey All,
Been a while... hopefully somebody can provide some insight into what I am missing here.
I have a Flash 6 ScrollPane - yes, I know it's old, but it is also easy to do custom skinning. I had data loading into it from the library by using createEmptyMovieClip and then attachMovie to grab an MC from the library.
This all worked fine until I had to place the ScrollPane into a MC in the library, dynamically attach it to the stage and then assign the content. Now I can only get my content MC to display on top of the ScrollPane, not in it. Here is a sample:
ActionScript Code:
function showPop(popType) {
popContainer = _root.createEmptyMovieClip("popWindow_mc", 350);
popWindow = popContainer.attachMovie("pop", "pop_mc", 1);
popWindow.pop_sp.boundingBox_mc._visible = false;
popScrollClip = popWindow.createEmptyMovieClip("scrollClip_mc", 400);
popScrollContent = popScrollClip.attachMovie("scrollMC_disclaimer", "scrollContent_mc", 1);
popWindow.pop_sp.setScrollContent(popScrollClip);
};
"pop" is the linkage name of the MC that contains the ScrollPane and "scrollMC_disclaimer" is the linkage name of the MC that is the content to be scrolled.
Any ideas as to what I am missing? Any help is greatly appreciated. Thanks in advance!
ScrollPane Component
Hi Folks
Got this one Problem with the ScrollPane. I've got one Movieclip as Content. Inside this MC another MC is placed which creates dynamically textfields as many as an array has values.Just as shown in the Script below. Well it all works fine but the big Probelm is that the Scrollpane doesn't react on the Content there are not shown any Scrollbars, although the Textfields are overlapping the Size of the ScrollPane.
Has anybody an Idea how this could work?
ActionScript:
----------------------
list=[several values];
function buildList() {
var Content = display.getScrollContent();
trace(Content);
spacing=30;
var i =-1;
while (++i<list.length) {
name="infoBar"+i;
y=i*spacing;
Content.list.attachMovie("infoBar",name,i),
Content.list[name]._y = y;
Content.list[name].sentence.text=list[i];
}
}
buildList();
Help On ScrollPane Component
Hello,
My project is to create a bird eye view of a map with zoom in and zoom out facility using ScrollPane Component.
What i am doing is .... passing the map movieclip as a parameter to 'scroll content' and creating a panel with few buttons when on clicked will increase the size of the map movieclip (using the ._xscale and ._yscale method).
The problem is that when i increase the size of the map movie clip using the buttons scroll properties of the ScrollPane Component dont change.
anyone can help me on this...
Regards,
Sid
[Edited by Sid☼ on 08-05-2002 at 07:10 AM]
The ScrollPane Component
Hello ,
Can anyone explain or point me to a good tutorial on how to use this, i want to put a few movie clips or pictures in a ScrollPane component
How To Set Up ScrollPane Component
I have searched and been through the help files, to figure out how to get the scroll pane compnonent to work, maybe I am tired??????
It says to add the your MC to the Scroll Content in the Properties box, if so, how do you add multiples? meaning how to seperate them? While putting these names in is it the linkage name assigned to the MC?
Basically is there any Action Script to go along with this? A tutorial would be nice.
Scrollpane Component
Place a button inside a movieclip. Use the scrollpane component to display the movie clip. The buttons don't work???
Anyone have any info on this?
I want to create a scrolling menu of thumbnails using the scrollpane component, but if the buttons won't work...
thanks
ScrollPane Component?
Hello everyone,
I'm trying to setup a table(consisting of a number of text boxes) in FlashMX. I'd like to make this table scrollable.
I convert my table(containing text boxes) into a movieclip, and then attach a ScrollPane component to it. Uptil here, it seems ok. When I test the movie, the movieclip scrolls, but it is also displayed outside the scroll area.
I've experienced this with text boxes only. As long as I put a movieclip(e.g. containing a .jpg image) into the scrollbox, there is no problem, i.e. it shows the image only inside the scrollarea.
You can check out the attached file.
Any ideas??
Thanks,
Omer
Scrollpane Component
i can't work out how to make the background of the scrollpane component transparent. it is always white, even if the background of the movieclip it is scrolling is transparent.
does anyone know how i can make it seethrough, or some other way of scrolling a movieclip? (what i am actually trying to do is scroll up and down a list of buttons)
cheers
-bart
Help With Scrollpane Component
I have a form inside a scrollpane component. the form has input text fields and combo boxes. the problem is that I cannot tab through the text fields and combo boxes, it seems that hte scrollpane it's self gets the focus?
has anyone else had this problem?
ScrollPane Component
I noticed that the if I use the ScrollPane component and try to publish using the Flash Player 5 the component does not work. Do these components only work if somebody has the Flash Player 7? Is there a way to make the Scroll Pane or Text Area components work in the Flash 5 Player?
Thanks
Scrollpane Component?
I have a Movie clip that scrolls within the scrollpane component.
In this movie clip, i have radio buttons but only one of them shows up.
Why..ohh..whyy does only one of the radio buttons show up?
Scrollpane Component
hi, i have flash mx 2004.
can someone please tell me how i can edit the scrollpane component.
Scrollpane Component
Hello all,
I would like to scroll an MC using the scrollpane component. I've searched many forums for an answer but I haven't been able to find anything that explains how to use this component. I'm using FlashMX 2004 Pro.
Can anybody explain it to me or show me the way to a good tutorial?
thanks
ScrollPane Component: Help
Hi, I am hoping that someone can help me with this. I am trying to creat a basic scroll pane which will contain text. I have followed these steps so far:
1. I made the .swf file (sampletext.swf) that will be the content of the scroll pane
2. In a new movie clip, I dragged the ScrollPane component from the components menu to the stage.
3. In the scroll pane's properties panel, I named the instance "biotext"
4. In the parameters tab, I typed "sampletext.swf" in the contentPath field.
5. In the movie clip's timeline, I selected the 1st frame and typed in this code in the actions panel:
scrollListener = new Object();
scrollListener.scroll = function (evt){
txtPosition.text = biotext.vPosition;
}
biotext.addEventListener("scroll", scrollListener);
completeListener = new Object;
completeListener.complete = function() {
trace("sampletext.swf has completed loading.");
}
biotext.addEventListener("complete", completeListener);
That's all I have done. I am not sure what else to do.
SOS,
Sabrina
Scrollpane Component
I would like to remove the box around the scrollpane component. Is that possible and how.
Thanx
k
How To Use The Scrollpane Component?
Hey Everyone,
Quick question. How to I complete the following task? Is the Scrollpane the best way?
In the website listed below you will see text that fits in a space below the navigation. The client wants additional text there. I want to keep the large S (i think it is called a drop Cap) and have it scroll with the rest of the text.
I want to add scrollable text to the following website David Furman Architecture
I created all the text in flash including the large "S" at the beginning. This is composed of 3 text boxes. I want this to be scrollable. Can I make this a movie clip and place this into a scrollpane?
If so, how do you do it?
Thanks for your help,
THS2000
Help For Scrollpane Component
Hi All,
I am using the scroll pane component for flash mx 7.2 well I have used it successfully but there is a problem when I open the fla and publish it by pressing ctrl+Enter is works fine that is it displays the scrollable buttons but the problem is when I try to play the stand alone swf it doesnt display anything (neither the scroll ar nor the buttons clip) plz help me out of this...
And another problem is I am at my office at the moment and I cant upload the fla file from here .I'll be very thankful if anyone solves the problem..
Using ScrollPane Component
I am having trouble with the scrollPane component. I placed this code in a movieclip with linkage name of "container_mc" Then I placed an instance of the scrollPane on the stage and set the content path to "container_mc". When I test the movie, my code executes but the scrollPane does not work.
code:
MyLoadVars = new LoadVars();
MyLoadVars.load("temp.txt");
MyLoadVars.onLoad = function(success) {
if (success) {
trace("loaded");
//trace(this.Folder0);
for (i=0; i<=24; i++) {
//trace(i);
//clip = "clip"+i;
_root.attachMovie("Folder_mc", "clip"+i, i, this.getNextHighestDepth());
_root["clip"+i].name.autoSize = true;
_root["clip"+i].name.text = this["Folder"+i];
_root["clip"+i]._x = 20;
_root["clip"+i]._y = 20+(i*20);
//trace(this["Folder"+i]);
_root["clip"+i].i = i;
_root["clip"+i].onRollOver = function() {
trace(this.name.text);
//trace(this._width);
//_root.scrollPane.redraw(true);
scrollPane.redraw(true);
};
}
} else {
trace("not loaded");
}
};
[F8] Add ScrollPane Component
Attached is the image of what I'm trying to do. I want to add a scroll bar to the thumbnails on the left - which will be buttons to produce the larger image on the right.
When I open the Components panel and click the UI Components and drag a scrollPane comp9onent onto the stage and then select the parameters tab I'm confused about the contentPath. My thumnail images are six buttons lined up vertically in one movie clip. I don't have them moving; they are all in one frame and the mc is titled "thumbs." But if I put just "thumbs" in the contentPath field nothing shows up in the scroll box. It says you can put a .jpg, .swf, clip, or movie in there so if it were just one image I guess it would be thumbs.jpg. But it's a movie clip. So I'm not sure what the full path name is. I tried writing the entire path:
Macintosh HD:Userswner:documents:blog:site:dogs.fla:thumbs but that didn't work.
I hope this is enough info for someone to help me. Thanks.
Alex
ScrollPane Component
Hi Everyone,
I have movieClips in a scrollPane that I am using as buttons. What I want to do is when the main timeline reaches a frame have the color of the button change. I can get it to work outside the scrollPane. But when I attach it to the scrollPane I can get the path right to control the movieClip inside tyhe scrollPane. I gave the movieClip and the scrollPane instance names.
For example the path I was using is myScrollPane.myMovieClip.myButton.chenges color.
Any help would be greatly appreaciated.
Thanks
Mike
Help With ScrollPane Component
I have a very large diagram on a flash project, so I decided to use the ScrollPane component to display it
I used a pair of buttons to scale the movieClip inside the ScrollPane,although the drag function worked just fine, the scrollbars didn't adjust to show the contents properly.
Is there a scriptable property of the component that I must change to correct it?
Scrollpane Component
I am working on the "Scrolling Dynamically Loaded Text" tutorial and i have gotten to the part were you drag the Scrollbar Component from the component window.. I am using MX2k4 and the component is not there just the scrollpane component.. when i drag this onto the text box as instrucked it does not snap as the tutorial sayes it should but rather make a box and truns the tex box into a dotted line box ... please help what am i doing wrong
New Scrollpane Component - Max It's Use
Hi
Anybody here know how to use the new scrollpane on dynamically created movieclips? This can easilly be done using the previous version of the scrollpane component using the setScrollContent() class. I tried using the mySP.contentPath = "myPath"; but it doesn't do it. What I'm trying to achieve is to attach movie clips to the stage and have them scrolled by the scrollpane. I don't know what to do I can seem to make it work. Please help?
ScrollPane Component
I am using a gif in the scrollpane component, when I scroll to the right it seems to chop off the end of the gif.
Is the a limit as to how wide the gif can be?
Thanks for your help.
John
ScrollPane Component
Hi,
I have problem working with the Flash Mx 2004 Pro ScrollPane Component.I would like to scroll the contents combinations of text and image.
1) I have created a new symbol and add the desired text and graphic (named symbol 1)
2) Later I add scrollPane Component and enter the contentpath as Symbol 1
3) Everything went smoothly accept that I coudn't get the content to align correctly in the container - the content are always align to the left no mater how I resize the scrollpage container.
How could I work this arouns, Can anyone please help me.
Using The ScrollPane Component
hi everyone, i am a new kirupa user and i have just recently been using mx 2004, i am wondering if anone could help me with a problem....i am trying to use the new scrollpane feature in mx 2004 and i am wondering what how to call a library item into the window......not sure where to put the code or what to call the item in the library to get it into my scrollpane window.
much love and thanks for ya help peeps, have a good day!
mr blair
How To Us Scrollpane Component?
I just need some help with how to make a scrollbar in flash work on images as well as text. I sore the scrollpane component and was wondering if thats how i do it - but im still not sure...
Scrollpane Component Help
Hi - i have used the scrollpane component and it works fine with my movieclip that i have attached to it. Although i was wondering is there a way to skin the scrollbar of the scrollpane component at all????
I know you can do it with the scrollbar for a dynamic text box but can u do it with the scrollpane component??
ScrollPane Component.. MX
ScrollPane Component.. MXis there a way when using the ScrollPane Component to have the background transparent.. so you do not have the white background, but in turn.. you still have the scroller? the vertical scroller.
is this possible.. please help.
i do not know what to do.. i am trying to make a scroller for some book cover images.
if anyone has anyother ideas on how to do this. that would be great...
thank you.
its greatly appreciated.
Help With The ScrollPane Component Please
Hi and thank you for reading my thread.
I have used the scrollpane component in a flash animation in order to integrate it into a website so that I can scroll text in a smaller area. The problem that I have is that with scrollpane, you import an image into your library which you can then scroll in the animation. Now the actual problem is that I need certain text in the scroll area to be a hyperlink to another site. You can include hyperlinks in an image.... Any ideas how I could solve this? Or maybe another way of doing the same thing I am trying to do with the scrollpane?
You can see what I mean here:
http://www.ahproyectos.com/haus/haus.htm
Its a website I am designing and in the scroll section in the middle, I would need to set hyperlinks for the images etc...
Thank you all for your help!
Scrollpane Component
Is it possible to change the background color of a scrollpane. I've got the compnent working great, but I'd like to NOT have the back of the scroll pane be transparent. Is it possible?
THanks,
Jamie
ScrollPane Component
I've looked around and didn't see anything about this so I thought I'd ask.
Anyone know how to manipulate the style of the scrollpane component?
Does this involve Action script or can it be adjusted on the stage (color of bar, track, etc.)?
The parameters don't seem to do a whole lot other than the basics and a Google search doesn't give a whole lot of information either.
any help would be mucho-appreciato.
thanks!
ScrollPane Component
Hi,
I was wondering if you could mask a ScrollPane component, so that a piece of the movieclip you're scrolling is not visible ( see the screenshot I've attached, that little bit of text on the left bottom of the frame should be invisible )
I've tried to do this, but appearently the mask is just being ignored or somethin', dunno. And how do you like the screenshot ?
Scrollpane Component
hey all i can't seem to add content to my scroll pane which is located in an mc on the main stage i have the content path set in the parameters dialogue box as flashContent....
flashContent = a movieclip with linkage set to "flashContent"
i have tried this above and this code such as:
scrollPane.contentPath = "flashContent";
and that doesn't work can anyone please help me asap please
thankyou in advance
Scrollpane Component
I have a few questions today...
1. How do I use actionscript to attach multiple movieclips into a scrollpane.
2. I have a long dynamic text box in those movieclips and an undefined characters of text. I would like these movieclips to overlay those empty parts of the movieclip (no text).
I would appreciate suggestions or links to tutorials. Thanks very much
ScrollPane Component
Hi:
I have created an external swf with some actionscript for some interactions. Then, i have loaded it into scrollPane component using scrollPane property - contentPath. However, after i loaded it into scrollPane component, the actionscripts that i have written for the interactions won't work. I hope someone here can help me to solve it. Thanks.
ScrollPane Component Help
I ham having trouble keeping track of multiple items that I add to my scrollPane called room. One item in the room works farily well but when two or more are added, I can only work with the last item added and none of the others. Can anyone help me with this?
ActionScript Code:
var myXML:XML = new XML();myXML.ignoreWhite = true;libraryList_ar = new Array();combo_list.dataProvider = libraryList_ar;myXML.onLoad = function(success) { if (success) { //trace(this); var libraries = this.firstChild; var dValue = this.firstChild.attributes.name; //trace(dValue); combo_list.textField.label.text = "Library"; var libCount = libraries.childNodes.length; //trace(libCount); var libItems = libraries.firstChild.childNodes.length; //trace(libItems); for (var i = 0; i<libCount; i++) { //libraryList_ar[i] = libraries.childNodes[i].childNodes[0].firstChild.nodeValue; libraryList_ar[i] = new Object(); libraryList_ar[i].label = libraries.childNodes[i].attributes.Text; libraryList_ar[i].data = libraries.childNodes[i]; //save reference here } }};myXML.load("itemMenu.xml");//myXML.load("myXML.xml");//loading_txt.autoSize = true;loading_txt.text = "";loading_txt._visible = false;// resize loading images to thumbnail sizevar MAX_WIDTH:Number = 50;var MAX_HEIGHT:Number = 50;//var mcl:MovieClipLoader = new MovieClipLoader();var mclListener:Object = new Object();mclListener.onLoadInit = function(mc:MovieClip) { loading_txt.text = "Loading..."; // set variables to keep the original image dimensions var xw = mc._width; var xh = mc._height; // // where image width is greater than image height if (mc._width>mc._height) { mc._width = MAX_WIDTH; mc._height = (mc._height*MAX_WIDTH)/xw; // center image mc._y = (75-mc._height)/2; } //where image height is greater than image width if (mc._height>mc._width) { mc._height = MAX_HEIGHT; mc._width = (mc._width*MAX_HEIGHT)/xh; mc._x = (75-mc._width)/2; } // // loading_txt._visible = false;};//_global.count = 0;//combo_list.change = function(eventObj) { thumbs.invalidate(); thumbs.refreshPane(); // var selItem:Object = eventObj.target.selectedItem; //trace("Item selected was: "+selItem.label); var itemXML:XMLNode = selItem.data; //use saved reference to iterate through childNodes for (var idx = 0; idx<itemXML.childNodes.length; idx++) { trace("Item includes: "+itemXML.childNodes[idx].attributes.Text); var t_mc:MovieClip; t_mc = thumbs.content.attachMovie("thumb_mc", "thumb"+idx, idx, this.getNextHighestDepth()); t_mc._x = 5; t_mc._y = 5+(idx*80); //this loads the swf into the thumbs scrollPane _root["mc"+idx] = new MovieClipLoader(); _root["mc"+idx].addListener(mclListener); _root["mc"+idx].loadClip("decals/"+itemXML.childNodes[idx].attributes.ItemSWF+".swf", t_mc.Container_mc); //_root["mc"+idx].loadClip(itemXML.childNodes[idx].attributes.ItemSWF+".swf", t_mc.Container_mc); // t_mc.idx = idx; t_mc.piece = itemXML.childNodes[idx].attributes.ItemSWF; // t_mc.onRelease = function() { //trace(this.now) // this adds the item to the room var tmp:MovieClip = room.content.createEmptyMovieClip("myLoader"+count, count+100); count++; mcl.loadClip("decals/"+this.piece+".swf", tmp); //mcl.loadClip(this.piece+".swf", tmp); tmp._x = 100; tmp._y = 100; trace("tmp= "+tmp); _global.temp_mc = tmp; }; }};combo_list.addEventListener("change", combo_list);//clear_btn.onRelease = function() { //trace(count); count--; room.content["myLoader"+count]._visible = 0; //room.content.temp_mc._visible = 0; if (count == -1) { mx.controls.Alert.show("The room is empty!"); count = 0; }};//room.content.onPress = function() { temp_mc.startDrag();};room.content.onRelease = function() { temp_mc.stopDrag();};
Help With ScrollPane Component
Hi Guys,
I'm fairly new to action script/Flash and was wondering if thgere is anybody out there who can tell me how I can go about populating a scrollPane component with movieClip objects or graphics?
Many thanks
PrinceTaj
|