Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Adding Labels Associated With A List



i am using:
ActionScript Code:
vidList.addItem({Label: " first path showing ", data: "../myflash/vid/path1.flv"});
The list and buttons work, the videos play - however my labels are not showing on the buttons even though i have added a label to each video as shown above...anyone know whats going wrong?



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 01-18-2009, 11:22 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

List (array) Of Labels
Hello

I want to get in an array every labels of a mc. How can do that?

Thanks.

Help Please - Problems With List Component Labels
I am working with a list component and for some reason when i try to add labels
to the list they are not displaying when i run the swf file. The list works as far as loading the videos into the flv player but no labels are displayed in the list.

There are no errors ive checkedthe code and verified it on the Adobe site and its as it should be. I can only think im missing something else somewhere along the lines. Ive included a sample and would be very greatful if anyone could help me out with this.

The list component is in my library. I have the following code

//creates a new instance of the list box
var vidList:List = new List();
//sets position of list component
vidList.x = vid.x + vid.width + 50;
//sets the size of the list component
vidList.y = 100;
vidList.width = 200
vidList.height = 200;

//this is the code i am using to try and attach the labels
vidList.addItem({label:"Rhubarb Crumble", data:"flvs/Rhubarb Crumble.flv"});

Cheers

Liam.

How To Decrease Labels Size Of List Box In Flash
Will any body tell how to decrease labels size of list box in flash?

XMLConnector + List Labels - Only Shows Node?
hi.

so my XML looks like this:

<root>
<level1>
<level2>
<level3-array-start->
<name text="Dolphins"/>
</level3>
<level3-next-part-in-array->
...


i've setup an XML Connector and imported the schema. i made a binding at "<root><level1><level2><level3(array-start)" and applied it to a list box (out, data provider). i went to the list and set the formatter to 'rearrange fields' and under formatter option, i did "label=name".

The result: the list creates a new line in the label for each part of the array correctly, but each line reads:
<name text="Dolphins"/>
<name text="Whales"/>
etc.

i've tried all kinds of other options in the "label=" field (label=name.text, label='<name><text>', etc.)

my question: is there a way to tell the formatter option to go deeper into the array for the label name? or do i have my whole thing setup wrong?

thanks.
fractionsound

Adding Labels On RollOvers
Hey yall on kirupa
Im trying to add labels that appear under the mouse pointer when it rolls over a zone (eg : button, duh...), like help bubbles you see in HTML websites.
I know this is easily done with HTML, and I was just wondering if such a thing could be done with flash.
I bet you guys know the answer to this question...EASILY!!
SeeYa's...

Adding Frame Labels Dynamically?
Is it possible to add a frame label dynamically? I want to be able to add a #p dynamically to a frame so that the user can print the current page that they are on. Is that possible or is there another way to go about this.
Thanks

Adding Links To Combobox Labels
Hi there,
I have read some tutorials about how to add links to the ComboBox component.
Ok, I have the Labels and the Data (with URLs in them).
But they don't work!
Some said:
Click on the combobox and go to the actiontab, there, paste this code:
on (change) {
getURL(eventObj.target.value , "_self");
}

The problem is that when publishing it I get the error:... mouse event incorrect
or something like that.
How can I make my links work?
Thank you

Adding To An List
My question is this:

I have

1 input box
1button
1 Dynamic text box

what I want to happen is:

when text is entered into the input box and the button is clicked a varible is passed into the Dynamic text box and breaks to the next line

so if I enter in "one" then "two" then "three"

the output would be

one
two
three

Is there a way to do this without duplicating a movie clip ?

Adding Random Mcs From List
if i have a group of mc's eg. monster1 ... monster10

what do i need to do to add a random one to the stage and then repeat the process but without picking the same one twice?

i have 8 spots and would like to add code to the frame so that each time it loads the program will load a different mc to each spot but not repeat. im wondering whether this can be done with a few lines of code or whether it will require a lot of extra time.

what is the best method?

List.addItem() Not Adding At End
Hey guys,

I've spent the better part of an afternoon puzzling over this one, and now I'm plain out of ideas. It's a simple problem to explain: I have a ListBox, which I'm dynamically adding items to with actionscript. According to the specs, List.addItem() should add the item to the end. Always. But in my case, it doesn't.

I'm doing nothing unusual, I simply run this piece of code from a button (okay, it's changed a bit, but this is the basic idea):


Code:
function test()
{
for (i=0; i<10; i++) {
my_lb.addItem(i);
}
}
This should result in 10 elements, 0 through 9 - listed in that order. But every time I run it, I get a different order. Can anybody think of any reason for this?

My Flash document is a large one, but I've searched the code and there's nothing that should interfere with this.

When I create a fresh document with the above code, it works fine.

[I've also tried using addItemAt(), but this doesn't work either.]

I'm running Flash Professional 7.2. Any suggestions...?! I'm SO stumped.

CD-ROM: Adding Products In A List
Hi there,

I want to make a cd-rom where products can be added to a list by clicking a button >>ADD<<(temporary cart, only when the projector file is active), and after you choosen all your products, it should be possible to print the list.  Can I do this with actionscripting?  I am using Flash MX 2004 (not pro).

Thanks in advance,

regards,

d2c

Adding New Commands To Right-click List?
Quick question: how can I add the "scale" and "rotate and skew" commands to the right-click list rather than having to go to transform every time to use them?

Adding Items To A List And Submitting
Hey all.. new to actionscript.org so like to say thanks in advance.

I am creating a flash based site for a software company and want some help creating kinda like a mini shopping cart.

I love this site and if anyone thinks they know what is involved here I would love to know so i can research it further.. here is the site i think is great http://www.foxtel.com.au/Step1Main.aspx

It is so simple... Click on the package you like.. adds it to a list with a price update. unelect it and it subtracts from the price.. add one or multiple packages and it totals up the lot...

THen i guess it submits the results to a database or email.. For my purposes.. an email would be fine.. but DB even better.. i can work that side out though..

So if anyone thinks they can subtract what actionscript is being used to create this flash file I would love to hear from ya... Or if anyone has already got something similar let me know and we can work out a swap or somehting...

Thanks again..

Later SKaters

Adding Link List Component
I just read the tutorial on this site called "Making Life Easier With XML" by Hasan Otuome. I was just wondering what code I would need to add to make each state linked to a URL. So that if you select a specific state, then a new window opens up to that URL. I know it involves href, but I'm completely new to this. Any help would be appreciated. The code from the tutorial is below.

//create all the variables you'll need
var i:Number;
var nodes:Array = new Array();
var states:Array = new Array();
var stateDP:Array = new Array();

//setup your XML connection
var sXML:XML = new XML();
sXML.ignoreWhite = true;
sXML.onLoad = addStates;
sXML.load("states.xml");

//let the fun begin
function addStates(){
//use the "nodes" array to refer to the xml kiddies
nodes = this.firstChild.childNodes;
for (i=0; i<nodes.length; i++){
//loop through "nodes" and add each "lbl" attribute to the "states" array
states.push(nodes[i].attributes.lbl);
//now fill the comboBox's data provider with the contents of the "states" array
stateDP.addItem({label:states[i], data:states[i]});
}
}

//bind the comboBox to its data provider
cmbState.dataProvider = stateDP;

XML

<?xml version="1.0" encoding="iso-8859-1"?>
<items>
<item id="1" lbl="AL" />
<item id="2" lbl="AR" />
<item id="3" lbl="AK" />
<item id="4" lbl="AZ" />
<item id="5" lbl="CA" />
</items>

Adding A List To The TextArea Component?
Hi,

Is it possible to add a list style to the areaText component so that my array also contains a bulleted list e.g.:
word 1
word 2
word 3
word 4

Patrick

Adding A Scrolling List Next To FLV Player?
I have a simple one-page website with a single FLV player inside a single SWF inside a single DIV. I'd like to add a scrolling list of titles in the Flash 8 SWF that when clicked will play a related video in the FLV player. What action would that be called so I could search for it? And any pointers to a tutorial would be appreciated.

Thanks,

TW

Dreamweaver 8 Studio/Flash 8





























Edited: 06/18/2007 at 12:35:43 PM by tomwood2

Adding Images To The List Component
Adding Images to the List component while using the FLV PLayback

All, ( i can send you my source files if it would help)

I'm using the FLV Playback component and loading videos into it from an external xml file. I also have a list component tied to the FLV playback that when you click on one of the elements in the list, it plays that movie.

QUESTION:
My question is how do I add an image to the list component? Below is the xml file and the actionscript. I've added the image attribute to the XML file as img="time_square.jpg" and added the element of the array when calling/creating the list. Did I do this right?

Any direction would be very much appreciated.








Attach Code

BEGIN XML FILE

<?xml version="1.0" encoding="iso-8859-1"?>
<playlist>
<video desc="Flash Forward sign" flv="ffSign.flv" img="time_square.jpg"/>
<video desc="Fountain in Vegas" flv="fountain.flv" img=""/>
<video desc="Giovanna in truck" flv="giovanna.flv" img=""/>
<video desc="Gondola at Heavenly" flv="gondola.flv" img=""/>
<video desc="River in Yosemite" flv="river.flv" img=""/>
<video desc="Times Square NYC" flv="timesquare.flv" img=""/>
<video desc="Vernal Falls" flv="vernalFalls.flv" img=""/>
<video desc="Balloons at Flash Forward" flv="balloons.flv" img=""/>
<video desc="Driving to Lake Tahoe" flv="driving.flv" img=""/>
</playlist>

END XML FILE

BEGIN ACTIONSCRIPT

var xml:XML = new XML();
xml.ignoreWhite = true;

list.rowHeight = 70;
//list.cellRenderer = "VideoThumb";
list.selectable = true;

// this onload function creates a node variable and loops
// through each video on the list incremented by 1
xml.onLoad = function() {
var nodes = this.firstChild.childNodes;
for(i=0;i<nodes.length;i++) {
// lists the attributes included in the videos.xml file
list.addItem(nodes[i].attributes.desc,nodes[i].attributes.flv,nodes[i].attributes.img);
}
//still in the onload function, this plays the indexed video number
vid.play(list.getItemAt(0).data);
list.selectedIndex = 0;
}
//loads the xml file that contains the videos to be played
xml.load("videos.xml");
// creates an object for the video list
//plays video from the list that is selected
var lList:Object = new Object();
lList.change = function() {
vid.play(list.getItemAt(list.selectedIndex).data);
count = list.selectedIndex;
}
// event listener that changes the video when user clicks on the list
list.addEventListener("change",lList);
// created object for the list itself
var vidList:Object = new Object();
//creates variable named count and sets initial value to 0
var count:Number = 0;
// when the video list is complete runs function
// to return the list to the first video
vidList.complete = function() {
// if sequential is selected
if(seq.selected) {
if(count == list.length-1) {
count = 0;
}
// else if seq is not selected than use random
else {
count++;
}
}
else {
var temp = count;
while(temp == count) {
count = Math.floor(Math.random()*list.length);
}
}
vid.play(list.getItemAt(count).data);
list.selectedIndex = count;
}

vid.addEventListener("complete",vidList);

END ACTIONSCRIPT

Adding Icon To List Component
Hi all... i need an urgent help

i need to put icons to the list component

i have found List.iconField and List.iconFunction in help but i dont know how to use them... can anyone explain it to me?

thanx for all...

Adding XML Data To List Component
Code:

import fl.controls.*;
import fl.data.DataProvider;

var testXml:XML =
<list>
<a>
<para_name>shabeer</para_name>
<para_text>paragraph text 1</para_text>
</a>
<a>
<para_name>muhammed</para_name>
<para_text>paragraph text 2</para_text>
</a>
<a>
<para_name>ahmed</para_name>
<para_text>paragraph text 4</para_text>
</a>
</list>;

var ParagraphList = new List();
ParagraphList.setSize(140, 150);
ParagraphList.move(33, 55);
addChild(ParagraphList);
ParagraphList.rowHeight = 22;

ParagraphList.dataProvider = new DataProvider(??????);
//here i want to add "paragraph texts" from the xml with out changing the xml

Adding & Removing Items From A List Box
Hi - I am attempting to add and/or remove the selected item in a list box with a remove button. Does anyone know how to target the selected item and remove it?

I am going off of the tutorial from Kirupa.com - advanced Flash MX tutorials - create a list box.

If someone can help, that would be awesome.

Adding Links In An XML File For A Component List
I have a component list that is reading from an xml file. The component list reads and displays the names of chapters of a book. I'd like the user to be able to click on a chapter name, and be able to jump to a new html page. But i don't know how to code in the links into the xml file. Will I need to expand the code in flash and treat the links as nodes? If someone can show me the way, I'd be most grateful! I've attached the files here.

Adding Library Symbols To The Display List
With my current knowledge of AS3... Whenever I wish to add MovieClip from the library to the display list via a NON document Class the only way I can see to attach the asset is by passing in a reference to the document Class then using that reference as a target for addChild(). Like this:


ActionScript Code:
package  {
   
    import DocumentClass;
    import flash.display.*;
   
    public class ThisIsNotTheDocumnetClass {
   
        private var _DocumentClass:DocumentClass;
        private var _LibrarySymbol:MovieClip;
   
      public function ThisIsNotTheDocumnetClass (value:DocumentClass) {
           
            _DocumentClass = value;
           
            // This is an MC from the library
            _LibrarySymbol = new LibrarySymbol();
            _DocumentClass.addChild(_LibrarySymbol);
          }
    }
}

Is there a better or more efficient way to do this?

Thanks

Adding Things In The List Of Flash? (some Extra Text )
well lets see...i have flash movie in a browser...
in the flash movie i have in DYNAMIC TEXT as...
A
B
C
D

kind of a lisst
below it i make an input text field...in which if i enter E and click a button my list will look like this:

A
B
C
D
E

and so on..as i enter F.... any ideas how to get this thing done?

Adding Custom Checkboxes To Mailing List Form.
Thanx to Ryan Gomez for this nice mailing list source: http://www.flashkit.com/movies/Appli...6454/index.php

It's clean and simple and most imortantly, it works!

I was wanting to add 2 sets of 2 checkboxes (of my own design) to the form. And that the info is sent together with the name and email info.

The first 2 are a choice between English or Danish.

And the other 2 are a choice between TXT or HTML

Anyway, my questions are:

1) How to create my own checkboxes (not MM components)
2) How to make it only pick one out of the two
3) How to send this info, along with the rest of the mailing list

Thanx in advance for any help given.

[CS3] Adding Custom Buttons.scripts In Display List
Hi all,
I'm trying to learn how to write Actionscript from scratch vs the reverse engineering I've been doing for a while. Is there a way to create custom buttons in the display list? I'd like to create buttons that will type popular lines like import flash.display.Sprite;

I'd love to just click or drag it over vs type it. I'm either being lazy or efficient, either way I'm just trying to speed up the coding process.
Thanks!

Adding Custom Checkboxes To Mailing List Form.
Thanx to Ryan Gomez for this nice mailing list source: here

It's clean and simple and most imortantly, it works!

I was wanting to add 2 sets of 2 checkboxes (of my own design) to the form. And that the info is sent together with the name and email info.

The first 2 are a choice between English or Danish.

And the other 2 are a choice between TXT or HTML

Anyway, my questions are:

1) How to create my own checkboxes (not MM components)
2) How to make it only pick one out of the two
3) How to send this info, along with the rest of the mailing list

Thanx in advance for any help given.

Grabbing BitmapData Library Item And Adding To Display List
I can't seem to get this to work with BitmapData library items, though it is working for the MovieClip items...

I have a utility function which grabs items from the library

public static function create(className:String):Class
{
return new (ApplicationDomain.currentDomain.getDefinition(cla ssName) as Class);
}


Here is the code i'm using to add the BitmapData to the stage...

var ChromeBackground:Class = Utilities.create("mc_chromeBackground");
var chromeBG_BD:BitmapData = BitmapData(new ChromeBackground());
var bmp:Bitmap = new Bitmap(chromeBG_BD);
this.addChild (bmp);


The BitmapData object isn't showing up on screen. What am i doing wrong??

THANKS in advance!!!
Lori-

Adding/Moving Dynamically Added MovieClips To Display List
I'm stuck in my pursuit of transitioning from AS2 to AS3...

I have a little app that loads in xml and populates a list component on the stage. It is an elearning user interface in which the content is all loaded dynamically via the xml file. All of the content and title/subtitle is working fine. But the problem is with one last feature I want to add...

I have in the library a movieclip that contains just a simple orange box. I set it's linkage to 'ProgressIndicator'. I then, in the code, loop through the number of topics in the list component and for each topic in there I add an orange box (ie, ProgressIndicator) to the stage. This works fine. But the problem is I can't then change any properties of any of the progress indicators. What I want to do is, as the user progresses through the course, as they go through each topic I want to change the alpha property of the corresponding progress indicator on stage. Hopefully this makes sense. Here is a picture of what I'm aiming for:



Here is the code:

Code:

//Store total number of topics (zero-based so deduct 1 to get real num)
var totalTopics:Number = -1;
//Store reference to current progressIndicator
var currentProgress:MovieClip;
//render the number of topics on screen for user to see their progress during module
function renderProgressBar():void {
   //Module progress - for each 'topic' in the listbox add an OrangeBox instance to the stage then highlight progress
   //ref to right-hand side of status bar
   var xStart:Number = 969;
   var yStart:Number = 80;
   //create and instantiate progressIndicators on stage based on totalTopics
   for (var i:uint=0; i <= totalTopics; i++) {
      var progressIndicator:MovieClip = new(ProgressIndicator);
      //render the progressIndicators on stage
      addChild(progressIndicator);
      //change its name to correspond to topic number (zero based!)
      progressIndicator.name = "progressIndicator"+i;
      //position it
      progressIndicator.x = xStart;
      progressIndicator.y = yStart;
      //add space for next indicator
      xStart = xStart - 15;
   }
   //set first progressIndicator's fill to 'in progress' color of orange
   currentProgress = this.progressIndicator0;
   currentProgress.alpha = 0.5;
}

The progress indicators are rendering on stage fine and in the right place, but they are not referenceable via the 'progressIndicator0' or 'progressIndicator1' etc names that I *think* I've assigned them. Help!

Adding Variables To A "favorites" List?
Hello,
I thought I could figure this one out on my own, but I'm stumped. For school I need to make a slideshow (no problems there) but I need to have a choice on each image where the user can click a button to add the image to a favorites list. Then the user needs to be able to launch a custom slideshow with only their "favorite" ones that they chose in it.

Does anyone have any ideas how to approach this problem? Any help is much appreciated.

Thanks!
Jason

Load Xml Data(list Of Names), Use List As Buttons In Flash Possible?
Hi, basically I have a quiz game that I made, the quiz is done but I want to keep track of how many times a person has failed the quiz. I have an XML file that has a list of names. I want to take those names, put them in a quiz game (at the beginning) as a "list" of some sort and let the user be able to choose their own name (which is of course already in the XML file). This name will be used to keep track of how many times they have tried the quiz.

I have successfully loaded the XML file (names) into an ARRAY in Flash but how can I output them to the screen AND let the user be able to choose those from the list? as a button? This will add the count after they clicked their name to +1 and then save it to somewhere(where is best?). I will attach the zipped files (there are 4, the fla,swf,2 XML files[quiz/names]). If anyone can help me ASAP it would be awesome.

Chnage The Font Of Selected Item Color In A List Mx:List
Hi,am Trying to change the font (bold and color) of a selcted item in List..But it is changing the complete list's font..

Here it is my code..
<mx:List id="businessFunctions" left="10" right="10" bottom="10" top="208"
dataProvider="{processList}"
itemClick="select();"
horizontalScrollPolicy="auto"
labelField="@name"/>


ActionScript COde:
private function select():void
{
businessFunctions.setStyle("textSelectedColor","#D 3E9F5");
businessFunctions.setStyle("fontWeight","bold");

var page:XML = businessFunctions.selectedItem.page[0];
var pageID:String = page.@id;
var processID:String = businessFunctions.selectedItem.@id;

server.submit(pageID, processID, RequestMessage.BEGIN);
}



Here i need toc hange the selected item color only..

Separate The List Items With The Separator And List Is Dynamic
Hi,
I am getting the list items dynamically ,and hv to draw a separator after the every group of list items.For this I have to embed a script function after every group.How can i do this Actionscrip 3.0 Any help?

Ex:

Group 1:

ABC
DEF
GHI

TODO-----Here we need to draw a line
Group 2:

123
456
789

TODO-----Here we need to draw a line
Group 3:


abc
def
ghi

Here I have da code:

for each(var group:XML in event.responseMessage.rawXML.group)
{
var pageSection:PageSection = new PageSection();

pageSection.text = group.@name;
pageContents.addChild(pageSection);
trace("***********Group Name: "+group.@name);

// once the section has been added, iterate through it's children and render each field.
// for each(var field:XML in server.currentPage..field)
for each(var field:XML in group.field)
{
var formElement:FormElement = AppCode.FieldRenderer.renderField(field, pageSection);
/* check for null, if for some reason we encounter an unknown control type
* the formElement will not be instantiated so we should skip over it.
*/
if(formElement != null)
{
/* formElement.field = field;
pageSection.addChild(formElement); */

formElement.setRuleDetails = this;
formElement.communicator = this.communicator;

if(event.responseMessage.pageType == PageType.UPDATE || event.responseMessage.pageType == PageType.ADD )
formElement.readOnly = false;

fieldList.push(formElement);
}


}
//Add Separator b/n groups

TODO...Here we need to call a function which draws a line.....}


Plz help me if u have any idea?

Debug > List Objects + List Variables ...
I am testing my flash movie within the flash application. I go up to the toolbar while testing and select 'Debug > List Variables' and then 'Debug > List Objects'. This displays all the variables and all the objects in the trace window. Fairly straight forward!

What I want to do is access these variables and objects at runtime while viewing my flash movie within the browser. So I can make a text field in my movie and populate it with these variables and objects BUT how do I access these from the flash movie ? There must be a way to get the output from 'Debug > List Variables' and 'Debug > List Objects' at runtime and dump it all into a text field on screen.

Can anyone assist please,
Thanks,
Stephen.

Converting Bulleted List To Numbered List
I'm trying to put out a list of questions for a test. I'm also using a stylesheet to format the way the text is displayed. This is the way the list should look like:

1. question#1 text.............................................. ......

2. question#2 text.............................................. ......

If more than one line of text per question, it continue on the next line indented. The text for each question needs to be looking like a block of text. The same way a bulleted list displays.

This format can be created by using the <ol>, <li> tags in HTML. But Flash doesn't recognize any style formats for the <li> tag. Only a bulleted list is printed out. How can I format that list into a numbered list? or if not how can I create the same output, keeping in mind that I have to use a stylesheet? Thanks.

Debug > List Objects + List Variables ...
I am testing my flash movie within the flash application. I go up to the toolbar while testing and select 'Debug > List Variables' and then 'Debug > List Objects'. This displays all the variables and all the objects in the trace window. Fairly straight forward!

What I want to do is access these variables and objects at runtime while viewing my flash movie within the browser. So I can make a text field in my movie and populate it with these variables and objects BUT how do I access these from the flash movie ? There must be a way to get the output from 'Debug > List Variables' and 'Debug > List Objects' at runtime and dump it all into a text field on screen.

Can anyone assist please,
Thanks,
Stephen.

(Flash MX Or 8) List/List Component Issues
Hello all.

I recently completed Kirupa's "Creating a Listbox" tutorial, (http://www.kirupa.com/developer/mx/listbox.htm) but have been having a difficult time modifying the event attributes of each list item. Basically, I want to click on an item and have an object on the stage move to a unique xy coordinate. I can get the object to move already (object._x = object._x +10, but unfortunately ALL items on the list execute this script command. I've tried fooling around with the code to get each item to do a unique movement but...well, clearly I haven't succeeded yet.

I'm a Flash nooby and help in the form of specifics would be greatly appreciated. If you can provided modified code from the tutorial to move an object to a unique positions that's even better.

Thanks.

David

List Component. Help. Looked Everywhere. Button And List.
Trying to use a list component and a button. When user selects something from list component and clicks button it takes them to new page, if user doesnt select something from list and hits button, (this is where my question lies) I want it to do nothing and setFocus to list component.

Here is how I am going about it now: New if statement (however it still transfers user if nothing is selected from list component) How can I get it to not transfer? I have tried rewritting this many ways, searched all over the nets, and Nada.


Code:
var arUrl:Array=["/browsecategory.aspx?cat=1","/browsecategory.aspx?cat=2","/browsecategory.aspx?cat=3","/browsecategory.aspx?cat=4"];

var provider:Array=[{label:"Option 1",data:0},{label:"Option 2",data:1},{label:"Option 3",data:2},{label:"Option 4",data:3} ];

mcList.dataProvider=provider;
var obj:Object={};
obj.click=function(eo:Object)
{
var count:Number=mcList.selectedItem.data;
getURL(arUrl[count],"_blank");
trace("count="+arUrl[count]);
}
but.mcSubmit.addEventListener("click",obj);/////here is where I am sending off
if(mcList.selectedIndex == undefined) {
setFocus.mcList;
}
So this thing works perfectly, however if user hasnt selected anything how can I get it to not transfer and setFocus?

I have tried setting if to check it for - 1 (since starts at 0) set to 0? Any ideas please help. Thanks in advance MT

'list' Event Of List Component
oops i mean 'change' event of list component

Hi guys/gals. Ive made an xml/list component driven mp3 player as can be viewed at http://www.flashmatics.co.uk/blog/sa...mp3player.html

When someone selects a new song from the list that songs starts to play. Everything is working fine.

I now want to add an extra bit of functionality i.e When one song finishes i want the next song to start playing. But this means I have to tell the list component that a change has occured as well (even though there has been no user interaction to cause this 'change'). How would I go about this. Here is a snippet of relevant code.


Code:
mySound.onSoundComplete = function():Void{

//from here i need to tell the component a change has occured and to move it
//to the next song in the menu
}


//create a listener for the list component
var compListener:Object = new Object();
list_comp.addEventListener("change", compListener);

compListener.change = function(info:Object):Void{
//how do i get this to move to the next track?
}
Thanks for any help in advance. I dont actually need the whole code or anything but rather a point in the right direction..cheers

HELP Symbols List To Text List?
Is there a way to get a list of all the symbols in the library into a text file quickly and easily?
Thanks in advance!
-Ted

Loading XML List Into RMP List Component
I have several XML lists to load into a RMP List Component List Box.
I was told the code should be like:

myButton.onRelease=function(){
myList.load(String(search.text));
}

So I made a button and named the instance "myButton"
Add the list component called "myList"
The XML files are named test1.xml, test2.xml etc.

I tried variations of:

myButton.onRelease=function(){
myList.load(String(test1.xml));
}

Result....

Nota

I think I may need a Listener or I am not sure...
Can anybody please advise me what I am doing incorrectly?

Labels
Hi i have a problem here.

I am trying to have 2 person kicking a ball to and thro each other.

I will have a button on each of the person, so that when u click on it, they will kick the ball.

How I do it, is have the two person and the ball all to be a mc.

On the button, when the person clicks onto it, if the ball timeline is at a certain frame, it will play, else it won't.

But I am having trouble referring to where the ball stops(the frame label).

on (release) {
if (ball.stop("onetwo") {
_root.person.play();
_root.ball.play();
}
}

Also do I did to follow a IF with an ELSE??

*********
One more thing. I was loading one movie into another, how can I have the actions still playing??

thanks
Sushi82

Labels
hi

is it possible for actionscript to know if a frame exists with a paticular label?? so lets say I have a label called "john" on frame 60, is it possible to check if the frame with label "john" exists or not?

thanks

phil.

Labels
can i name 2 frames (diffrent scenes) with the same name?

Labels Gone
using flash mx 2004 i had standard labels on my radio buttons. i then use this main movie inside another so i can have an external preloader. everything worked fine, but i must have changed something, because now when i test it, the labels dissapear. When I test the main movie they are still there. But using the preloader they are gone. and when the movie is tested they still work the same, the labels just left. any idea as to what caused this?

How To Add Labels?
Sorry for stupid questions.
But how to add labels on frames in Flash MX?

List's "CellRenderer_upSkin" Displays In List Items (BUG?)
Hi Everyone,

I'm having a huge issue with with the CellRenderer_upSkin displaying on the a list component's items:

http://www.davestewart.co.uk/temp/combobox.gif

It's supposed to display a border round the entire list, but bizarrely, it's also used for each of the list elements... so effective end result is that the up state has a huge border.

I'm sure this shouldn't be happening. Has anyone else seen this behaviour?

This is my first production job using AS3, and I'm falling at the first hurdle which is very annoying.

Cheers for any help,
Dave

Preloading Using Labels
i know how to preload using labels, however, if you have labels in movie clips and not in the main movie, how do u target or select them when doing the If Frame is Loaded actionscript? it doesn't show up in the drop down menu. thanx

Preloading With Labels
I already know how to make preloaders however i want to make a preloader with percentage increases (25%, 50%, etc.) I can learn that from tutorials online but the method i want to do that is with labels. If the label isn't near the preloading movie, you do not have the option to select it from the dropdown menu when you select what label you want for the "If frame is loaded ()"

Now what i'm asking is, i need to kno how to identify labels that may be within other movie clips and scenes. I know to identify movie clips you use ../(instance name) instead of the usual /(instance name). how do you do it for labels?

Also if how i'm doing it is impossible, plz suggest another way. thanx

Magnetic Labels
I wonder if any one might know where i could get a tutorial for these magnet tags such like the ones below.
http://www.rawfibre.co.uk/

many thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved