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




Can't Find Movie Control Category



Hey guys!

I'm barely new using Flash MX. I just start using Actionscript with some basic functions. My problem is I can't find Movie Control Category in the Actions Pane; and, I can't switch between Expert and Normal Mode. I already tied the icon in the upper corner but the option to switch panes is not there only: "view ESC shortcut keys", "view line numbers" and "word wrap". I already tried the one above that one and nothing. Has anyone seen this before?

I'd appreciate your help.

Thanks to all!

Manuel Rios



FlashKit > Flash Help > Flash Newbies
Posted on: 08-04-2006, 12:08 AM


View Complete Forum Thread with Replies

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

Category -> Sub Category -> Sub Category Description Trouble
The topic says it all. I'm having trouble making the actionscript work like that.
I want it so that if a user rollOver's a button, it brings down a subcategory, and when you rollOver the subcategory, then the subcategory description appears. I got the category and the subcategory part complete and fully operational, it's just that the subcategory's description fails.

The actionscript that I used was both a movable highlighter (it's a box that moves over the button's image when you rollOver it. This is only for the main categories and not the subcategories.

Here's a sample of the coding I used for this:

Actionscript:

Code:
// This is in its own frame
_root.m0._visible = 0;
_root.m1._visible = 0;
_root.m2._visible = 0;
_root.m3._visible = 0;
_root.m4._visible = 0;
_root.m5._visible = 0;
Actionscript (box highlighter) :

Code:
// This is on the image
onClipEvent (load)
{
Xpos = -76;
}
onClipEvent (enterFrame)
{
Xa = _root.bottone1._x;
Xdiff = Xpos - Xa;
Xmove = Xdiff / 7;
_root.bottone1._x = Xa + Xmove;
}
RollOverable button:

Code:
on (rollOver)
{
_root.bottone1.Xpos = 292;
_root.bottone1._width = 139;
_root.m0.gotoAndPlay("on");
_root.m0._visible = 1;
_root.m1._visible = 0;
_root.m2._visible = 0;
_root.m3._visible = 0;
_root.m4._visible = 0;
_root.m5._visible = 0;
_root.m0.gotoAndPlay("2");
}
The subcategories that appears are labeled m0-m5.


This is within a movie clip symbol (for example, m0's movie clip symbol) :

Code:
// On its own frame
_root.si0._visible = 0;
_root.si1._visible = 0;
_root.si2._visible = 0;

Code:
// On the button
on (rollOver)
{
_root.si0.gotoAndPlay("on");
_root.si0._visible = 1;
_root.si1._visible = 0;
_root.si2._visible = 0;
_root.si0.gotoAndPlay("2");
}
Descriptions that are supposed to be shown are labeled si0 - si2


Once I load up the flash animation for testing, the categories and subcategories load up fine, but when I rollOver a subcategory, nothing happens. Can anyone help me, please? Your help is GREATLY apprechiated (as the answer will help me get on with the rest of what I need to do).

Think We Need A New Subject Category?
So I love flash! I'm starting to like dreamweaver a bit. But you can not beat flash for the ease of use (for me at least) Yet every day I keep asking myself WHAT ABOUT THE SEO FOR FLASH??

I think we need to add a new Category all about "Flash SEO"

I go around on the great "World Wide Web" only to come accross d**k head's like this>
http://www.thegooglecache.com/?p=46

Giving you a great flow chart on the best way to SEO a flash site.

So if any of the big wig's on hear can add a new category I think that would be great!

Everyone welcom to jump onboard!!

Cannot Do A Category Search
I have tried a few times to do a category search only, I keep getting sent to this page, then send in an email regarding the problem to little avail!

The web site you are accessing has experienced an unexpected error. Please contact the website administrator
Variable FTVAR_RESULTTYPE is undefined.


Resources:
Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debug Output Settings, and select the Robust Exception Information option.
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
Remote Address 10.172.32.23
Referrer http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=15&catid=194&entercat=y
Date/Time 27-Jan-09 08:31 AM

any help would be appreciated

Category XML Gallery
hi, just working on an xml gallery that has a few 'projects' that have a vayring number of images with them. my problem, thumbnails are loading fine first project images are loading fine, but when i come to change the project the next lot of images wont change to the new project.. heres my code

---------------FLASH FILE
var cur = 0;
var projectImage = new Array();
var projectTitle = new Array();
var projectThumb = new Array();
var project = new Array();
var total;
var increment = 0;
var thumbsLoaded = false;

//SWITCHES PROJECT
function galleryChoice(a) {
var myXML:XML = new XML();
var XML_URL:String = "images.xml";
var myXMLURL:URLRequest = new URLRequest(XML_URL);
var myLoader:URLLoader = new URLLoader(myXMLURL);
myLoader.addEventListener("complete", xmlLoaded);

//LOADS XML
function xmlLoaded(event:Event):void
{
myXML = XML(myLoader.data);
total = myXML.children().length();

if(thumbsLoaded==false){
for (i=0; i<total; i++) {
project.push(myXML.children()[i]);
projectTitle[i] = myXML.children().title.children()[i];
projectThumb[i] = myXML.children().thumb.children()[i];
title_txt.text = projectTitle[i];
}
thumbsLoaded = true;
thumbLoad();
}

for (var i = 0; i<project[a].image.length(); i++) {
//LOADS IMAGES FROM SELECTED PROJECT
projectImage.push(project[a].image[i].attribute("source"));
trace(projectImage[i]);
}

//load first image from first project
ImageLoad(projectImage[0],holderClip,0,0)
title_txt.text = projectTitle[a]; //this works fine
}
trace(a);
}

galleryChoice(0);

//FOR TESTING OF CHANGING PROJECT
stage.addEventListener(MouseEvent.CLICK, changeProject);
var k=0;
function changeProject(event:MouseEvent):void{

if(k==0){
k=1;
}else{
k=0;
}
galleryChoice(k);

}

--------XML------------

<images>
<project>
<title>Lorem One</title>
<thumb>images/thumb_01.png</thumb>
<image source="images/image_01.png" />
<image source="images/image_01.png" />
<image source="images/image_01.png" />
<image source="images/image_01.png" />
</project>
<project>
<title>Lorem Two</title>
<thumb>images/thumb_02.png</thumb>
<image source="images/image_02.png" />
<image source="images/image_02.png" />
<image source="images/image_02.png" />
<image source="images/image_02.png" />
</project>
</images>

any ideas?

Gallery With Category
Hi there,

Currently I am creating a flash homepage for my friend's family. I've generated an image gallery thumbnails from kirupa. I add category pictures which can choose the year using combobox component. I also transform .xml to be .php. But I've got some problems.

So technically, I send the 'year' variable to the xml php, which is then will choose the data's from mysql database with statement "WHERE year='$year'", then flash will load the xml of the data shown in xml php.

The problem is, everytime the combobox change the selection, the selected picture and the position of the thumbnail_mc remains on the previous postion. Well.. hard to explain, but you can see the photo gallery here

This is the code how i send the variable and load the xml.php

Code:
dataSender = new LoadVars();
xmlData = new XML();
openXML();
year_cb.addEventListener("change", xmlData);
xmlData.change = function() {
dataSender.year = year_cb.value;
dataSender.sendAndLoad("xmls/gallery.php",xmlData, "GET");
openXML();
};

function openXML(){
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("xmls/gallery.php?"+dataSender);
}
How can I reset the thumbnail position?
Thank you.

Ayok

XML Gallery With Category
Hi,

I made a gallery with some categories. For example: 4 photo's in category 1, 2 photo's in category 2, etc. Therefore, I make the xml like this:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<picture category="Category 1">
<image thumbs="thumbs/img1.jpg"/>
<image thumbs="thumbs/img2.jpg"/>
<image thumbs="thumbs/img3.jpg"/>
<image thumbs="thumbs/img4.jpg"/>
</picture>
<picture category="Category 2">
<image thumbs="thumbs/img5.jpg"/>
<image thumbs="thumbs/img6.jpg"/>
</picture>
</gallery>
And I simply attach the category button:

Code:
var category:Array = new Array();
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.load("images.xml");

myXML.onLoad = function(success) {
if (success) {
for (j=0; j<myXML.firstChild.childNodes.length; j++) {
var btns:Object = catholder_mc.attachMovie("cat_btn", "cat_btn"+j, j, {_y:(j*110)});
category.push(myXML.firstChild.childNodes[j].attributes.category);
btns.cat_txt.text = category[j];
btns.Value = j;
var cat = this.firstChild.childNodes[j];
btns.onRelease = viewLinks;
}
} else {
trace("failed");
}
};
Then the viewLinks function, when a category button is pressed

Code:
function viewLinks() {
i = this.Value-1;
if (i<myXML.firstChild.childNodes.length-1) {
i++;
allthelinks = myXML.firstChild.childNodes[i].childNodes;
for (k=0; k<allthelinks.length; k++) {
var img_btn:MovieClip = imgholder_mc.attachMovie("img_btn", "img_btn"+k, k, {_y:(k*30)});
img_btn.thumb_holder.loadMovie("myXML.firstChild.childNodes[i].childNodes[k].attributes.thumbs");
img_btn.Value = k;
img_btn.onRelease = released;
}
}
}
So far, the gallery is working. If one of the category button is pressed, the thumbnails of this category appear. However, I have a little bug that I can never solve.

As the example above, if I press on category 1 button, I get 4 thumbnails as it is stated on the xml. However, if I pressed category 2, the 2 thumbnails of category 2 appear, but the 2 thumbnails from category 1 do not disappear. So instead of 2 thumbnails as it is expected, I've got 4 thumbnails.

The question is how can I remove those movieclips? I hope it's clear.

Thank you,
ndableg

Php Email Adding Category
Hey all

I've done and dusted the Flash email PHP form for MX version and it works perfect

http://www.designreel.com

However I'd like to add another imput field which will also be emailed to me can some body help me out?

the field I'd like is URL - so people can type their URL in and then when they click send this gets sent to me via email

Hope somebody can help

Dips

Movieclip Category Loading
Hi

I'm sure someone can push me in the right direction..

I'll explain what I'm after..

I have 2 buttons each with a category (movieclips) waiting to be loaded when pressed. When you press button 1 category 1 slides in.. when you click button 2 category 1 slides out and category 2 slides in.

So if you click button 1 again category 2 slides out and category 1 slides in.

Any tutorials??

cheers

postatomic

Sorting XML Category Via Attributes HELP
Hello @ll.

I have problem with sorting categories via attributes:

my Xml file look like that:
<xml>
<data Default="show all" >
<item client="client Name" regie="Mike" cat="2007" />
<item client="client Name" regie="Mike" cat="2005" />
<item client="client Name" regie="Mike" cat="2006" />
<item client="client Name" regie="Mike" cat="2007" />
<item client="client Name" regie="Mike" cat="2007" />
</data>
</xml>



I know how to display all data from XML and Sort via Categories and create buttons from categories.

What I would like to do is display just one category when I press the button with category name.

Any suggestions please?

I can provide .Fla file if necessary!

Thanks!!

XML Gallery/navigation Category
Hi there,

ive been searching the forum for hours but cant exactly find what i need. Im building this navigation/gallery sort a thing and im using KIRUPA's gallery. I know how this thing works now, but i iwant to try something else. I the navigation ive build in the gallery. On every link i want the gallery to swap to a other category of images. I cant figure it OUT.. help please.

here's my code, so far

Code:
//var url = "http://www.cvay.com/new/navigatie/";
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
category = [];
ctotal= xmlNode.childNodes.length;
total = xmlNode.firstChild.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[0].childNodes[i].firstChild.firstChild.nodeValue;
}
for (i=0; i<ctotal; i++) {
category[i] = xmlNode.childNodes[i].nodeName;
}
firstImage();
} else {
_parent.nextFrame();
}
}
var test = new Array(category[i]);
trace (test)
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("nav_images.xml");
/////////////////////////////////////
c = 0;
function nextCategory(){
c++;
trace(c);
loadXML();
trace(image)
}
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
main._alpha = 0;
main.loadMovie(image[p]);
}
}
if (p ==(total-1)){
p = 0-1;
}
}
function firstImage() {
p = 0;
if (loaded == filesize) {
main._alpha = 0;
main.loadMovie(image[0], 1);
}
}
/////////////////////////////////////////////////
// PRELOADER
onEnterFrame = function() {
filesize = _root.main.getBytesTotal();
loaded = _root.main.getBytesLoaded();
var amount:Number = _root.main.getBytesLoaded() / _root.main.getBytesTotal() *100;
_root.preloader_mc._visible = true;
if (loaded != filesize) {
_root.preloader_mc.preload_bar._xscale = 100*loaded/filesize;
_root.preloader_mc.loadProc_mc._x = preloader_mc.preload_bar._width - preloader_mc.loadProc_mc._width+20;
} else {
_root.preloader_mc._visible = false;
if (_root.main._alpha<100) {
_root.main.alphaTo(100,1,"linear");
}
}
};
heres the XML

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<home>
<pic>
<image>home_1.jpg</image>
</pic>
<pic>
<image>home_2.jpg</image>
</pic>
<pic>
<image>home_3.jpg</image>
</pic>
<pic>
<image>home_3.jpg</image>
</pic>
</home>
<villassale>
<pic>
<image>villassale_1.jpg</image>
</pic>
<pic>
<image>villassale_2.jpg</image>
</pic>
<pic>
<image>villassale_3.jpg</image>
</pic>
</villassale>
</images>
the link for the banner

if someone could explain it to me

thnx

Category Navigation Of XML Playlist
Many forums and tutorials explain XML driven slideshows, photo galleries and video playlists, but I wonder if anyone has taken it a step further by introducing categories?

My XML video playlist (courtesy of Adobe Flash development) works well with my modifications. However, I have a large number of videos from many subject areas and I would like to be able to set up a template that allows the user to select from either a catagory list or series of buttons to determine what the titlist box displays.

I have my XML set up as follows (short snippet):

<?xml version="1.0" encoding="UTF-8"?>
<playlist id="Adobe Developer Center - Dynamic Video Playlist in AS3" >

<vid desc="Feisty the Lighthouse "
src="videos/Fiesty.flv"
thumb="thumbs/feisty.png"
length="3:56"/>

<vid desc="Finish Strong "
src="videos/finish_strong.flv"
thumb="thumbs/finish_strong.png"
length="3:48"/>

<vid desc="Did You Know?"
src="videos/did_you_know.flv"
thumb="thumbs/did_you_know.png"
length="8:18" />

<vid desc="NCTS 2008"
src="videos/ncts.flv"
thumb="thumbs/NCTS.png"
length="3:00"/>

</playlist>

I want to be able to load the category data into the titlelist box. Unfortunately my effort to solve this have been unsuccessful. Educated guesses are not always fruitful.

I also wondered how to load only selected attributes (desc and length) into the titlelist. attribute() only allows one argument and attribute() adds everything.

Thanks in advance. I know it's a mess.

Preloading By Category (ie. Sounds, Graphics, Etc.)
Hello all,

I'm trying to create a preloader that displays the load progress for different categories of media used in the movie. For instance, in my preloader, I'd like to display the number of kilobytes of images loaded, # of Kb of sounds loaded, etc.

I know this has got to involve the use of getloadbytes() and (probably?) dynamically loaded content, but can't seem to figure out how to do this.

I've tried to find a tutorial for this on the net but I'm just getting tired of searching. (I must've browsed through a hundred "advanced preloader" tutorials where the most advanced technique was the use of a percentage preloader...)

Help please?

Thanks,
Todd

Mp3 Player With 3 Listboxes And Category/subcategory
Hi,

I am trying to hack this mp3 player so that it displays 3 levels of hierarchy instead of 2. Check out the current player here http://www.yanwhite.com/staging/GetGoodMusic/music.htm

Currently it has kind of 3 levels, but using 2 buttons for the top level.
I want all 3 as list boxes. So that listbox1 has main categories, listbox2 displays subcategories and listbox3 displays the tracks.

Here is the actionscript..

//setting it up
//change path to your own
path = "http://billwatson2.no-ip.info/public/flash/music/";
loadBB.setLabel("By Mood");
loadB.setLabel("By Genre");
pause.setLabel("Pause");
playB.setLabel("Play");
pause.setEnabled(false);
playB.setEnabled(false);
//constucting menu system
//next few functions just allow 1 listbox to chat to the other
function Labels() {
this.lab = new Array(0);
this.dat = new Array(0);
}
Labels.prototype.addLabel = function(name, value) {
this.lab.push(name);
this.dat.push(value);
};
Labels.prototype.change = function(obj) {
var i;
obj.removeAll();
for (i=0; i<this.dat.length; i++) {
obj.addItem(this.lab[i], this.dat[i]);
}
obj.setScrollPosition(0);
};
FlistBoxClass.prototype.changeLabels = function() {
this.getValue().change(this.sub);
};
FlistBoxClass.prototype.setSubMenu = function(sub, label, x, y) {
label.change(this);
this.sub = sub;
this.setChangeHandler("changeLabels", this);
this.setSubIndex(x, y);
};
FlistBoxClass.prototype.setSubIndex = function(x, y) {
this.setSelectedIndex(x);
this.sub.setSelectedIndex(y);
};
//change what you like here to add your own artists and songs
//just make sure the title of the song is the same as the name of the mp3
//eg for myGreatSong.mp3 add the title as myGreatSong
//the data being added to the listbox is for demonstration only as no use is made of it
menu = new Labels();
menu.addLabel("Dire Straits", submenu=new Labels());
submenu.addLabel("Sultans of Swing", 1);
submenu.addLabel("Money for Nothing", 2);
submenu.addLabel("Romeo and Juliet", 3);
submenu.addLabel("Telegraph Road", 4);
submenu.addLabel("I Want my MTV", 4);
menu.addLabel("Eagles", submenu=new Labels());
submenu.addLabel("Desperado", 1);
submenu.addLabel("Hotel California - Unplugged", 2);
submenu.addLabel("Lying Eyes", 3);
submenu.addLabel("New Kid In Town", 4);
submenu.addLabel("On the Border - Already Gone", 5);
submenu.addLabel("Take It To The Limit", 6);
submenu.addLabel("Peaceful, Easy Feeling", 7);
submenu.addLabel("Take it Easy", 8);
submenu.addLabel("Tequila Sunrise", 9);
menu.addLabel("The Beatles", submenu=new Labels());
submenu.addLabel("Come Together", 1);
submenu.addLabel("Here Comes the Sun", 2);
submenu.addLabel("Hey Jude", 3);
submenu.addLabel("Lady Madonna", 4);
submenu.addLabel("Lucy In the Sky With Diamonds", 5);
submenu.addLabel("Maxwell's Silver Hammer", 6);
submenu.addLabel("Octopus's Garden", 7);
submenu.addLabel("Revolution 1", 8);
submenu.addLabel("While My Guitar Gently Weeps", 9);
menu.addLabel("Bob Marley", submenu=new Labels());
submenu.addLabel("No Woman No Cry", 1);
submenu.addLabel("Jammin", 2);
submenu.addLabel("Exodus", 3);
menu.addLabel("Bob Dylan", submenu=new Labels());
submenu.addLabel("Like A Rolling Stone", 1);
submenu.addLabel("Mr Tamborine Man", 2);
menu.addLabel("Rolling Stones", submenu=new Labels());
submenu.addLabel("Wild Horses", 2);
menu2 = new Labels();
menu2.addLabel("Dire Straits", submenu=new Labels());
submenu.addLabel("Sultans of Swing", 1);
submenu.addLabel("Money for Nothing", 2);
submenu.addLabel("Romeo and Juliet", 3);
//formatting buttons and listboxes....change to suit
aformat = new FStyleFormat();
aformat.textSize = 12;
aformat.textColor = 0xffff00;
aformat.textBold = false;
aformat.textUnderline = false;
aformat.textFont = "Arial";
aformat.face = 0x000000;
aformat.arrow = 0xffffff;
aformat.highlight = 0x0000ff;
aformat.highlight3D = 0x0000ff;
aformat.darkshadow = 0x0000ff;
aformat.shadow = 0x0000ff;
aformat.background = 0x123456;
aformat.selection = 0xffffff;
aformat.selectionUnfocused = 0xff0000;
aformat.textSelected = 0x0000ff;
aformat.applyChanges();
aformat.addListener(playB, pause, loadB, loadBB, artists, titles);
//titles list box handler
titles.setChangeHandler("playsongs");
function playsongs() {
s.stop();
delete s;
playB.setEnabled(true);
playB.setLabel("Play");
pause.setLabel("Pause");
pause.setEnabled(false);
loadB.setEnabled(true);
loadB2.setEnabled(true);
loaded = true;
paused = false;
}
//code for buttons
loadB.onRelease = function() {
artists.setSubMenu(titles, menu, 0, 0);
};
loadBB.onRelease = function() {
artists.setSubMenu(titles, menu2, 0, 0);
};
playB.onRelease = function() {
if (loaded) {
theSong = path+titles.getSelectedItem().label+".mp3";
s = new Sound(this);
s.loadSound(theSong, true);
s.setVolume(volSlide._x - 230);
s.start(0,1);
playB.setLabel("Stop");
pause.setEnabled(true);
} else {
s.stop();
pause.setEnabled(false);
playB.setLabel("Start Again");
}
loaded = !loaded;
};
pause.onRelease = function() {
if (!paused) {
s.stop();
playB.setEnabled(false);
stopped = s.position/1000;
this.setLabel("Continue");
} else {
this.setLabel("Pause");
s.start(stopped,1);
playB.setEnabled(true);
}
paused = !paused;
};
volSlide.onPress = function() {
volSlide.startDrag(true, 242, 274, 342, 274);
volSlide.onEnterFrame = function() {
s.setVolume(volslide._x - 242);
};
};
volSlide.onRollOut = volslide.onRelease = volslide.onReleaseOutside = function() {
stopDrag();
};
panSlide.onPress = function() {
panSlide.startDrag(true, 431, 274, 531, 274);
panSlide.onEnterFrame = function() {
s.setPan(panslide._x - 431);
};
};
panSlide.onRollOut = panslide.onRelease = panslide.onReleaseOutside = function() {
stopDrag();
};

Flash Drop Down Menu By Category
Hello I am making a flash drop down menu, it works fine but instead of using nodes for the drop downs i need to do it by a category attributes for example:

<mainbutton>
<sub />
<sub />
</mainbutton>
<mainbutton />
etc to
<mainbutton cat="1">
<mainbutton cat="2">
<mainbutton cat="2">
the 1 being the main button the 2's being the sub drop downs. Any links would def. help ive never done it like this before...


Code:
if (success) {
for (i=0; i<xml.firstChild.childNodes.length; i++) {
attachMovie("buton",["but"+i],i);
ref = _parent.button["but"+i];
ref._x = i*140;
ref.title.text = xml.firstChild.childNodes[i].attributes.label;
ref.link = xml.firstChild.childNodes[i].attributes.sWhatsCalled;
ref.targetWin = xml.firstChild.childNodes[i].attributes.stargetwindow;
for (j=0; j<xml.firstChild.childNodes[i].childNodes.length; j++) {
var subHeight = xml.firstChild.childNodes[i].childNodes.length;
var subH = (subHeight * 30);
trace(subH);
ref.sub_mc.sub._visible = false;
ref.sub_mc.sub.attachMovie("sub",["sub"+j],j);
refer = ref.sub_mc.sub["sub"+j];
refer._y = j*30;
refer.title.text = xml.firstChild.childNodes[i].childNodes[j].attributes.label;
refer.link = xml.firstChild.childNodes[i].childNodes[j].attributes.sWhatsCalled;
refer.targetWin = xml.firstChild.childNodes[i].childNodes[j].attributes.stargetwindow;
refer.onRelease = function() {
getURL(this.link, this.targetWin);
};
ref.sub_mc.sub._y = -ref.sub_mc.sub._height;
}
theres some of the as2 thanks

Mp3 Player With 3 Listboxes And Category/subcategory
Hi,

I am trying to hack this mp3 player so that it displays 3 levels of hierarchy instead of 2. Check out the current player here http://www.yanwhite.com/staging/GetGoodMusic/music.htm

Currently it has kind of 3 levels, but using 2 buttons for the top level.
I want all 3 as list boxes. So that listbox1 has main categories, listbox2 displays subcategories and listbox3 displays the tracks.

Here is the actionscript..

//setting it up
//change path to your own
path = "http://billwatson2.no-ip.info/public/flash/music/";
loadBB.setLabel("By Mood");
loadB.setLabel("By Genre");
pause.setLabel("Pause");
playB.setLabel("Play");
pause.setEnabled(false);
playB.setEnabled(false);
//constucting menu system
//next few functions just allow 1 listbox to chat to the other
function Labels() {
this.lab = new Array(0);
this.dat = new Array(0);
}
Labels.prototype.addLabel = function(name, value) {
this.lab.push(name);
this.dat.push(value);
};
Labels.prototype.change = function(obj) {
var i;
obj.removeAll();
for (i=0; i<this.dat.length; i++) {
obj.addItem(this.lab[i], this.dat[i]);
}
obj.setScrollPosition(0);
};
FlistBoxClass.prototype.changeLabels = function() {
this.getValue().change(this.sub);
};
FlistBoxClass.prototype.setSubMenu = function(sub, label, x, y) {
label.change(this);
this.sub = sub;
this.setChangeHandler("changeLabels", this);
this.setSubIndex(x, y);
};
FlistBoxClass.prototype.setSubIndex = function(x, y) {
this.setSelectedIndex(x);
this.sub.setSelectedIndex(y);
};
//change what you like here to add your own artists and songs
//just make sure the title of the song is the same as the name of the mp3
//eg for myGreatSong.mp3 add the title as myGreatSong
//the data being added to the listbox is for demonstration only as no use is made of it
menu = new Labels();
menu.addLabel("Dire Straits", submenu=new Labels());
submenu.addLabel("Sultans of Swing", 1);
submenu.addLabel("Money for Nothing", 2);
submenu.addLabel("Romeo and Juliet", 3);
submenu.addLabel("Telegraph Road", 4);
submenu.addLabel("I Want my MTV", 4);
menu.addLabel("Eagles", submenu=new Labels());
submenu.addLabel("Desperado", 1);
submenu.addLabel("Hotel California - Unplugged", 2);
submenu.addLabel("Lying Eyes", 3);
submenu.addLabel("New Kid In Town", 4);
submenu.addLabel("On the Border - Already Gone", 5);
submenu.addLabel("Take It To The Limit", 6);
submenu.addLabel("Peaceful, Easy Feeling", 7);
submenu.addLabel("Take it Easy", 8);
submenu.addLabel("Tequila Sunrise", 9);
menu.addLabel("The Beatles", submenu=new Labels());
submenu.addLabel("Come Together", 1);
submenu.addLabel("Here Comes the Sun", 2);
submenu.addLabel("Hey Jude", 3);
submenu.addLabel("Lady Madonna", 4);
submenu.addLabel("Lucy In the Sky With Diamonds", 5);
submenu.addLabel("Maxwell's Silver Hammer", 6);
submenu.addLabel("Octopus's Garden", 7);
submenu.addLabel("Revolution 1", 8);
submenu.addLabel("While My Guitar Gently Weeps", 9);
menu.addLabel("Bob Marley", submenu=new Labels());
submenu.addLabel("No Woman No Cry", 1);
submenu.addLabel("Jammin", 2);
submenu.addLabel("Exodus", 3);
menu.addLabel("Bob Dylan", submenu=new Labels());
submenu.addLabel("Like A Rolling Stone", 1);
submenu.addLabel("Mr Tamborine Man", 2);
menu.addLabel("Rolling Stones", submenu=new Labels());
submenu.addLabel("Wild Horses", 2);
menu2 = new Labels();
menu2.addLabel("Dire Straits", submenu=new Labels());
submenu.addLabel("Sultans of Swing", 1);
submenu.addLabel("Money for Nothing", 2);
submenu.addLabel("Romeo and Juliet", 3);
//formatting buttons and listboxes....change to suit
aformat = new FStyleFormat();
aformat.textSize = 12;
aformat.textColor = 0xffff00;
aformat.textBold = false;
aformat.textUnderline = false;
aformat.textFont = "Arial";
aformat.face = 0x000000;
aformat.arrow = 0xffffff;
aformat.highlight = 0x0000ff;
aformat.highlight3D = 0x0000ff;
aformat.darkshadow = 0x0000ff;
aformat.shadow = 0x0000ff;
aformat.background = 0x123456;
aformat.selection = 0xffffff;
aformat.selectionUnfocused = 0xff0000;
aformat.textSelected = 0x0000ff;
aformat.applyChanges();
aformat.addListener(playB, pause, loadB, loadBB, artists, titles);
//titles list box handler
titles.setChangeHandler("playsongs");
function playsongs() {
s.stop();
delete s;
playB.setEnabled(true);
playB.setLabel("Play");
pause.setLabel("Pause");
pause.setEnabled(false);
loadB.setEnabled(true);
loadB2.setEnabled(true);
loaded = true;
paused = false;
}
//code for buttons
loadB.onRelease = function() {
artists.setSubMenu(titles, menu, 0, 0);
};
loadBB.onRelease = function() {
artists.setSubMenu(titles, menu2, 0, 0);
};
playB.onRelease = function() {
if (loaded) {
theSong = path+titles.getSelectedItem().label+".mp3";
s = new Sound(this);
s.loadSound(theSong, true);
s.setVolume(volSlide._x - 230);
s.start(0,1);
playB.setLabel("Stop");
pause.setEnabled(true);
} else {
s.stop();
pause.setEnabled(false);
playB.setLabel("Start Again");
}
loaded = !loaded;
};
pause.onRelease = function() {
if (!paused) {
s.stop();
playB.setEnabled(false);
stopped = s.position/1000;
this.setLabel("Continue");
} else {
this.setLabel("Pause");
s.start(stopped,1);
playB.setEnabled(true);
}
paused = !paused;
};
volSlide.onPress = function() {
volSlide.startDrag(true, 242, 274, 342, 274);
volSlide.onEnterFrame = function() {
s.setVolume(volslide._x - 242);
};
};
volSlide.onRollOut = volslide.onRelease = volslide.onReleaseOutside = function() {
stopDrag();
};
panSlide.onPress = function() {
panSlide.startDrag(true, 431, 274, 531, 274);
panSlide.onEnterFrame = function() {
s.setPan(panslide._x - 431);
};
};
panSlide.onRollOut = panslide.onRelease = panslide.onReleaseOutside = function() {
stopDrag();
};

Variable Name For Category In Associative Array?
Making a real estate game in flash, and I have all the info for each property stored in an associative array which since the properties are randomly generated I always have to refer to the array for a particular property using a variable, so in this code my array looks like:

this["propnum"+totProps]

This code is supposed to randomly populate some values of this array, but it doesn't work the way I expected it to, its not adding categories and values to the array, except one undefined category. So obviously the [this[homeFeatures[randFive]]] part isn't doing its job correctly.

Not sure if what I'm trying to do here will make sense to anyone, or if anyone can help,


Code:
function setRatings(tempRating:Number):void
{
var homeFeatures:Array = ["Kitchen", "Bathrooms", "Electrical", "Plumbing", "Landscaping", "Driveway", "Siding", "Paint", "Insulation", "Roof", "Windows", "Doors", "Gutters", "Furnace", "Ducts", "Water Heater", "Cooling", "Pool", "Garage", "Pests", "Ceilings", "Walls", "Carpets", "Furnishings", "Floors", "Deck", "Trees", "Sidewalks", "Porch", "Spa"]
var fives:Number;
var fours:Number;
var threes:Number;
var twos:Number;
var ones:Number;
if (tempRating > 1.3) {fives = 10; fours = 20; threes = 0; twos = 0; ones = 0;}
else if (tempRating > 1.25) {fives = 9; fours = 20; threes = 1; twos = 0; ones = 0;}
else if (tempRating > 1.2) {fives = 8; fours = 21; threes = 1; twos = 0; ones = 0;}
else if (tempRating > 1.15) {fives = 6; fours = 22; threes = 2; twos = 0; ones = 0;}
else if (tempRating > 1.1) {fives = 4; fours = 23; threes = 3; twos = 0; ones = 0;}
else if (tempRating > 1.05) {fives = 2; fours = 24; threes = 4; twos = 0; ones = 0;}
else if (tempRating > 1) {fives = 1; fours = 24; threes = 5; twos = 0; ones = 0;}
else if (tempRating > .95) {fives = 0; fours = 24; threes = 5; twos = 1; ones = 0;}
else if (tempRating > .9) {fives = 0; fours = 22; threes = 7; twos = 1; ones = 0;}
else if (tempRating > .85) {fives = 0; fours = 20; threes = 8; twos = 2; ones = 0;}
else if (tempRating > .8) {fives = 0; fours = 18; threes = 10; twos = 2; ones = 0;}
else if (tempRating > .75) {fives = 0; fours = 16; threes = 11; twos = 3; ones = 0;}
else if (tempRating > .70) {fives = 0; fours = 14; threes = 11; twos = 4; ones = 1;}
else if (tempRating > .65) {fives = 0; fours = 12; threes = 11; twos = 5; ones = 2;}
else if (tempRating > .6) {fives = 0; fours = 10; threes = 12; twos = 6; ones = 2;}
else if (tempRating > .55) {fives = 0; fours = 8; threes = 13; twos = 6; ones = 3;}
else if (tempRating > .50) {fives = 0; fours = 6; threes = 14; twos = 7; ones = 3;}
else if (tempRating > .45) {fives = 0; fours = 4; threes = 15; twos = 8; ones = 3;}
else if (tempRating > .40) {fives = 0; fours = 2; threes = 16; twos = 8; ones = 4;}
else if (tempRating > .35) {fives = 0; fours = 0; threes = 17; twos = 9; ones = 4;}
else if (tempRating > .3) {fives = 0; fours = 0; threes = 16; twos = 10; ones = 4;}
else if (tempRating > .25) {fives = 0; fours = 0; threes = 14; twos = 12; ones = 4;}
else if (tempRating > .20) {fives = 0; fours = 0; threes = 12; twos = 13; ones = 5;}
else if (tempRating > .15) {fives = 0; fours = 0; threes = 10; twos = 15; ones = 5;}
else if (tempRating > .1) {fives = 0; fours = 0; threes = 8; twos = 16; ones = 6;}
else {fives = 0; fours = 0; threes = 6; twos = 17; ones = 7;}
this["propnum"+totProps]["fives"] = fives;
this["propnum"+totProps]["fours"] = fours;
this["propnum"+totProps]["threes"] = threes;
this["propnum"+totProps]["twos"] = twos;
this["propnum"+totProps]["ones"] = ones;
for (var i:Number = 0; i < fives; i++)
{
var randFive:Number = Math.floor(Math.random() * homeFeatures.length);
this["propnum"+totProps][this[homeFeatures[randFive]]] = 5;
homeFeatures.splice(randFive, 1);
}
for (var j:Number = 0; j < fours; j++)
{
var randFour:Number = Math.floor(Math.random() * homeFeatures.length);
this["propnum"+totProps][this[homeFeatures[randFour]]] = 4;
homeFeatures.splice(randFour, 1);
}
for (var k:Number = 0; k < threes; k++)
{
var randThree:Number = Math.floor(Math.random() * homeFeatures.length);
this["propnum"+totProps][this[homeFeatures[randThree]]] = 3;
homeFeatures.splice(randThree, 1);
}
for (var l:Number = 0; l < twos; l++)
{
var randTwo:Number = Math.floor(Math.random() * homeFeatures.length);
this["propnum"+totProps][this[homeFeatures[randTwo]]] = 2;
homeFeatures.splice(randTwo, 1);
}
for (var m:Number = 0; m < ones; m++)
{
var randOne:Number = Math.floor(Math.random() * homeFeatures.length);
this["propnum"+totProps][this[homeFeatures[randOne]]] = 1;
homeFeatures.splice(randOne, 1);
}

}

Mp3 Player With 3 Listboxes And Category/subcategory
Hi,

I am trying to hack this mp3 player so that it displays 3 levels of hierarchy instead of 2. Check out the current player here http://www.yanwhite.com/staging/GetGoodMusic/music.htm

Currently it has kind of 3 levels, but using 2 buttons for the top level.
I want all 3 as list boxes. So that listbox1 has main categories, listbox2 displays subcategories and listbox3 displays the tracks.

Here is the actionscript..

//setting it up
//change path to your own
path = "

Xml Thumnail Grid + Sorting By Category
I know the grid thing has been posted before, but I thought I would share my version of it.

animating images into a grid
example/doc - http://bencline.net/blog/2006/11/28/...h-into-a-grid/
.zip file - http://www.bencline.net/source_code/...thumb_grid.zip

sorting images by category in a grid (includes category menu created via xml)
example/doc - http://bencline.net/blog/2007/01/29/...gory-in-flash/
.zip file - http://bencline.net/source_code/sorting/sorting.zip

Enjoy.

Mp3 Player With 3 Listboxes And Category/subcategory
Hi,

I am trying to hack this mp3 player so that it displays 3 levels of hierarchy instead of 2. Check out the current player here http://www.yanwhite.com/staging/GetGoodMusic/music.htm

Currently it has kind of 3 levels, but using 2 buttons for the top level.
I want all 3 as list boxes. So that listbox1 has main categories, listbox2 displays subcategories and listbox3 displays the tracks.

Here is the actionscript..

//setting it up
//change path to your own
path = "http://billwatson2.no-ip.info/public/flash/music/";
loadBB.setLabel("By Mood");
loadB.setLabel("By Genre");
pause.setLabel("Pause");
playB.setLabel("Play");
pause.setEnabled(false);
playB.setEnabled(false);
//constucting menu system
//next few functions just allow 1 listbox to chat to the other
function Labels() {
this.lab = new Array(0);
this.dat = new Array(0);
}
Labels.prototype.addLabel = function(name, value) {
this.lab.push(name);
this.dat.push(value);
};
Labels.prototype.change = function(obj) {
var i;
obj.removeAll();
for (i=0; i<this.dat.length; i++) {
obj.addItem(this.lab[i], this.dat[i]);
}
obj.setScrollPosition(0);
};
FlistBoxClass.prototype.changeLabels = function() {
this.getValue().change(this.sub);
};
FlistBoxClass.prototype.setSubMenu = function(sub, label, x, y) {
label.change(this);
this.sub = sub;
this.setChangeHandler("changeLabels", this);
this.setSubIndex(x, y);
};
FlistBoxClass.prototype.setSubIndex = function(x, y) {
this.setSelectedIndex(x);
this.sub.setSelectedIndex(y);
};
//change what you like here to add your own artists and songs
//just make sure the title of the song is the same as the name of the mp3
//eg for myGreatSong.mp3 add the title as myGreatSong
//the data being added to the listbox is for demonstration only as no use is made of it
menu = new Labels();
menu.addLabel("Dire Straits", submenu=new Labels());
submenu.addLabel("Sultans of Swing", 1);
submenu.addLabel("Money for Nothing", 2);
submenu.addLabel("Romeo and Juliet", 3);
submenu.addLabel("Telegraph Road", 4);
submenu.addLabel("I Want my MTV", 4);
menu.addLabel("Eagles", submenu=new Labels());
submenu.addLabel("Desperado", 1);
submenu.addLabel("Hotel California - Unplugged", 2);
submenu.addLabel("Lying Eyes", 3);
submenu.addLabel("New Kid In Town", 4);
submenu.addLabel("On the Border - Already Gone", 5);
submenu.addLabel("Take It To The Limit", 6);
submenu.addLabel("Peaceful, Easy Feeling", 7);
submenu.addLabel("Take it Easy", 8);
submenu.addLabel("Tequila Sunrise", 9);
menu.addLabel("The Beatles", submenu=new Labels());
submenu.addLabel("Come Together", 1);
submenu.addLabel("Here Comes the Sun", 2);
submenu.addLabel("Hey Jude", 3);
submenu.addLabel("Lady Madonna", 4);
submenu.addLabel("Lucy In the Sky With Diamonds", 5);
submenu.addLabel("Maxwell's Silver Hammer", 6);
submenu.addLabel("Octopus's Garden", 7);
submenu.addLabel("Revolution 1", 8);
submenu.addLabel("While My Guitar Gently Weeps", 9);
menu.addLabel("Bob Marley", submenu=new Labels());
submenu.addLabel("No Woman No Cry", 1);
submenu.addLabel("Jammin", 2);
submenu.addLabel("Exodus", 3);
menu.addLabel("Bob Dylan", submenu=new Labels());
submenu.addLabel("Like A Rolling Stone", 1);
submenu.addLabel("Mr Tamborine Man", 2);
menu.addLabel("Rolling Stones", submenu=new Labels());
submenu.addLabel("Wild Horses", 2);
menu2 = new Labels();
menu2.addLabel("Dire Straits", submenu=new Labels());
submenu.addLabel("Sultans of Swing", 1);
submenu.addLabel("Money for Nothing", 2);
submenu.addLabel("Romeo and Juliet", 3);
//formatting buttons and listboxes....change to suit
aformat = new FStyleFormat();
aformat.textSize = 12;
aformat.textColor = 0xffff00;
aformat.textBold = false;
aformat.textUnderline = false;
aformat.textFont = "Arial";
aformat.face = 0x000000;
aformat.arrow = 0xffffff;
aformat.highlight = 0x0000ff;
aformat.highlight3D = 0x0000ff;
aformat.darkshadow = 0x0000ff;
aformat.shadow = 0x0000ff;
aformat.background = 0x123456;
aformat.selection = 0xffffff;
aformat.selectionUnfocused = 0xff0000;
aformat.textSelected = 0x0000ff;
aformat.applyChanges();
aformat.addListener(playB, pause, loadB, loadBB, artists, titles);
//titles list box handler
titles.setChangeHandler("playsongs");
function playsongs() {
s.stop();
delete s;
playB.setEnabled(true);
playB.setLabel("Play");
pause.setLabel("Pause");
pause.setEnabled(false);
loadB.setEnabled(true);
loadB2.setEnabled(true);
loaded = true;
paused = false;
}
//code for buttons
loadB.onRelease = function() {
artists.setSubMenu(titles, menu, 0, 0);
};
loadBB.onRelease = function() {
artists.setSubMenu(titles, menu2, 0, 0);
};
playB.onRelease = function() {
if (loaded) {
theSong = path+titles.getSelectedItem().label+".mp3";
s = new Sound(this);
s.loadSound(theSong, true);
s.setVolume(volSlide._x - 230);
s.start(0,1);
playB.setLabel("Stop");
pause.setEnabled(true);
} else {
s.stop();
pause.setEnabled(false);
playB.setLabel("Start Again");
}
loaded = !loaded;
};
pause.onRelease = function() {
if (!paused) {
s.stop();
playB.setEnabled(false);
stopped = s.position/1000;
this.setLabel("Continue");
} else {
this.setLabel("Pause");
s.start(stopped,1);
playB.setEnabled(true);
}
paused = !paused;
};
volSlide.onPress = function() {
volSlide.startDrag(true, 242, 274, 342, 274);
volSlide.onEnterFrame = function() {
s.setVolume(volslide._x - 242);
};
};
volSlide.onRollOut = volslide.onRelease = volslide.onReleaseOutside = function() {
stopDrag();
};
panSlide.onPress = function() {
panSlide.startDrag(true, 431, 274, 531, 274);
panSlide.onEnterFrame = function() {
s.setPan(panslide._x - 431);
};
};
panSlide.onRollOut = panslide.onRelease = panslide.onReleaseOutside = function() {
stopDrag();
};

Open Certain Category - XML Menu Accordion
I not a developer, so I bought a menu, which I saw in flashden.

a menu xml accordion.
http://flashden.net/files/21673/index.html

My problem is the following, the menu opens all, I just would like to open certain category.

In that way:
in my URL I have a param &IDCategoria=2660&, I can take this param, but my whole menu opens, all categories, not just this particular category.

Can anyone help me?
AS.

Code:
stop();
// subitems
var xmlItems = xmlRoot.childNodes
// total subitems
var total = xmlItems.length
// todos items
var itemList = []
//----------------------------------------------
//catch the url param
import flash.external.*;
import QueryString.as;
var myPath:QueryString = new QueryString();
assignVariables();
//------------------------------------------------
function assignVariables() {
if (myPath.parameters.Y) {
idCategoria_txt.text = unescape("IDCategoria="+myPath.parameters.IDCategoria);

for (i=0; i<total; i++){
// Attaching menu
box.attachMovie("item", "item" + i, i)
itemList[i] = box["item"+i]
itemList[i].xmlRoot = xmlItems[i]
itemList[i].separation = separation
itemList[i].tabulation = tabulation
itemList[i].subItemAutoClose = subItemAutoClose
itemList[i].itemHeight = itemHeight
itemList[i].itemWidth = itemWidth
itemList[i].light = light
//itemList[i].buttonColor = buttonColor
//itemList[i].rollOverColor = rollOverColor
itemList[i].arrowColor = arrowColor
itemList[i].rollOverArrowColor = rollOverArrowColor
itemList[i].TextColor = TextColor
itemList[i].rollOverText = rollOverText
itemList[i].openEase = openEase
itemList[i].closeEase = closeEase
itemList[i].rollOutFade = rollOutFade
itemList[i].openAll = openAll
itemList[i].openID = openID
}

//botões menu
button.onRelease = function(){
if (link){
getURL(xmlRoot.attributes.url+"&Y="+myPath.parameters.Y, "_self")
}
}
button.onReleaseOutside = function(){
if (link){
getURL(xmlRoot.attributes.url+"&Y="+myPath.parameters.Y, "_self")
}
}
button.onRollOver=function(){
if (!openBox){
over = true
}
}
button.onRollOut=function(){
if (!openBox){
over = false
}
}

//cores
color.setRGB(buttonColor)
color = new Color (button.over)
color = new Color (Arrow.color)
color.setRGB(arrowColor)
color = new Color (Arrow.over)
color.setRGB(rollOverArrowColor)
// nome do item CAT
cat.text = xmlRoot.attributes.cat
id_txt.text = xmlRoot.attributes.id
levels_txt.text = xmlRoot.attributes.level
// máscara
box.setMask(mask)
// sem submenu
if (total<1){
link = true
Arrow._visible=false
}
if (!light){
button.light._visible=false
}
mask._height = 0
button._x = button._y = 0

mask.onEnterFrame=function(){
cursor._x=_xmouse
cursor._y=_ymouse
button._height = itemHeight
button._width = itemWidth
box._y = mask._y = button._height + separation
mask._width = button._width*tabulation/5

if (openBox || myPath.parameters.IDCategoria){
mask._height += (targetSize - mask._height)/openEase
Arrow._rotation += (-90 - Arrow._rotation)/openEase
box._x = mask._x += (tabulation - mask._x)/openEase
teste_txt.text = "Categoria aberta";
teste_txt.textColor = 0xFF0099;
}

else {
mask._height += (0 - mask._height)/closeEase
Arrow._rotation += (0 - Arrow._rotation)/closeEase
box._x = mask._x += (0 - mask._x)/closeEase
}
if (over){
cat.textColor = rollOverText
if (button.over._alpha<100){
button.over._alpha +=50
}
} else {
cat.textColor = TextColor
if (button.over._alpha>0){
button.over._alpha -= rollOutFade
}
}
Arrow.over._alpha = button.over._alpha
// menu
for (i=1; i<=total; i++){
// menu embaixo do outro

itemList[i]._y = itemList[i-1]._y + itemList[i-1].mask._height + itemList[i-1].button._height + separation
targetSize = itemList[i-1]._y + itemList[i-1].mask._height + itemList[i-1].button._height + separation
if (!openBox && !openAll){
itemList[i-1].openBox=false
itemList[i-1].over=false
}

// abrir todos
if (openAll && openBox){
itemList[i-1].openBox=true
itemList[i-1].over=false
if (!itemList[i-1].link){
itemList[i-1].over=true

}
}
}
}

onMouseDown = function (){
for (i=0; i<total; i++){
if (itemList[i].button.hitTest(cursor)){
showCurrent(itemList[i])
}
}
}
// botão clicado
showCurrent=function(current){
for (i=0; i<total; i++){
if (itemList[i]!=current){
if (subItemAutoClose){
itemList[i].openBox=false
}
if (total > 0){
itemList[i].over = false
}
} else {
// se tiver submenu
if (total>0){
if (itemList[i].openBox){
if (!openAll){
itemList[i].openBox=false
}
} else {

itemList[i].openBox=true
}
}
}
}
}
// fechando a função assignVariables if Y parameter exists
}
}
If somebody wanna help, I´ll send the .fla

Sorry about my english.

Mp3 Player With 3 Listboxes And Category/subcategory
Hi,

I am trying to hack this mp3 player so that it displays 3 levels of hierarchy instead of 2. Check out the current player here http://www.yanwhite.com/staging/GetGoodMusic/music.htm

Currently it has kind of 3 levels, but using 2 buttons for the top level.
I want all 3 as list boxes. So that listbox1 has main categories, listbox2 displays subcategories and listbox3 displays the tracks.

Here is the actionscript..

//setting it up
//change path to your own
path = "http://billwatson2.no-ip.info/public/flash/music/";
loadBB.setLabel("By Mood");
loadB.setLabel("By Genre");
pause.setLabel("Pause");
playB.setLabel("Play");
pause.setEnabled(false);
playB.setEnabled(false);
//constucting menu system
//next few functions just allow 1 listbox to chat to the other
function Labels() {
this.lab = new Array(0);
this.dat = new Array(0);
}
Labels.prototype.addLabel = function(name, value) {
this.lab.push(name);
this.dat.push(value);
};
Labels.prototype.change = function(obj) {
var i;
obj.removeAll();
for (i=0; i<this.dat.length; i++) {
obj.addItem(this.lab[i], this.dat[i]);
}
obj.setScrollPosition(0);
};
FlistBoxClass.prototype.changeLabels = function() {
this.getValue().change(this.sub);
};
FlistBoxClass.prototype.setSubMenu = function(sub, label, x, y) {
label.change(this);
this.sub = sub;
this.setChangeHandler("changeLabels", this);
this.setSubIndex(x, y);
};
FlistBoxClass.prototype.setSubIndex = function(x, y) {
this.setSelectedIndex(x);
this.sub.setSelectedIndex(y);
};
//change what you like here to add your own artists and songs
//just make sure the title of the song is the same as the name of the mp3
//eg for myGreatSong.mp3 add the title as myGreatSong
//the data being added to the listbox is for demonstration only as no use is made of it
menu = new Labels();
menu.addLabel("Dire Straits", submenu=new Labels());
submenu.addLabel("Sultans of Swing", 1);
submenu.addLabel("Money for Nothing", 2);
submenu.addLabel("Romeo and Juliet", 3);
submenu.addLabel("Telegraph Road", 4);
submenu.addLabel("I Want my MTV", 4);
menu.addLabel("Eagles", submenu=new Labels());
submenu.addLabel("Desperado", 1);
submenu.addLabel("Hotel California - Unplugged", 2);
submenu.addLabel("Lying Eyes", 3);
submenu.addLabel("New Kid In Town", 4);
submenu.addLabel("On the Border - Already Gone", 5);
submenu.addLabel("Take It To The Limit", 6);
submenu.addLabel("Peaceful, Easy Feeling", 7);
submenu.addLabel("Take it Easy", 8);
submenu.addLabel("Tequila Sunrise", 9);
menu.addLabel("The Beatles", submenu=new Labels());
submenu.addLabel("Come Together", 1);
submenu.addLabel("Here Comes the Sun", 2);
submenu.addLabel("Hey Jude", 3);
submenu.addLabel("Lady Madonna", 4);
submenu.addLabel("Lucy In the Sky With Diamonds", 5);
submenu.addLabel("Maxwell's Silver Hammer", 6);
submenu.addLabel("Octopus's Garden", 7);
submenu.addLabel("Revolution 1", 8);
submenu.addLabel("While My Guitar Gently Weeps", 9);
menu.addLabel("Bob Marley", submenu=new Labels());
submenu.addLabel("No Woman No Cry", 1);
submenu.addLabel("Jammin", 2);
submenu.addLabel("Exodus", 3);
menu.addLabel("Bob Dylan", submenu=new Labels());
submenu.addLabel("Like A Rolling Stone", 1);
submenu.addLabel("Mr Tamborine Man", 2);
menu.addLabel("Rolling Stones", submenu=new Labels());
submenu.addLabel("Wild Horses", 2);
menu2 = new Labels();
menu2.addLabel("Dire Straits", submenu=new Labels());
submenu.addLabel("Sultans of Swing", 1);
submenu.addLabel("Money for Nothing", 2);
submenu.addLabel("Romeo and Juliet", 3);
//formatting buttons and listboxes....change to suit
aformat = new FStyleFormat();
aformat.textSize = 12;
aformat.textColor = 0xffff00;
aformat.textBold = false;
aformat.textUnderline = false;
aformat.textFont = "Arial";
aformat.face = 0x000000;
aformat.arrow = 0xffffff;
aformat.highlight = 0x0000ff;
aformat.highlight3D = 0x0000ff;
aformat.darkshadow = 0x0000ff;
aformat.shadow = 0x0000ff;
aformat.background = 0x123456;
aformat.selection = 0xffffff;
aformat.selectionUnfocused = 0xff0000;
aformat.textSelected = 0x0000ff;
aformat.applyChanges();
aformat.addListener(playB, pause, loadB, loadBB, artists, titles);
//titles list box handler
titles.setChangeHandler("playsongs");
function playsongs() {
s.stop();
delete s;
playB.setEnabled(true);
playB.setLabel("Play");
pause.setLabel("Pause");
pause.setEnabled(false);
loadB.setEnabled(true);
loadB2.setEnabled(true);
loaded = true;
paused = false;
}
//code for buttons
loadB.onRelease = function() {
artists.setSubMenu(titles, menu, 0, 0);
};
loadBB.onRelease = function() {
artists.setSubMenu(titles, menu2, 0, 0);
};
playB.onRelease = function() {
if (loaded) {
theSong = path+titles.getSelectedItem().label+".mp3";
s = new Sound(this);
s.loadSound(theSong, true);
s.setVolume(volSlide._x - 230);
s.start(0,1);
playB.setLabel("Stop");
pause.setEnabled(true);
} else {
s.stop();
pause.setEnabled(false);
playB.setLabel("Start Again");
}
loaded = !loaded;
};
pause.onRelease = function() {
if (!paused) {
s.stop();
playB.setEnabled(false);
stopped = s.position/1000;
this.setLabel("Continue");
} else {
this.setLabel("Pause");
s.start(stopped,1);
playB.setEnabled(true);
}
paused = !paused;
};
volSlide.onPress = function() {
volSlide.startDrag(true, 242, 274, 342, 274);
volSlide.onEnterFrame = function() {
s.setVolume(volslide._x - 242);
};
};
volSlide.onRollOut = volslide.onRelease = volslide.onReleaseOutside = function() {
stopDrag();
};
panSlide.onPress = function() {
panSlide.startDrag(true, 431, 274, 531, 274);
panSlide.onEnterFrame = function() {
s.setPan(panslide._x - 431);
};
};
panSlide.onRollOut = panslide.onRelease = panslide.onReleaseOutside = function() {
stopDrag();
};

Make Category's From Multidimensional Array
ActionScript Code:
test = "week 7::headline 1::Text content::image::description|week 7::headline 2::Text content 2::image 2::description 2|week 8::headline 1::text content::image::description";
tempArray = test.split('|');
for (a=0; a<=tempArray.length-1; a++)
{
    agenda_array = tempArray[a].split("::");
    tempArray[a] = new Array();
    for (b=0; b<=agenda_array.length-1; b++)
    {
        tempArray[a][b] = agenda_array[b];
        cats = tempArray[a][0];
        trace(cats);
    }
}


Hi Guys,

Can somebody please help with this.

As you can see the multidimensional array named test contains two times week 7. I want to categorize these weeks in week 7 with the related content & week 8 with the related content.

EXAMPLE:

Week 7
- Headline 1 (click this headline to see related content)
- Headline 2 (click this headline to see related content)

Week 8
- Headline 1 (click this headline to see related content)

I want to dynamicly generate the above list.
After clicking on headline the related content show ups.

Looping the multi array is no problem but how to categorize and position the cats and related headlines?

thanks in advance.

Karlein

Flash Music Player With 3-tier Category Menu
Hi,

I am quite new to flash but need to find or develop a flash player (xml-based content) that can display a category, then subcategory and finally mp3 files, a 3-tier menu system.
This could be either scolling and all visible or expandable on rollover for subcategory and mp3 titles.

What is the best approach to this? Is there anything out there already I could customise?
My actionscripting is pretty basic!

Thanks :)

Flash Music Player With 3-tier Category Menu?
Hi,

I am quite new to flash but need to find or develop a flash player (xml-based content) that can display a category, then subcategory and finally mp3 files, a 3-tier menu system.
This could be either scolling and all visible or expandable on rollover for subcategory and mp3 titles.

What is the best approach to this? Is there anything out there already I could customise?
My actionscripting is pretty basic!

Thanks :)

Movie Control...remote Control...
Hi,
I want to create a "remote control" kind of thing for this product demo that I am building.
(go to http://www.autodemo.com/?samples and click on any of the samples and you'll see a movie control on the bottom right).
How do I go about doing it? Thanks!

Can't Find A Movie.
I saw a movie on the site last week that I'd like to download, but now I can't find it anywhere.

Perhaps if I describe it, someone can help or at least refer me to someone who can.

It's a large box containing 9 squares (3 up and 3 across). As you roll over a square, that square enlarges and the others systematically reduce in size. It's sort of hard to put into words. But it's very cool.

The effect is great for either a nav bar or better yet, a photo gallary.

Does any of this ring a bell? Can anyone help me?

Thanks

Howard

Can Someone Help Me Find A Movie?
I saw a movie on the site last week that I'd like to download, but now I can't find it anywhere.

Perhaps if I describe it, someone can help or at least refer me to someone who can.

It's a large box containing 9 squares (3 up and 3 across). As you roll over a square, that square enlarges and the others systematically reduce in size. It's sort of hard to put into words. But it's very cool.

The effect is great for either a nav bar or better yet, a photo gallary.

Does any of this ring a bell? Can anyone help me?

Thanks

Howard

Can't Find The #$#@% Movie
Have a button with a movie clip inside of it with the button on the main part of the stage...

colorit = new Color(_root.about_us_button.about_us_movie);
colorit.setRGB(0xFF0000);

Can get this to work with the entire button - but won't work on the movie in the 'up' state of the button!

Find Movie Help
Hi All,

Does anyone know the name/link to a movie that is on here that acts as a scrolling map effect? if you move your mouse to the bottom of the screen the map moves up and if you go to the left the map goes right.

Anyone recognise the movie I am talking about? All to do with x y mouse position.

I've looked but can't find it anywhere!!!

Please help

Find Out When The Movie Uploads
Hi,
I have a Flash movie and i want to find out when it unloads so i can do something. In fact i want to know if there is a similar command as the "on Unload=" that Internet Explorer uses.

Can't Find What's Wrong With This Movie
Can anyone tell me what I've done wrong in this movie? It's a generic version of something i'm working on. 2 buttons, in this case, circles..that move a larger picture, in this case...just a big circle.

I think I have the code right...but it's not working. I've attached the .fla to this message.

Any help?

thanks in advance

Why Doesn't It Find My Second Movie
I should be ashamed for asking but I haven't used flash in over a year.

Basically i've got two movies on the main timeline one after the other. It plays the first one ok but I can't for the life of me target the play head to back up to the find and 2nd movie instance.

Sorry for such a noob question. I've attached the flash file.

How To Find Out If A Movie Clip Is There
if i had the name of a movie clip, how would i check if it existed?

Find End Of Movie Clip
Hi,
I have an actionscript 3 file with an imported movie (.flv).

I need to know when the movie has finished so l can hide it and in it's place display some text.

I have searched the internet for ages now and can't find anything on finding out when a movie clip ends in actionscript 3.

Does anyone have any ideas for how l can achieve this?

Help Need To Find Out How To Link A Flash Movie In 4 Hrs?
I have a flash animation...I need to know how make it a link in dreamweaver. Or is that impossible? Please help...needs to be done in 4hrs...thanks.

Where Can I Find Forum Movie For Flash 5?
I want to add a forum to my site but I cant do it myself, so where can I find a complete one?

Find Dimensions Of Loaded Movie
Hi!

I need to load an swf file into my current movie and I want it to be centered.For doing that I thought I should know the dimensions of the swf movie first.

I tried the following code,but it isnt working...mwidth and mheight take values=0.(container is an empty movieclip...)Can anyone help?

on (release) {
loadMovie ("orgScreenShot.swf", "container");

mwidth=container._width;
mheight=container._height;
}

Where To Find Sounds For Your Flash Movie?
i really am in need of some misc. sounds for my flash movies. i have checked the sound loops section of this site, but those are songs, not sounds. im talking about roars, thuds, crashes, etc. is there a certain site on the web that has stuff like this?

[MX] Cannot Find Target Within A Loaded Movie
hey all!

a newbie here on the flahkit forum, but not too much to flash,
usually more basic ActionScripting.

aight, got a lil problem.

i have a SWF with a scrolling MC in it, scroll buttons and another
empty MC to control the scroll with action-script.

when i run the file on itself it's perfect.
but when i load it into the main SWF, it cannot find the target.


what is the correct way to address targets when the swf will be played
in another SWF?

currently i think it's relative, all of them.

the buttons adrees the empty MC which in turn influence the scrollin MC.
at first it couldn't find the first M, then got it work only to find
it cannot find the 2nd MC.


appreciate the help!

Load Movie Can't Find Target
I have four mc's on the stage c1, c2, c3, c4 and I am tying to load a movie into each one from with in a loop. I am going crazy. Please help me
Here is my code and files.


Code:
stop();
///////////////////////////////////
// ------ Variables --------------
///////////////////////////////////
var i:Number = 0;
var ticker:Number;
var time:Number = 500;
///////////////////////////////////
// ------ Initial Preview ---------
///////////////////////////////////
init();
function init() {
ticker = setInterval(tick, 2000, this);
}
// --------------------------------
function tick(MC) {
if ((++MC.i) == 1) {
trace("1");
// Places Item On Top Level
_root.x += 2;
_root.c1.swapDepths(_root.x);
_root.c1.loadMovie("image1.swf");
} else if (MC.i == 2) {
trace("2");
// Places Item On Top Level
_root.x += 2;
_root.c2.swapDepths(_root.x);
_root.c2.loadMovie("image2.swf");
} else if (MC.i == 3) {
trace("3");
// Places Item On Top Level
_root.x += 2;
_root.c3.swapDepths(_root.x);
_root.c3.loadMovie("image3.swf");
} else if (MC.i == 4) {
trace("4");
// Places Item On Top Level
_root.x += 2;
_root.c4.swapDepths(_root.x);
_root.c4.loadMovie("image4.swf");
} else if (MC.i == 5) {
i = 0;
}
}

Find Stuff Without The MOVIE EXPLORER
hi
ive got a new project that contains Lots of files (fla,.as,.flv,.js and more)
and i need to change lots of stuff in there.
but to find somthing is a problem couse all the clips is pulled dynamicly
to the stage and all of the code is in the libraray or out there in the .as files.
so if i want to trace/find somthing i cant use the "MOVIE EXPLORER"
couse it want work n stuff that dont lie on the stage.

Do sombody no how i can trace/find bits of code or MC's inside the library
without using the "MOVIE EXPLORER"?

Find Null Movie Clip Name
I need to find out if a movie clip variable is null, but when I want to check for a null value, it says it's not. How would I check for this? The code I use is as follows:


Code:
var temp_mc:MovieClip = this.returnActiveMovieClip();
if (temp_mc != null) {
.........
the returnActiveMovieClip() function returns the name of a selected movie clip.

Any and all help will be greatly appreciated.
H

Can't Find Code For Preloader In Movie...
I am working with an old designer's website built in Flash MX. There is a preloader for it that has an animation with a box arount it. I want to get rid of that box. I can't find the action script (using movie explorer) that makes that preloader happen. There are movie clips in the library for the pieces of the animation, so there should be code that amkes the animation happen and puts that box around it. Can anyone help me to find it? I am working in Flash MX v6.0.

Need To Find Nearest Movie Clips
Hi all,

I have an app which has between 30 and 200 nearly identical movie clips on the stage at any time.

I need to get an array of the top 10 movie clips which have the closest global position (X/Y) to any given clip.

Obviously I could do this with a lot of sorting. And I could do it with a server call, and use PHP, since it has advanced multidimensional array sorting methods. But I'd like to avoid server calls, as they will slow the app down.

Is there some high-level way to do this in Actionscript? I'm using Flash MX (6).

Perhaps collision detection methods can be used?


Thanks in advance!! Kindest regards,
-joshua
staff@dot-comet.com

Find A Movie And Loading It On A Level
Please does anyone know if i can have a imput box to locate a movie and loading it?
Thanks

Find Width Of Movie Populated By Xml
Heyo,

Trying to do a scroll effect of some images I am loading in from an xml file.

Problem is I need to limit the amount of scroll based on the width of the images - the number of images is controlled by the client and can vary.

The problem is the actionscript does not seem to be able to detect the width of the combined images - heres the scroll code...


Code:
x = getProperty("_parent.images.content", _x);
if (x<-("_parent.images.content.menu",_width)) {
gotoAndPlay(4);
} else {
setProperty("_parent.images.content", _x, x-4);
}
I am not an expert at actionscript - i am very much learning as I go along... and this issue has been bugging me for the past four hours!!!

Any help would be greatly appreciated!

Cheers,

Beef.

Can't Find Path To Movie Clip
i've racked my brain and can't seem to find the path to a movie clip on another level. it's driving me crazy!

k, here's the setup:

the main movie declares a variable, myLvl = 2.

all buttons on the main movie that load new sections have this code:

on (release){
loadMovieNum("whatever.swf",_root.myLvl);
_root.myLvl++;
}

when the whatever swf is loaded on the myLvl, it does an intro animation that covers the previously loaded level under it. at the end of the animation, it has this code:

unloadMovieNum(myLvl-1);
count = _level0.myLvl-2;
unloadMovieNum(count);

which unloads the previous level.

now, here's the problem:

when i try to work around on that top level, i can't get to any MC. for example, if i want a button on that whatever.swf to have an MC there gotoAndPlay(2), it doesn't do it when i test it online from the main movie. but if i type in the url this way:

http://www.mysite/whatever.swf and click the button, the mc on it does gotoAndPlay frame 2. it's only when i go to mysite.com, then click the button that loads whatever.swf, and then click the button that's supposed to advance the mc, nothing happens!

i've tried every _root, _parent, _this, and _level i can think of to put behind that mc and nothing seems to work!

i currently have _root.mc.gotoAndPlay(2);

like i said, that works fine if i access the whatever.swf and play it. but if it's loaded from the main movie and is on some level, the code doesn't work.

any advice? i'd really appreciate it!

How Find The Address Of The Page A Movie Is In?
I'd like my movie to be able to find what page it is sitting in so it can change pictures depending upon the section (it's a HTML hybrid - I don't want to have a different Flash for each section)

Any way to accomplish this at all? Would cookies be the way to go?

Want To Find The Name Of Current Movie Being Played On The Stage
For my application I plan to load movie from a particular folder.Is there any way to find through action script code, which movie is being played on the stage?Like,suppose I have linked a particular .swf file called "eye.swf" to a button on the stage.When the user presses the button the movie starts playing on the stage.There are lot of buttons on the stage of similar nature.So the problem I am facing is that I am not able to retrieve imformation about the movie currently being played on the stage.Is there any way to get that information?Please Reply.

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