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




Prevent Accordian Index Change If Controls Are Not Valid



I have an Accordian Container that contains various TextInputs in each pane. These TextInputs are generated dynamically from an XML file and some of them have Validators attached to them.

When I change the Accordian Index I want to Save any changes to the database. This part is all working fine.

However, I want to prevent the user from changing the index if any of the TextInputs are in an invalid state, perhaps alerting the user with an Alert box.

In the Accordian IndexChangedEvent, how do I test to see if any of the child controls for the currently selected Accordian index pane are not validated? I'm not sure what syntax to use.

Thanks!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 02-11-2008, 07:13 PM


View Complete Forum Thread with Replies

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

How Do I Prevent Zoom And Play/Loop Controls?
I've seen people disable users from right clicking on flash items and zooming etc, how is this done? does anyone know?

Nest An Accordian Component In Another Accordian Problem
So what i am trying to do is nest an accordion component inside another accordion. I can get it to work in that they both show up. My problem lies with the 2nd accordion inside, i cant figure out where i need to set the height/width. Every place i tried to change it, it keeps it about the same size, which is about 1/3 of the area that exists. Here is the code that i've put together so far:


Code:
import mx.controls.*;
import mx.containers.*;
import mx.controls.gridclasses.DataGridColumn;


var EntAgBusArray = [["Title 1","Description 1"],["Title 2","Description 2"]]


this.createClassObject(Accordion, "mainSystems_acc", 7, {_x:0, _y:0});/* {_x:12, _y:291});*/
mainSystems_acc.setSize(Stage.width,Stage.height);

// Level 1 - list the pathways
// add the children to the Accordion component
var agbusSys = mainSystems_acc.createChild(mx.core.View, "sys1", {label:" Job System Category 1"});
var animalSys = mainSystems_acc.createChild(mx.core.View, "sys2", {label:" Job System Category 2"});
var envSys = mainSystems_acc.createChild(mx.core.View, "sys3", {label:" Job System Category 3"});

// Level 2 - List the jobs
agbusSys.createClassObject(Accordion, "agbus_jobs", getNextHighestDepth(), {_x:10, _y:0,});

// populate the sub accordion with text areas
var agbusSys_job1 = agbusSys.agbus_jobs.createChild(mx.core.View, "abjob1", {label:" "+EntAgBusArray[0][0]});
agbusSys_job1.createClassObject(TextArea, "agbus_acc", getNextHighestDepth(),{_x:0, _y:0});
agbusSys_job1.agbus_acc.setSize(300, 200);
agbusSys_job1.agbus_acc.text = EntAgBusArray[0][1]
agbusSys_job1.agbus_acc.wordWrap = true

var agbusSys_job2 = agbusSys.agbus_jobs.createChild(mx.core.View, "abjob2", {label:" "+EntAgBusArray[1][0]});
agbusSys_job2.createClassObject(TextArea, "agbus_acc", getNextHighestDepth(),{_x:0, _y:0});
agbusSys_job2.agbus_acc.setSize(300, 200);
agbusSys_job2.agbus_acc.text = EntAgBusArray[1][1]
agbusSys_job2.agbus_acc.wordWrap = true
the 2nd part of the problem is that i am trying to write a loop for popluating the sub areas, but it isnt working out so well. Here is what i tried to put together for the section (suppose to do the same thing as everything below "populate the sub accordion with text areas" above)


Code:
for (i=0; i<3; i++){
var ["agbusSys_job"+i] = agbusSys.["agbusSys_job"+i]createChild(mx.core.View, "abjob"+i, {label:" "+EntAgBusArray[0][0]});
["agbusSys_job"+i]createClassObject(TextArea, "agbus_acc"+i, getNextHighestDepth(),{_x:0, _y:0});
["agbusSys_job"+i]["agbus_acc"+i]setSize(300, 200);
["agbusSys_job"+i]["agbus_acc"+i]text = EntAgBusArray[0][i]
["agbusSys_job"+i]["agbus_acc"+i].wordWrap = true

}
Any help or suggestions you have would be greatly appreciated. Thanks for your time.

XML Connector - Change Index
I am using the XML connector to pull in data for a new apartment complex. I have a floor plan on the complex and am using an invisible button for a mouse over in which I want to display the number, sq feet, etc. The issue is I don't know how to make the XML go to that record when the button is moused over.

Any help is appreciated. Thanks

Is It Possible To Change The Tab Index Color?
I was wondering if it was possible to change the highlight color of tabbed elements, specifically buttons? When tabbed to, buttons have a yellow rectangle highlight by default. Is it possible to change this color and if so how?

Take care,
shayne

How Can A Component Detect It's Own Index Change?
If I have a component (A) based on a Canvas container, and it's index changes due to another component (B) being added to the same parent container as component "A", how can I have component "A" listen for it's own change in index?

I have tried listening for the IndexChangedEvent.CHANGE but to no avail.

How I Change The Controls
i have a swf game and i want to change controls....how i do that?

Change Text Color Of Fl.controls.textarea
I want to have a mixture of colors for a textarea object. Something like black text, then red text, then black text.

I don't want to use html text, because these are dynamically generated strings and I don't want users to put in their own html.

What I want to use is setTextFormat, but textarea is not a subclass of textfield.

Anyone have any other ideas?

Racing Game - Please Help How Do You Change The Controls Of The Car To Letter Keys?
Racing game - Please Help! How do you change the controls of the car to letter keys like w is accelorate and s is slow down - etc. Right now the controls are in a bad place and i cant chage them to letter keys. Here are the game files: http://www.1matthew.com/flash/racesummer.rar . The game is posted at: http://www.1matthew.com/flash/racesummer.swf I'm still building the game. the actionscript for the blue car is:

onClipEvent (enterFrame) {
// make the car go forward
if (Key.isDown(Key.HOME)) {
speed += .5;
}
// make the car go backwards
if (Key.isDown(Key.END)) {
speed -= 1;
}
// tells the car to slow down after the speed of 20
if (Math.abs(speed)>6) {
speed *= .7;
}
// you can change the rotation of the car to your desire
if (Key.isDown(Key.DELETEKEY)) {
_rotation -= 5;
}
if (Key.isDown(Key.PGDN)) {
_rotation += 5;
}
// here is where the hittest is for the boundary
speed *= .98;
x = Math.sin(_rotation*(Math.PI/180))*speed;
y = Math.cos(_rotation*(Math.PI/180))*speed*-1;
if (!_root.land.hitTest(_x+x, _y+y, true)) {
_x += x;
_y += y;
} else {
speed *= -.6;
}
}

***. Arrarys, Finding Index, Loading Called Pic From Found Index
I am fairly new to flash, so thanks for bearing with me - here is my problem -
1. I have a bunch of associated arrays, populated from an xml file.
2. I have a dyn mc that displays thumbs, based on the info from the arrays.
3. if the user clicks on the thumb, I want the on release to trigger (among other things) a function that will find the index of, say, "houseID" so I can then apply that index in loading up a different(big) jpg , and other info pertinent to that thumb.
here is my code for the button:
on (release) {
//carry ID being the variable passed thru "oneHouse" function
CarryID=this.houseID;

trace("houseid"+houseID);
_parent.oneHouse(CarryID)
//"big" being the frame label
_parent.play("big")
}

-----------------------
here is code from a frame -

foundIndex = findByID(CarryID);
if (foundIndex != null) {
/*set dynamic textbox values from Arrays
all this stuff is not set up yet...
txtLocation = houseLocationArray[foundIndex];
txtBed = houseBedArray[foundIndex];
txtBath = houseBathArray[foundIndex];
txtPrice = housePriceArray[foundIndex];
//set dynamic jpeg clip from value of photoArray
loadMovie(houseBigpicArray[foundIndex], BigphotoClip);
*/

trace("foundIndex!=null");

}
else{
trace("foundIndex really=null");
}

function findByID(houseID) {
//loop through the IDArray
for (j=0; j<houseIDArray.length; j++) {
//if the passed argument equals an Array value...
if (houseIDArray[j] ==houseID) {
//return the index of the matching value
return j;

}
}
//if nothing is ever found, return null
trace("foundIndex2=null");
return null;
}

gotoAndStop("big");

}

thanks for anyone that can help me with this!!

***. Arrarys, Finding Index, Loading Called Pic From Found Index
I am fairly new to flash, so thanks for bearing with me - here is my problem -
1. I have a bunch of associated arrays, populated from an xml file.
2. I have a dyn mc that displays thumbs, based on the info from the arrays.
3. if the user clicks on the thumb, I want the on release to trigger (among other things) a function that will find the index of, say, "houseID" so I can then apply that index in loading up a different(big) jpg , and other info pertinent to that thumb.
here is my code for the button:
on (release) {
//carry ID being the variable passed thru "oneHouse" function
CarryID=this.houseID;

trace("houseid"+houseID);
_parent.oneHouse(CarryID)
//"big" being the frame label
_parent.play("big")
}

-----------------------
here is code from a frame -

foundIndex = findByID(CarryID);
if (foundIndex != null) {
/*set dynamic textbox values from Arrays
all this stuff is not set up yet...
txtLocation = houseLocationArray[foundIndex];
txtBed = houseBedArray[foundIndex];
txtBath = houseBathArray[foundIndex];
txtPrice = housePriceArray[foundIndex];
//set dynamic jpeg clip from value of photoArray
loadMovie(houseBigpicArray[foundIndex], BigphotoClip);
*/

trace("foundIndex!=null");

}
else{
trace("foundIndex really=null");
}

function findByID(houseID) {
//loop through the IDArray
for (j=0; j<houseIDArray.length; j++) {
//if the passed argument equals an Array value...
if (houseIDArray[j] ==houseID) {
//return the index of the matching value
return j;

}
}
//if nothing is ever found, return null
trace("foundIndex2=null");
return null;
}

gotoAndStop("big");

}

thanks for anyone that can help me with this!!

2 Player Game. Moving Cars Controls Help With Controls
hi i have the controls for car number 1 that would be the arrow keys if

(Key.isDown(Key.RIGHT)) {
this._rotation += manuverSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._rotation -= manuverSpeed;
}
if (Key.isDown(Key.UP)) {
if (speed<speedMax) {
speed += accel;
}
} else if (Key.isDown(Key.DOWN)) {
if (speed>-speedMax) {
speed -= accel;
but how can i make controls for car 2 ... i wann use wasd but i cant figure out how the key.a doesnt work.

Accordian
the effect Im looking for like an accordian effect?

like at www.24-7.de but everything I try looks rubbish and not like the effect acheived here Im using gotoAndPlay statements is this the best way or is there a much more effective way that I cant find

any help would be great!

How To Prevent People Asking How To Prevent "click To Activate And Use This Control"
When I visit the fourms, I keep seeing these questions about how to disable
"click to activate and use this control". Its really annoying and
disrupting my web experience. I do know this really this is a blatant
attack on Adobe and Flash by Microsoft and is obviously related to the Adobe
takeover of Macromedia, and probably also related to the fact that it is now
impossible for anyone to install Flash Player (which Adobe is ignoring
because their support is so useless since the takeover). Is there something
I can do to prevent these questions being posted? I've searched all the
forums and cannot find any information. Surely someone else has had this
problem.
--
Jeckyl

2004 Accordian
Hello, ive set up an accordian using a flashform application with 13 different areas. Everything there works fone, no problems. I want the accordian to work so that instead of having the rollouts coming top to botttom, have them side to side, i thought u could simply rotate the instance of the component but apparently not. Does any1 know how to do this? thanks alot

[F8] Control Accordian With AS
I've got an accordian with 4 videos loaded into it. It works great. I used the accordian so that people can go to this page and watch all of the videos from the site in one place. You can get to this page through mutiple links(well... 4 links). What I want is for the user to be directed to certain videos when they visit this one page. So if they are on page 2 with a link to a video about cars then when they click it I want the accordian to slide to the car segment and start playing. I actually have this working except the corresponding accordian button doesn't go up. So I get the sound of the video with no picture and it is on the wrong accordian slide. Long story short; is there a way to control which slide the accordian starts with? Essentially an accordian gotoAndPlay.

Accordian Menu Help
Ive been at this for a week now, trying to build a straightforward accordian menu, translating an existing as2 menu into as3. I desperately need help, I've reach my conceptual ends in terms of code knowledge. Could someone please take a look at what I've got and what I need to do to get it working? I've included the AS3 file I've been working on and well as the AS2 files I've been referencing and attempting to translate. Any help really be appreciated...also, here is the code I have so far below.

----

var menuName:String = new String();
var menuNum:Number = new Number();
var menuStartY:Number = new Number();
var menuMoveY:Number = new Number();
var maskStartH:Number = new Number();
var maskMoveH:Number = new Number();
var maskTargetH:Number = new Number();
var maskClose:Number = 5;
var maskOpen:Number = 400;

menu1_mc.addEventListener(Event.ENTER_FRAME, menuCoords);
menu2_mc.addEventListener(Event.ENTER_FRAME, menuCoords);
menu3_mc.addEventListener(Event.ENTER_FRAME, menuCoords);
menu4_mc.addEventListener(Event.ENTER_FRAME, menuCoords);

function menuCoords (e:Event):void
{
menuStartY = e.currentTarget.y;
maskStartH = e.currentTarget.menuMask.height;
maskMoveH = maskTargetH - maskStartH;

menu1_mc.addEventListener(MouseEvent.CLICK, menuMove);
menu2_mc.addEventListener(MouseEvent.CLICK, menuMove);
menu3_mc.addEventListener(MouseEvent.CLICK, menuMove);
menu4_mc.addEventListener(MouseEvent.CLICK, menuMove);
}

function menuMove (e:Event):void
{
menuName = e.currentTarget.name;
menuNum = (e.currentTarget.name.charAt(4)) - 1;
menuMoveY = e.currentTarget.y + (e.currentTarget.menuMask.height + 20);
e.currentTarget.y = menuStartY + menuMoveY / 2;
e.currentTarget.menuMask.height = maskStartH + maskMoveH /5;
}

Accordian Navigation
Can anyone point me to any tutorial or source code of an accordian navigation system? I need to do something similar to this:

http://www.corporatewebdesigns.net/accordianMenu.html

I don't need to have the subnav buttons, I just need the menu to be able to expand and collapse to show the content.

Any help appreciated, thanks!































Edited: 09/20/2008 at 12:35:09 AM by JC74

Accordian Menu
Hey people,

does anyone know of a good tutorial for how to create an accordian menu.

Thanks in advance.

mark

Accordian Menu
Hey people,

does anyone know of a good tutorial for how to create an accordian menu.

Thanks in advance.

mark

Accordian Menu
Anyone know of a good tutorial on how to make a menu like the one at ... http://www.boffi.com

Thanks so much.

Accordian Component Help
I am building a music application in flash. Using coldfusion CFC's, it dynamically pulls artist, album and song info from a user's hard drive. I want to use an accordion component to display the albums and the songs. Being new to the accordion component, my question is: Is it possible to dynamically populate the accordian component? I noticed that any movie clips have to be exported for use in actionscript. Since I don't know how many Children there are going to be until a user selects an artist, I can't create it statically. Hope this makes sense. Let me know what you think.

Thanks ALOT in advance.

-Whybother w/flash

Index.html Vs. Index.swf (fullscreen) Help
Hi,

I am working on a site and what I am trying to get is the flash movie to load full screen (so there is no scroll bars). How can I set it so that when they go to the website it loads the index.swf file and not the .html file

my example is www.iccimmigration.com/index.swf (this is what I want, no scroll bars)

The index.html file with all margins set to 0... but what happens is when someone views the site with a higher screen resolution the movie is only half the screen.

www.iccimmigration.com

I hope that made some sense. I want it to load the .swf file not the .html

Drag Controls Override All Other Controls On Movie?
I have a movie that loads into the main timeline and can be dragged around using:


on (press) {
startDrag("");
}
on (release) {
stopDrag();

}

That works great except that to close that movie again I've added a little button to say on press, unload movie.

Problem is none of the buttons or links on that page will work while it is being dragged around. How can I make the links and buttons work but still make the movie draggable?

Accordian Component Question
Just wonderin if its possible to have movieclips for the labels in the accordian component?? Any help or ideas would be awesome.

http://www.nexomedia.com/Temp/accordianportfolio.html

Accordian Style Masking
Hello,

I am trying to make a masking effect that on rollover/rollout expands/collapses the masks of the focused masked image wile collapsing the rest horizontally...This is a technique that is similar to accordion type menu and the menu icons on the new OSX for Macs...has anyone seen any thread, articles, or tuts on this subject matter

thanks for oyur help in advance

Kendall

Here's an update

I managed to come up with a technique however its stil flawed

code:
var maskObject:MovieClip = maskMc;
var maskPos:Number = maskObject._x;
var imageObject:MovieClip = imageContainer;
var speed = 7;
var changing = 0;
function LoadImage() {
imageObject.loadMovie('images/'+image);
}
function Collapse(collapseTo:Number) {
if (changing>0) {
clearInterval(changing);
}

maskObject.onEnterFrame = function() {
ChangeWidth(collapseTo);
};

//changing = setInterval(this, "ChangeWidth", 100, collapseTo);
}
function Expand(expandTo:Number) {
if (changing>0) {
clearInterval(changing);
}

maskObject.onEnterFrame = function() {
ChangeWidth(expandTo);
};

//changing = setInterval(this, "ChangeWidth", 100, expandTo);
}
function ChangeWidth(tWidth:Number) {
if (Math.abs(Math.round(maskObject._width)-tWidth)>1) {
dist = maskObject._width-tWidth;
maskObject._width -= dist/7;
} else {
maskObject._width = tWidth;
delete maskObject.onEnterFrame;
}
maskObject._x = (leftSibling._x+leftSibling._width+4)/7;
}
LoadImage();
this.onEnterFrame = function() {
maskObject._x = leftSibling._x+leftSibling._width+4;
};

Then i call it by a mousover with...
code:
_root.slide1.Collapse(15);
_root.slide3.Collapse(15);
_root.slide4.Collapse(15);this._parent.Expand((this._parent.imageContainer._ width-(19*3)));

Problem is they do not maintain spacing consitancey so it isnt as fluent as it should be

How To Build An Accordian Menu That Looks Like This...
Hi.

I would like to develop a flash accordion menu based upon the attractive vertical nav bar on this site.

http://www.minershardware.com/

Note: this is a static nav bar. Does anyone have any example action script code that they can refer to that I may be able to easily utilize (I'm no Action Script expert but I am good at examining intuitive code and reutilizing it)

Any help would be appreciated.

Horizontal Accordian Menu
Hello All,

Could someone please direct me towards a tutorial for a horizontal accordian menu?

Something that looks like http://www.jumboshrimp.com

thanks

Loading XML Into Flash Accordian
Hi,

I am new to script, i need help in loading an XML List into Flash Accordian in Flash CS3.
Please help me in this regard, thanks in Advance

Regards
Ranjith Kumar. Bandi

Accordian Component Only Works Once
Hi -
I have a web page with an Accordian component on it here:
http://www.newpixelcity.com/test/size_test2.html

If you test it you'll see that the Accordian only works for one try.

Can anyone explain how to fix this??

TIA your help.
JL

Accordian Style Navigation
Hey can anyone help i need to build a menu like the old vw.co.uk site although its changed now. if anyone remembers what the navigation was like.

i want the menu items all on the left and then to move to the right when clicked revealing the content in the centre of the stage.

if anyone has any ideas drop me an email, jim_wib@hotmail.com

Hidden Nav Bar Accordian Effect How To
Looking for a menu tutorial or similar action with this navigation at http://www.studioe2.com/fs.html. After building the buttons I am not sure where I go next. It appears that it might be a masking of some sort. Any help, jumpstart, direction to a tute, or another thread on this forum would be greatly appreciated.

Thanks,
Gazzer

Dynamic Datagrid In Accordian
Hi all

I have a problem with creating and then populating a datagrid from an XML file.

The .as code below creates a dynamic accordian menu then populates it with either textArea or datagrid. However, the first dataGrid is created and populated with no problems. When the next one gets created it seems to be trying to populate it with the data from the first XML node. Which i dont want to happen


private function createDocumentation():void {
for (var i:int = 0; i < generatorProperties.documentation.length; i++) {
var c:Canvas = new Canvas();
var vbox:VBox = new VBox();

c.percentWidth = 100;
c.percentHeight = 100;
c.label = generatorProperties.documentation[i].heading;

vbox.percentWidth = 96;

for (var j:int = 0; j < generatorProperties.documentation[i].sections.length; j++) {

if (generatorProperties.documentation[i].sections[j].image.substr(0,6) != 'TABLE_') {
var t:TextArea = new TextArea();
t.percentWidth = 100;
t.id = 'test_' + i + '_' + j;
t.enabled = false;
t.text = generatorProperties.documentation[i].sections[j].information;

vbox.addChild(t);
} else {
var tableInformation:XML = new XML(generatorProperties.documentation[i].sections[j].information);
var dgataGrid = new DataGrid();
dg.percentWidth = 100;
dg.dataProvider = tableInformation.row;
vbox.addChild(dg);
}
}

c.addChild(vbox);
generatorProperties.documentationAccordian.addChil d(c);
}
}

Below is an extract of the that i would like to populate the accordian with

<section_4 title="Customizing iGallery With Actionscript">
<para_1 image="">As well as using the attributes in the xml and setting parameters in the component inspector. Further control can be added to the iGallery with Actionscript by calling methods, setting properties and creating responders for events.</para_1>
<para_2 image="">The following is a list of methods, events and properties :</para_2>
<para_3 image="TABLE_METHOD">
<row a="iGallery.loadXML('_xmlfile_')" d="Loads _xmlfile_ into gallery" />
</para_3>
<para_4 image="TABLE_EVENT">
<row a="onLoadFinished" d="Triggered when xml file loads and before styles applied. <br /> evtObj.pics is an array of objects, each contains pic and caption" />
<row a="onStylesFinished" d="Triggered when xml file defines styles. <br /> evtObj.styles is an object containg all styles" />
<row a="onThumbLoaded" d="Triggered when thumbnail finishes loading. <br /> evtObj.thumb is reference to thumbnail" />
<row a="onThumbOver" d="Triggered when thumbnail is rolled over. <br /> evtObj.thumb is reference to thumbnail" />
<row a="onThumbOut" d="Triggered when thumbnail is rolled out. <br /> evtObj.thumb is reference to thumbnail" />
<row a="onThumbPress" d="Triggered when thumbnail is clicked. <br /> evtObj.thumb is reference to thumbnail" />
</para_4>
<para_5 image="TABLE_PROP">
<row a="autoLoadXML" d="Boolean :: Determines if xml is loaded when component loads. Default - true. <br /> Should be set to false when invoking iGallery.loadXML()" />
<row a="disableThumbs" d="Boolean :: Determines if default rollover effects are used. Default - false. <br /> Set to true when setting custom rollovers using onThumbOver and onThumbOut" />
<row a="defaultXML" d="String :: Default xml file for gallery to use. Default - iGallery.xml." />
</para_5>
</section_4>

Basically, when a 'para' node has an image that begins with 'TABLE_' then i wish to have a datagrid created that gets populated with the row nodes.

If anyone can help, or anyone is willing to help, but cannot understand what i have attempted to describe, please let me know and i will try and get a link up for you to check.

Thanks

Problem With Accordian Tutorial
I tried to do the tutorial about "accordian video"
but the files does'nt work...
i can listen the video, but the screen is white... i can't see the video
can you help me?

this is my :

_global.style.setStyle("themeColor", "haloOrange");

var s:Sound = new Sound();
s.attachSound("click");

var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns:NetStream = new NetStream(nc);
var ns2:NetStream = new NetStream(nc);
var ns3:NetStream = new NetStream(nc);
var ns4:NetStream = new NetStream(nc);

var child1 = acc.createChild("vid","BNn",{label:"Birdy Nam Nam",icon:"vidIcon"})
child1.flv = "http://www.makaink.com/flv/BNN_dvd.flv";
child1.nets = ns;

var child2 = acc.createChild("vid","Dub",{label:"Dub Stories",icon:"vidIcon"})
child2.flv = "http://www.makaink.com/flv/BNN_dvd.flvdubstoriesteaser.flv";
child2.v.attachVideo(ns2);
child2.nets = ns2;

var child3 = acc.createChild("vid","elisa",{label:"Elisa trailer",icon:"vidIcon"})
child3.flv = "http://www.makaink.com/flv/ElisaSoMassiveTrailer.flv";
child3.v.attachVideo(ns3);
child3.nets = ns3;

var child4 = acc.createChild("vid","BNn",{label:"Birdy Nam Nam",icon:"vidIcon"})
child4.flv = "http://www.makaink.com/flv/BNN_dvd.flv";
child4.v.attachVideo(ns4);
child4.nets = ns4;

child1.v.attachVideo(ns);
ns.play(child1.flv);

var whoIsOn = child1;

var accList = new Object();

acclist.change = function() {
whoIsOn.nets.close();
whoIsOn = acc.getChildAt (acc.selectedIndex);
whoIsOn.nets.play(whoIsOn.flv);
s.start();
}

acc.addEventListener("change", accList);

Good Accordian Component Tutes?
Anyone know of any good tutes or books that cover the accordian component? I've looked around and can't find anything but the MM Livedocs, which aren't cutting it for me.

Problem With Accordian Style Navigation
Hi all.

Im working on my portfolio site and have decided to take the 'load external swfs onto a base swf' route.

One of the external swfs is an accordian style menu that looks like this



This works perfectely as long as it is a seperate swf. But when I load the swf into a movie clip on the base swf, it doesn't work. - the motion, nor the links. Its just static. I have uploaded a picture of what it shows here:



Basically its becomes non-functional when I load it externally. What should I change in the code of the swf of the accordian menu ?

Accordian Or Collapsible Menu Question
I am trying to create a dynmic collapsible menu and I am stuck trying to load the submenu with in or under the main menu items. Here is my attempt code and source file


Code:
/////////////////////////////////////////
//////////////// VARS ////////////////
/////////////////////////////////////////
var xPos = 20;
var yPos = 40;
var curPos = menuItem[i].height;
/////////////////////////////////////////
//////////////// ARRAY ////////////////
/////////////////////////////////////////
var menuItem:Array = new Array();
menuItem[0] = {label:"ANIMUS", link:"#"};
menuItem[0].subMenuItem = new Array();
menuItem[0].subMenuItem[0] = {label:"HISTÓRIA", link:"movies/historia.swf"};
menuItem[0].subMenuItem[1] = {label:"EQUIPE", link:"movies/equipe.swf"};
menuItem[0].subMenuItem[2] = {label:"PREMIAÇÃO", link:"movies/premiacao.swf"};
menuItem[1] = {label:"CLIENTES", link:"http://www.google.com"};
menuItem[2] = {label:"PORTIFÓLIO", link:"#"};
menuItem[2].subMenuItem = new Array();
menuItem[2].subMenuItem[0] = {label:"BRANDING", link:"movies/branding.swf"};
menuItem[2].subMenuItem[1] = {label:"EMBALAGEM", link:"movies/embalagem.swf"};
menuItem[2].subMenuItem[2] = {label:"MERCHANDISING", link:"movies/merchandising.swf"};
menuItem[2].subMenuItem[3] = {label:"AMBIENTE DE VAREJO", link:"movies/ambiente_de_varejo.swf"};
menuItem[3] = {label:"DESIGN ESTRATÉGICO", link:"movies/design_estrategico.swf"};
menuItem[4] = {label:"CONTATO", link:"movies/contato.swf"};
/////////////////////////////////////////
// CREATING BUTTONS AND ATTRIBUTES ////
/////////////////////////////////////////
for (i=0; i<menuItem.length; i++) {
attachMovie("container", "new"+i, i, {_x:xPos, _y:yPos});
yPos += this["new"+i]._height;
this["new"+i].label_txt.text = menuItem[i].label;
this["new"+i].url_btn._url = menuItem[i].link;

// this is were the errors start
if (menuItem[i].subMenuItem.length>=0) {
for (j=0; j<menuItem[i].subMenuItem.length; j++) {
attachMovie("subContainer", "subNew"+j, j, {_x:xPos, _y:yPos});
yPos += this["subNew"+j]._height;
this["subNew"+j].subLabel_txt.text = menuItem[i].subMenuItem[j].label;
this["subNew"+j].subUrl_btn._url = menuItem[i].subMenuItem[j].link;
trace(menuItem[i].subMenuItem[j].link);
}
}
// this is were the errors stop

trace(menuItem[i].link);
}

when tested two problems happen imediatley. The menu breaks apart and only loads the values after the last submenu . Also in the output panel the submenu links are outputed before the main menu links. I have been stuck with this all day PLEASE PLEASE help me

Accordian Style Image Portfolio...
Hello everyone. I'm looking for a little guidance on how to do something. I've been trying to figure out the best way to do this for awhile but, it eludes me. I just don't know enough about AS... yet. I was hoping there are a few out there who could just point me in the right direction.

I am trying to make an accordian style portfolio. Imagine a row of horizontal columns, click here for visual example . When you click on one column it expands (resizes) to the width and height of the image to be loaded based on an xml file. If another image is already open that image would fade out and the column would resize back to its original width and height.

Main problem is, I can't get past figuring out how to do both, the loading and creation of the columns by xml and also the dynamic resizing of the columns at the same time. I can either do, the xml and have the images load and columns made or just make the columns sort of move and behave like i want them to with no images. I seem to only get so far and then as soon as i try to incorporate another feature I get confused and lost as to how to go about it.

Below is the AS I have so far and if you click here you can see what it looks like so far although, things are just kinda stacked on top of each other.

ActionScript Code:
fscommand("fullscreen", false);

var pictures:Array = new Array();
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("photo.xml");
lineTo
function loadXML(loaded){
if (loaded){
photoNode = this.firstChild.childNodes;
for(var i = 0; i< photoNode.length; i++){
pictures.push(photoNode[i].attributes.name);
xWidth = photoNode[i].attributes.xSize;
yHeight = photoNode[i].attributes.ySize;
var picFrame:MovieClip = holder.attachMovie("frame", "frame" + i, i);
picFrame.container.loadMovie(pictures[i]);
picFrame._x = i*(30);
picFrame.border._width = xWidth;
picFrame.border._height = yHeight;
//
picFrame.border.xWidth = xWidth;
picFrame.border.yHeight = yHeight;

picFrame.onEnterFrame = checkLoadProgress;
}
//trace("loaded");
}
else{
trace("failed");
}
}

function checkLoadProgress(){
var bLoaded = this.container.getBytesLoaded();
var bTotal = this.container.getBytesTotal();

if (bLoaded && bLoaded == bTotal)
{
this.border._width = this.xWidth;
this.border._height = this.yHeight;
this.onEnterFrame = null;
}
}

I hope, it will eventually work something like this, which i made (along with 100 other attempts) using onClipEvent. But, I couldn't figure out how to integrate it with the images loaded from xml and also have them dynamically resize to the size of the image. Maybe I just need to look at it again.

Please, I would love to hear any advice on this or even just ask me questions about it to clarify the idea. It might help me to figure out some things.

Thanks.
jensou

Accordian Menu In Custom Scroll Pane - Little Bug Help
Hi Peepers & Peepettes;

Alignment issue with Accordian Menu in Custom Scroll Pane. It's almost there....

Go to:
http://www.aerosol.ws/_main.html
>> head to the KOMRADES section,
>> click on PRODUCTION DESIGNERS

When the sub-section opens, the drag-scroll pane adjusts the height of the target_mc, but doesn't move adjust the _y value so that the menu system remains at the same place you clicked on. Make sense...? I thought not.

It's just a matter of proportionally setting the target_mc._y value in the window, but I can't get it working.


Here are my source files:
http://www.dotandpixel.com/test/aerosol/aerosol_pkg.zip

Attaching Movei Clip To Accordian Component
I want the Accordian Component for my simple application, whats the procedure to attach movie clips, buttons, and symbols to accordian component. I searched the Web but don't find enough easy information to do it.

Scenario is that i want three headers named "For Non Registered Users"
"For Registered Users"
"For guests"

and i want appropriate movieclips, other components and buttons under each header. Please anyone tell me how to do it.

Fullscreen Vertical Accordian Portfolio Site
Hi all.

I found this file on flashkit that I would love to use as my portfolio, however it is for text only and not images and I need it to be images. So when you click the title you would open a filmstrip of horizontal images that can be clicked on.

http://www.flashden.net/files/14829/index.html

filmstrip of images like this, with a scrollbar that stays centered

http://www.designwright.co.uk/

has anyone seen anything like this before, or the approach to take to do this. I have average flash skills...THANKS ALOT!

Fixed Width Accordian Style Menu...HELP
Greetings,

this is my first posting here on kirupa.com although I have found it to be an invaluable resource for my growth as a Flash designer, and am indebtted to the whole community for their spirit and willingness to share knowledge.

So here is my quandry; I am attempting to develop a fixed width menu consisting of 8 horizontally aligned, evenly sized buttons (actually MC's at this point). Each button is a black and white image slice that ,upon rollover, I want to fade into color and then expand to it's full size, while at the same time the other buttons shrink in relation to the fixed width of the movie and the growth of the "on" button.

So far I have been able to come up with the trasitions for the individual buttons, but have not been able to connect them in this cause/effect relationship.

I have had some help with getting set in the right direction with actionscripting, eg. "get width", "get x", and "grow/shrink", but as of yet have been unable to tie all of the threads together.

I feel like this is a lot to ask for but would greatly appreciate and help available be, it tutorials or any other means to learn this technique.

Thanks in advance!

lukeg

Slow Swf Playback Of Accordian Menu. Code Problem?
Last edited by baruag : 2005-10-09 at 01:30.
























Have a look at
http://www.kraftedlogic.com

As you will see, the box on the extreme right (Recent Work) is the one I am talking about and is staggering when it appears and also lags when you press on one of the buttons. Please heeeeeeelp !! I think there is some problem with the code and since I am not at all a pro at coding I have no idea what the problem could be.

This box which is on the right (Recent Work)
http://img395.imageshack.us/img395/...centwork1zh.png

I would like it to work as smoothly as it does on the following site (http://www.rangashankara.org/). And it does work this smoothly when the code for that component is playing in its own seperate fla. file.

You can download the source file from
http://kraftedlogic.com/kl_base site3.zip

Thank you

Valid 3d Equation
Can anybody tell me;
a) If this is a valid method for rendering a 3d shape
b) Does it help anyone understand 3d calculations better
http://www.nlc.net.au/~oceana/3dmenu1.swf
I looking to do a tutorial if this method is correct.
BlinkOk

Is This Valid Code?
Is it valid to do something like the following? Will it cause leaks? Will it actually delete the sndClick sound object?


Code:
setButtons = function()
{
.
. other code
.
var sndClick = new Sound(this);
sndClick.attachSound("idBuildButton");
sndClick.start();
sndClick.onSoundComplete = function()
{
delete this;
}
}

IS This Code Valid?
I am trying get a static HTML page to load into a frame using getURL as below while disabling some buttons/MC. The enabling and alpha works but the page is not loading. The getURL code works when I am not in the loadPage function, but inside it doesn't. Is this not valid?

function loadPage() {
filmMC.enabled = false;
filmButton.enabled = false;
filmMC._alpha = 50;
getURL("http://www.mysite.com/page.html", "content");
}

Is This Actionscript Valid?
I am trying get a static HTML page to load into an html frame on another static html page when a button is pressed. I am using getURL as below while disabling some buttons/MC. The enabling and alpha works but the page is not loading. The getURL code works when I am not in the loadPage function, but inside it doesn't. Is this not valid?

function loadPage() {
filmMC.enabled = false;
filmButton.enabled = false;
filmMC._alpha = 50;
getURL("http://www.mysite.com/page.html", "content");
}

Is This A Valid Statement?
Hi,

I'm trying to get some transition in my scenes but can't seem to work the "if" statement right.

if(scroll_mc._y = 5.9) {
gotoAndPlay(22)
}

When a button is release it sends a scroll pane to the bottom of the stage. I was hoping to get the movie to goto the next frame after the scroll pane had move all the way down.

Can someone shed some light?

Cheers

Schpitz

Valid / Well Formed XML
Hi!

When loading XML files is there any way of checking the file to see if it's both well formed and valid? (AS 2)

Cheers

Valid Syntax?
I have some code but I don't know actionscript, however it does look slightly wrong. Can someone please verify whether this code is valid actionscript?

again_btn.onRelease = function(){
getURL("javascript:dcsMultiTrack('DCS.dcsuri',:/corp/multiplechoice/quiz.html'"WT.ti','PlayAgain')");
}

Thanks in advance.

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