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




3D XML Driven Carousel...Preloader?



I have this nifty little 3D Carousel http://www.expocadvr.com/temp/main.html which I learned to build at www.gotoandlearn.com

I would like to know if it is possible to add a preloader.

One that is visible while the xml images are loading...or one that hides the xml images until they are all loaded...either one is fine with me...any ideas?



SitePoint > Design Your Site > Flash and Actionscript
Posted on: Dec 19, 2007, 12:18


View Complete Forum Thread with Replies

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

3D XML Driven Carousel...Preloader?
I have this nifty little 3D Carousel http://www.expocadvr.com/temp/main.html which I learned to build at www.gotoandlearn.com

I would like to know if it is possible to add a preloader.

One that is visible while the xml images are loading...or one that hides the xml images until they are all loaded...either one is fine with me...any ideas?

3D XML Driven Carousel...Preloader?
I have this nifty little 3D Carousel http://www.expocadvr.com/temp/main.html which I learned to build at www.gotoandlearn.com

I would like to know if it is possible to add a preloader.

One that is visible while the xml images are loading...or one that hides the xml images until they are all loaded...either one is fine with me...any ideas?

Carousel Driven By Arrows/buttons
I am trying to achieve the carousel effect but if i click on the button it would rotate to a specific item in the carousel.
I seen lee brimelow make the papervision version but I dont want to use papervision because of the size.

anyone seen a tutorial or know anywhere i can find it ? I dont want the carousel moving with the MOUSE left and right or moving at all .. just when i click on item5 .. it will rotate to item 5.. etc..

please help.

Carousel Driven By Arrows/buttons
I am trying to achieve the carousel effect but if i click on the button it would rotate to a specific item in the carousel.
I seen lee make the papervision version but I dont want to use papervision because of the size.

anyone seen a tutorial or know anywhere i can find it ? I dont want the carousel moving with the MOUSE left and right or moving at all .. just when i click on item5 .. it will rotate to item 5.. etc..

please help.

Adding Hyperlink To XML Driven Carousel :SOLVED:
Hello all ^_^

Had to join this forum as it is the best one I've seen recently, lots of appreciation to all the admin who run this forum as well as Lee himself :)

I recently followed the carousel tutorials and i loved them so much that i would like to utilise them on my new website that im currently making.

There are a couple of (hopefully) simple tweaks that i would like to know how to do...if theres anyone out there who could help it would be greatly appreciated :)

1. Is there a way of making a hyperlink appear when you click on the icons in the carousel? for example i would like to utilise this carousel in my portfolio, and i would like icon to be a project, and when they are clicked i would like there to be a summary of the project, then a 'View Website' link at the bottom? is this possible?

2. Lastly is there a way of making the carousel stop more often....at the moment due to all of the complex calcultions that the actionscript in the carousel, it apears that the only time you can fully stop the carousel is at the very center pixel on the stage...is there a way of making say the middle 20 pixels stop the carousel stop?

Thankyou very much to anyone who has taken the time to read it :)

Pete Butler

XML Driven Slideshow As Site Preloader
Hey All,

I'm a realtive newbie and this is my first call for help and I am in a Jam! We have been creating our company's website through a consultant. I design and he programs in Flex and it has been moving along well. But as many of you experinece the scope creeped and we hit a few bugs and the budget is toast and the consultant is onto his next gig tomorrow. The site is done, but folks here are really upset that there is a loading bar and expect me to fix it.

So our site app is a respectable 345kb, but I need a better preloader. My concept is to use a XML/Flash slide show as the preloader. Give 'em a little slide show to pass the time while our main site app loads. Once loaded shut it down and move on.

I have used the slideshow_as2.fla posted by others www.kirupa.com/forum/showthread.php?p=2211226 here as a standalone but I have no idea how to adapt it to serve as the preloader for our site. I know it is probably nobrainer for someone who knows what they are doing. The other catch is that is needs to load the our site app (main.swf) externally. We want to be able to tweak the slide show or change altogether without having to recompile the main app.

Anyone up for the challenge? You'll really be saving my bacon.

Rob

The Carousel - Preloader For XML And/or PNG?
Hey I'm loving the Carousel turtorials. I was testing out the carousel on a computer with a slower internet connectin and noticed the icons pop up at different times. Anyone know of a good way to create a preloader for the XML file and/or the PNG images that are loaded into flash?

Thanks

3D Carousel II Preloader
Hi

I've searched the forum for an answer but had no luck.

Can someone tell me if it's possible to preload the PNG files?

Thanks!

Key Driven Cursor
Hello, folks.

(Flash MX, btw)

I'm trying to create a key-driven cursor using 3 seperate keyframes and the gotoAndStop(); command. Here's the code:


Quote:





Key 45
myListener = new Object();
myListener.onKeyDown = function () {
if (Key.isDown(key.UP)) {
gotoAndStop(55);
}
else if ( Key.isDown ( key.DOWN ) ) {
gotoAndStop(50);
}
}
Key.addListener(myListener);

Key 50
myListener = new Object();
myListener.onKeyDown = function () {
if (Key.isDown(key.UP)) {
gotoAndStop(45);
}
else if ( Key.isDown ( key.DOWN ) ) {
gotoAndStop(55);
}
}
Key.addListener(myListener);

Key 55
myListener = new Object();
myListener.onKeyDown = function () {
if (Key.isDown(key.UP)) {
gotoAndStop(50);
}
else if ( Key.isDown ( key.DOWN ) ) {
gotoAndStop(45);
}
}
Key.addListener(myListener);






This works for a few seconds, but after trying to cycle through multiple times, the engine grinds to a halt (along with my computer) and I am offered the chance to shut the script down. Does anyone know how I can fix this, or perhaps a better way of making this? Thanks.

XML Driven Menu
Hello

I really need some help. I have an xml driven flash menu. I only used it for getting direct urls. Now I want, that no URLS are loaded but I want that there is directly a movie loaded on lavel0 in the flash movie:

<?xml version="1.0" encoding="iso-8859-1"?>
<menus>
<button name = "About">
<subitem name = "Mission" location="test.swf"></subitem>
<subitem name = "News" location="test.swf"></subitem>
<subitem name = "Recognition" location="test.swf"></subitem>
</button>

<button name = "Profile">
<subitem name = "Niklaus Gerber" location="test.swf"></subitem>
<subitem name = "Skills" location="test.swf"></subitem>
<subitem name = "Magic" location="test.swf"></subitem>
<subitem name = "Friends" location="test.swf"></subitem>
</button>

<button name = "Work">
<subitem name = "Customer" location="test.swf"></subitem>
<subitem name = "Customer" location="test.swf"></subitem>
<subitem name = "Customer" location="test.swf"></subitem>
<subitem name = "Customer" location="test.swf"></subitem>
<subitem name = "Customer" location="test.swf"></subitem>
<subitem name = "Customer" location="test.swf"></subitem>
<subitem name = "Customer" location="test.swf"></subitem>
<subitem name = "Customer" location="test.swf"></subitem>
<subitem name = "Customer" location="test.swf"></subitem>
</button>

<button name = "Laboratory">
<subitem name = "Lab 0001" location="test.swf"></subitem>
<subitem name = "Lab 0001" location="test.swf"></subitem>
<subitem name = "Lab 0001" location="test.swf"></subitem>
<subitem name = "Lab 0001" location="test.swf"></subitem>
</button>

<button name = "Photography">
<subitem name = "Session XY" location="test.swf"></subitem>
<subitem name = "Session XY" location="test.swf"></subitem>
<subitem name = "Session XY" location="test.swf"></subitem>
<subitem name = "Session XY" location="test.swf"></subitem>
<subitem name = "Session XY" location="test.swf"></subitem>
<subitem name = "Session XY" location="test.swf"></subitem>
</button>

<button name = "Video">
<subitem name = "Session XY" location="test.swf"></subitem>
<subitem name = "Session XY" location="test.swf"></subitem>
<subitem name = "Session XY" location="test.swf"></subitem>
<subitem name = "Session XY" location="test.swf"></subitem>
</button>

<button name = "Contact">
<subitem name = "E-Mail" location="test.swf"></subitem>
<subitem name = "Info" location="test.swf"></subitem>
<subitem name = "Guestbook" location="test.swf"></subitem>
</button>

</menus>

can anyone tell me how to do this? best regards, Niklaus

Database Driven?
Looking at this site

http://www.beatport.com

what programs / technologies did they use with flash to make the sound clips play? is this database driven? can anyone help me with a little info or where i can find info?

thank you in advance!

Xml Driven Navigation...
does anyone now of a downloadable script which works like this example:

http://www.uniform-sweden.com/root.html

XML Driven Menu
Hi,

i've been cracking my head on flash menu driven by xml. I saw a couple of example of xml driven menu that has the button to load external pages. What i would like to do is to "loadMovie" onto the stage instead of opening URL everytime the button is pressed.

XML Driven MP3 Player, Plus....
i have made xml driven mp3 players... BUT, how can I get them to work in MySpace? does anyone know how to create an XML driven MP3 player that will work in myspace?

Thanks

XML Driven Slideshow
Hi all. I need to make an XML driven slide show. The XML should contain the path name (of the jpeg), name and description (that shows in the swf movie, in the dynamic text box). Can anybody help me get started? Or maybe poitn me to a tutorial where I could learn? Please help guys I really need this. Thanks!

Looking For XML Driven Menu
I am looking for an xml driven menu like the one at http://www.rollingstone.com/

Does anyone know where there is one available or know anyone who builds these type things?

Xml Driven Flash
Hi All,

Im new pretty new to XML in flash and I have recently been set a project where I need to load XML into flash to create drop down menus, and these menus each will load 5 pieces of information into flash.

firstly, could someone let me know if my attached XML document is looking correct and heading along the rigth lines?

secondly, is there a tutorial somewhere that will help me to create a dymamic drop down menu entirely from XML?

each drop down will be as follows:

each "text for step" is loaded after one another, into a dynamic text field. when you get to the last one and click next, the "open URL" will call an html page to be opened.

Code:
+ DropDown
+ menuItem1
- text for step
- text for step
- text for step
- text for step
- text for step
- open URL
+ menuItem2
- text for step
- text for step
- text for step
- text for step
- text for step
- open URL
+ menuItem3
- text for step
- text for step
- text for step
- text for step
- text for step
- open URL
+ menuItem4
- text for step
- text for step
- text for step
- text for step
- text for step
- open URL
Any answers to any of the question are appreciated

Thanks

Xml Driven Navigation
Forgive me, as coding is not my forte. I'm trying to generate buttons derived from an xml file, and attach the created buttons to a movie clip. Right now, nothing is appearing within the movieclip. Any help or suggestions are greatly appreciated.




Code:
_global.itemArray = new Array();
var button_spacing = 45;
var button_count = 0;
total_button_count = 0;

// ATTACH MOVIES
this.attachMovie("mButton","mButton",this.getNextHighestDepth(), {_x:950, _y:350});
this.attachMovie("mcMenu","mcMenu",this.getNextHighestDepth(), {_x:1024, _y:250});
this.attachMovie("arrow","arrow01",this.getNextHighestDepth(), {_x:480, _y:50});

//CLASSES/////////////////////////////////////////////////////////////////////////////////////////////
nButton = function() { };
nButton.prototype = new MovieClip();
nButton.prototype.init(my_pic, my_header, my_client, my_date1, my_desc, my_fulldesc)
{
this.curPic = my_pic;
this.curHeader = my_header;
this.curClient = my_client;
this.curDate = my_date1;
this.curDesc = my_desc;
this.curFullDesc = my_fulldesc;// CHANGED FOR FULL DESC
}

motionButton.prototype = new nButton();
stillButton.prototype = new nButton();
interactiveButton.prototype = new nButton();

Object.registerClass('wButton', nButton);

function CreateButtons (nHeader){
var button_mc = _root.mcMenu.attachMovie("wButton", "item" + total_button_count, total_button_count, {_x:0, _y:0});
button_mc._y = button_count * button_spacing;



// ASSIGN XML
button_mc.wName.text = nHeader;
_global.itemArray.push(button_mc);
item_count++;
total_item_count++;

};

var workArray = new Array();
var xmlWork:XML = new XML();
xmlWork.ignoreWhite = true;
xmlWork.onLoad = function (): Void {
items_list = xmlWork.firstChild.childNodes;
for ( i=0; i < items_list.length; i++ ) {
CreateThumbs(items_list[i].attributes.Header); // CHANGED FOR FULL DESC

}
};

xmlWork.load("work.xml");

Prototyping In AS3, Driven Mad...
Hi, I am a veteran coder (25 years of coding almost) but a newbie to AS3,

The code below in AS3 strict mode


ActionScript Code:
/*———————————————————————————————————————————————————————————————————————————
  FUNC: String.ltrim [PROTOTYPE]
  TASK: Returns a copy of the string without the whitespaces at the beginning.
  ARGS: (this) : String : implicit object instance.
  RETV:     : String : String without the whitespaces at the beginning.
  ———————————————————————————————————————————————————————————————————————————*/   
String.prototype.ltrim = function(): String {
var i: uint,
   l: uint = this.length;
    for(i=0; i < l; i++) if(this.charCodeAt(i)>32)return(this.substring(i));
    return('');
}   
var s: String = '  Needs left trimming';
trace(s);
trace(s.ltrim());
gives 1061: Call to a possibly undefined method ltrim through a reference with static type String.

And when I replace


ActionScript Code:
trace(s.ltrim());
with
ActionScript Code:
trace(s["ltrim"]());

It works without any problem. So AS3 CAN compile it in strict mode...
Then why can not I use it in a logical oo styled fashion s.ltrim() ?
And who is the genious in Adobe, making the String class final ?

Is there anyone who knows a workaround:
Without recompiling the compiler and Without disabling the strict mode?

Thanks indeed for reading.

Xml Driven Menu... My AS Needs Help
okay, i'm learning how to use XML to create menus and control them...

i'm piecing together some tutes and what not to try to figure this out.

here's my AS:

Code:
var item_spacing = 18;
var item_count = 0;
function CreateMenu(menu_xml){
var items = menu_xml.firstChild.firstChild.childNodes;
for (var i=0; i<items.length; i++) {
if (items[i].attributes.type == "button") {
// variables from xml
var action = items[i].attributes.action;
var variables = items[i].attributes.variables;
var getname = items[i].firstChild;
var item_mc = menu_mc.attachMovie("menu_item","item"+item_count, item_count);
item_mc._y = item_count * item_spacing;
item_count++;
menuitem_mc.namez.text = getname.firstChild.nodeValue;
menuitem_mc.button.onRelease = function(){Actions[this.action](this.variables)};

}
}
}
// create new XML object instance, remembering to ignore white space
var my_xml = new XML();
my_xml.ignoreWhite = true;
//after xml load creat menu function
my_xml.onLoad = function(success){
if (success) CreateMenu(this);
else trace("Error loading XML file"); // no success? trace error (wont be seen on web)
}
// load the xml file!
my_xml.load("menu.xml");
and here's my XML:
<?xml version="1.0" ?>
<menu>
<menuitems>
<item type="button"
action="_root.content.loadMovie"
variables="home.swf">
<name>home</name>
</item>


<item type="button"action="_root.content.loadMovie" variables="about.swf">
<name>about</name>
</item>


<item type="button"action="_root.content.loadMovie" variables="work.swf">
<name>work</name>
</item>

<item type="button"action="_root.content.loadMovie" variables="portfolio.swf">
<name>portfolio</name>
</item>


<item type="button"action="_root.content.loadMovie" variables="links.swf">
<name>links</name>
</item>


<item type="button" action="_root.content.loadMovie" variables="contact.swf">
<name>contact</name>
</item>

<item type="button"
action="load swf" variables="respect.swf">
<name>respect</name>
</item>

</menuitems>
</menu>

my .fla works in that flash goes through the xml and creates 7 buttons for my 7 main xml nodes. I'm having trouble getting the value of the <name> node into my dynamic text box though (nothing shows up). I tried doing it as an attribute to the the <item> node as well with no luck.

Also if somebody could check how I create the "actions" and "variables" variables from the xml and try to use them to assign actions to my xml generated buttons, that would be great as I'm still not sure what is good AS and what ain't...

arrrggghhh.... one day i will figure this all out and feel good about myself.!
thanks for any help!

Player Help - Xml Driven Mp3
Hi,

I have been working on a different effect for a xml driven mp3 mini player; it consists of three buttons that plays, pauses and unpauses. Only one button is displayed on screen, to its user. Now the problem I've got is that when the song ends, the button shown is either pause or unpause; due to once the play button is initially pressed its visibility is set to false. Now, when the songs ends it stops until the user clicks the play button; however the play button at present is invisible; so I need a way to display the play button when the song ends, so the user can start it again, and pause and unpause as normal.

I have attached the code.

Quite a challenge, but the effect will be unique. Clbeech where are you?


Kind Regards,

Boxing Boom








Attach Code

stop();

var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(100);

var sa:Array = new Array();
var cps:Number = -1;

//*************************
var pos:Number;
//*************************

var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i = 0;i<nodes.length;i++)
{
sa.push(nodes[i].attributes.url);
}
}
xml.load("songs.xml");

function playSong():Void
{
s = new Sound();
if(cps == sa.length-1)
{
cps = 0;
s.loadSound(sa[cps], true); //True makes it streaming
}
else
{
s.loadSound(sa[++cps], true); //True makes it streaming
}
}


var stepDown:Number = 3;
var stepUp:Number = 1;
var vol:Number = 100;

toggleSound1_btn._visible = true;
toggleSound3_btn._visible = false;

//this is the 'play' button
toggleSound1_btn.onRelease = function() {
playSong(), this._visible = false;
}


//this is the 'pause' button
toggleSound2_btn.onRelease = function() {
pauseSound();
toggleSound3_btn._visible = !toggleSound3.btn._visible;
this._visible = false;
}

//this is the 'unpause' button
toggleSound3_btn.onRelease = function() {
unPauseSound();
toggleSound2_btn._visible = !toggleSound2.btn._visible;
}


//*******************************
function pauseSound():Void
{
pos=s.position;
s.stop();
}


function unPauseSound():Void
{
s.start(pos/1000)
}

//*******************************

XML Driven Flv Player
Hi,

I need to create an XML driven flv player, now I know how to construct the player, but not sure of the code for the XML to hold just one flv file, not a list of them just the one.

I need my flv player to play just one flv file; as soon as its run on the web, it needs to play only one flv video. No need to pick it from any list etc... This way the client can simply edit the XML file to play a different flv video.

Kind Regards,

Boxing Boom





























Edited: 02/04/2008 at 04:36:34 AM by Boxing Boom

XML Driven Captions
Hi, I have a video player with captions which are displayed underneath. When fullscreen is clicked the captions are neatly displayed over the bottom of the video. This is fine for nearly all videos except the current one I want to display which has a ticker style scroll of information at the bottom.

I therefore want to move the subtitles up. I know that I can remove the black background and simply include spaces in the XML file to move them up, But I actually would prefer the black background.

My question therefore is whether there is a way to set the position of the fullscreen subtitles (in actionscript or elsewhere)? Ive searched the net for a while and cant find anything anywhere....

XML Driven Captions
Hi, I have a video player with captions which are displayed underneath. When fullscreen is clicked the captions are neatly displayed over the bottom of the video. This is fine for nearly all videos except the current one I want to display which has a ticker style scroll of information at the bottom.

I therefore want to move the subtitles up. I know that I can remove the black background and simply include spaces in the XML file to move them up, But I actually would prefer the black background.

My question therefore is whether there is a way to set the position of the fullscreen subtitles (in actionscript or elsewhere)? Ive searched the net for a while and cant find anything anywhere....

XML Driven Captions
Hi, I have a video player with captions which are displayed underneath. When fullscreen is clicked the captions are neatly displayed over the bottom of the video. This is fine for nearly all videos except the current one I want to display which has a ticker style scroll of information at the bottom.

I therefore want to move the subtitles up. I know that I can remove the black background and simply include spaces in the XML file to move them up, But I actually would prefer the black background.

My question therefore is whether there is a way to set the position of the fullscreen subtitles (in actionscript or elsewhere)? Ive searched the net for a while and cant find anything anywhere....

XML Driven Menu - Please Help
Hi, I have been playing around with the XML-Driven Drop-Down Menu - which I have to say a great tuturial, just have a question...

How would I include target="_self" (or its equivilent) so the links would appear in the same browser window?

below is an example of the xml I'm using...

Thanks in advance for reading/helping


<?xml version="1.0"?>
<menu name="links">
<menu name="GROUP CLASSES">
<item name="Fall Schedule" action="gotoURL" variables="http://www.macromedia.com/software/flash/>
<item name="Summer Schedule" action="gotoURL" variables="http://www.macromedia.com/software/dreamweaver"/>
</menu>
<menu name="PRIVATE CLASSES">
<item name="Info" action="gotoURL" variables="http://www.kirupa.com"/>
<item name="Rates" action="gotoURL" variables="http://www.kirupaforum.com/forums/index.php"/>
<menu name="tutorials">
<item name="actionscript" action="gotoURL" variables="http://www.kirupa.com/developer/actionscript/index.htm"/>
<item name="photoshop" action="gotoURL" variables="http://www.kirupa.com/photoshop/index.htm"/>
<item name="web" action="gotoURL" variables="http://www.kirupa.com/web/index.htm"/>
</menu>
</menu>
<menu name="BIRTHDAY PARTIES">
<item name="Info" action="gotoURL" variables="http://www.kirupa.com"/>
<titlegraphic symboltype="string">webwaswon.swf</titlegraphic>
<item name="Rates" action="gotoURL" variables="http://www.kirupaforum.com/forums/index.php"/>
<menu name="tutorials">
<item name="actionscript" action="gotoURL" variables="http://www.kirupa.com/developer/actionscript/index.htm"/>
<item name="photoshop" action="gotoURL" variables="http://www.kirupa.com/photoshop/index.htm"/>
<item name="web" action="gotoURL" variables="http://www.kirupa.com/web/index.htm"/>
</menu>
<menu name="BIRTHDAY PARTIES">
<item name="Info" action="gotoURL" variables="http://www.kirupa.com"/>
<item name="Rates" action="gotoURL" variables="http://www.kirupaforum.com/forums/index.php"/>
<menu name="tutorials">
<item name="actionscript" action="gotoURL" variables="http://www.kirupa.com/developer/actionscript/index.htm"/>
<item name="photoshop" action="gotoURL" variables="http://www.kirupa.com/photoshop/index.htm"/>
<item name="web" action="gotoURL" variables="http://www.kirupa.com/web/index.htm"/>
</menu>

</menu>
<item name="google" action="gotoURL" variables="http://www.google.com"/>
</menu>

XML Driven Menu Help
I've got a bit of a quandary on my hands and I was hoping some kind soul would have a simple solution to my problem.

I'm trying to create an XML driven menu for my portfolio site. I'm basing the code concept off Senocular's tutorial on this site, but I'm basing the aesthetic/operational idea off portfolio menus such as those seen on iso50.com and basically every other portfolio site that uses small thumbnails as icons to present larger versions of the work.

Functionally, I think I've got it down (it's basically the tutorial code with the submenu functions stripped out), but I'm struggling with trying to figure out how to display my attachMovie'd items in a logical row/column fashion... i.e. if I had 7 items in my XML file and wanted the row to exist in threes, I'd have two rows of three and one row of one.

I'm sure there's a very simple solution to this that I'm simply overlooking. I was just thinking about trying to implement this via some type of counter/multiplier for the _y property. Perhaps after lunch I'll give that more thought, but if someone has advice in the meanwhile, I'd appreciate it very much.

Help With AS Driven Button
Hi all,

I just need a little help to finish of this bottom I am creating for an offline Flash interactive piece I am doing.

Thanks to you helpful jokers, I got some advice on how to animate this button without the use of Tweens, but with Actionscript instead. I am trying to develop my knowledge of AS, so am trying to create this interactive solely (well almost soley) with AS.
So here's how it is:

When you enter the interactive, all the buttons are as below:
[img=http://img331.imageshack.us/img331/9076/initialstate7dg.th.jpg]
Then when you rollover individual buttons they look like this:
[img=http://img331.imageshack.us/img331/6258/rollover0cf.th.jpg]
I have got this working using the following AS:

Code:
on (rollOver) {
var colorful = new Color("_root.graphics.text");
colorful.setRGB(0xFFFFFF);
}
on (rollOut) {
var colorful = new Color("_root.graphics.text");
colorful.setRGB(0x034008);
}
on (rollOver) {
_root.graphics.bg.onEnterFrame = function() {
if (_root.graphics.bg._alpha<100) {
_root.graphics.bg._alpha += 25;
} else {
_root.graphics.bg.onEnterFrame = null;
}
};
}
on (rollOut) {
_root.graphics.bg.onEnterFrame = function() {
if (_root.graphics.bg._alpha>0) {
_root.graphics.bg._alpha -= 25;
} else {
_root.graphics.bg.onEnterFrame = null;
}
};
}
where 'graphics' is the Instance name of the button, and 'text' is the Instance name of the text within the button that changes colour.

What I would like to know, is when I click the button to load an external .swf, how do I keep the button in it's 'rollover' state when you move your mouse off it?

As it is, after I click the button and my .swf loads, it returns to its initial state when I roll off it. I'm guessing there isn't a lot to fix this problem, but I just seem to be having problems with AS.

If anyone could help, that would be sweet,

ta very much

Enforcer73

Help With XML Driven Menu
Hi guys,

I'm new to this forum and to Action Script. I'm currently working on a web site for a client and I need a menu that is generated from an external XML document. I've followed this excellent tutorial by senocular http://www.kirupa.com/developer/acti...down_menu6.htm and was able to achieve much of what I needed.


What I would like the menu to do is when I select a section on the main menu, all sections that are lower then the selected section would drop down and leave room for the subsections of the selected section. When another section is selected, the previously opened section would be closed and then the selected section would open. (If the previous lines are not clear, please have a look at the zipped files, you should understand). I don't know how to "talk to" the mc that constitute the main menu and tell them to move.

Xml Driven Menu Again
Hello

I 'm trying to modify Kirupa's xml driven menu : I would like to load the menu in a movieclip and then hide the menu elements as the submenus elements on rollout. If anyone has an idea...


thanx jp

XML Driven GetURL
Got a real problem on my hands.

My Flash project is xml driven, and refernces external pages using the old:

getURL("[var here]","_self");

Imagine my delight when testing my project to find out that the xml driven getURL, doesnt recognise the ampersand!

I've tried: "%26" as per
http://www.adobe.com/cfusion/knowled...fm?id=tn_14143
I've even tried "#%26", "&", "&" its very annoying, infact I'm rather upset about the whole thing.

(my website references products using "Products.aspx?ID=179&MediaType=Flash")

please help me and many others!!

Help With XML Driven MP3 Player
Hey Guys,

I have a very frustrating issue!

I am trying to integrate an MP3 player into a flash site im building. I have made it as far as to integrate a player i grabbed off the web, with some modifications. It is an MP3 Player with an XML playlist, which is exactly what i want. The only this this player does not have which I NEED! i cannot stress enough, --NEED-- is for the music to play streaming, with the current scripting it requires 100% preload of the mp3 before the play function is called through (ie. bytesloaded == bytestotal)

I though it would be as simple as saying something along the lines of if loaded = 5% of total, play. but no matter what i did to try to make this work it produced no results whatsoever.

What i need is to have a player with the key elements: play, pause, next, artist and track info and progress bar (seekable) with a button to expand and hide the playlist. I cannot believe to my utter disbelief that there is no single flash mp3 player that i have found (in 4 hours of searching) that has these simple requirements (streaming and collapsable XML driven playlist)

Here is the code for the current player im modding, but any other suggestiongs for decent players (fully customizable skin is required) i would certainly be open to them.


ActionScript Code:
//defines a new sound objectmusic = new Sound(this);trkInfo = new Date();//comment these three lines if you don't want it to play on startupplaying = false;paused = false;loading = true;/////////////////////////////////////////////////////////////////////sets the beginning slider attributesvol_mc.slider_mc._x = 70;bal_mc.slider_mc._x = 50;pos_mc.slider_mc._x = 0;pos_mc.slider_mc._visible = false;vol_mc.slider_mc.slider.useHandCursor = false;bal_mc.slider_mc.slider.useHandCursor = false;pos_mc.slider_mc.slider.useHandCursor = false;scroller_mc.slider_mc.slider.useHandCursor = false;loop_mc.radio_mc.useHandCursor = false;shuffle_mc.radio_mc.useHandCursor = false;//controls which song is highlighted in the playlist, see attacherfunction select(){ for(i in playlist_mc.target_mc){  if(playlist_mc.target_mc[i].songNum != songNum){   playlist_mc.target_mc[i].gotoAndStop(1);  }  else{   playlist_mc.target_mc[i].gotoAndStop(2);  }    } }songNum = 0;numTracks = songInfo.content.length;//attacher: attaches the playlist movies, select() is called herefor(i = 0; i < numTracks; i++){ songInfo.content[i].songNum = i; playlist_mc.target_mc.attachMovie("playlistItem", "item" + i, (i+1), songInfo.content[i]); playlist_mc.target_mc["item" + i]._y = i * 18; if(playlist_mc.target_mc["item" + i].title == songInfo.content[songNum].title){  playlist_mc.target_mc["item" + i].gotoAndStop(2); } else{  playlist_mc.target_mc["item" + i].gotoAndStop(1); }}scrollWindowHeight = 72;scrollMax = (playlist_mc.target_mc._y + playlist_mc.target_mc._height) - scrollWindowHeight;//if there's not enough to scroll, there will be no handleif(playlist_mc._height <= scrollWindowHeight){ scroller_mc.slider_mc._visible = false;}else{ scroller_mc.visible = true;}//loads the songmusic.loadSound(songInfo.content[songNum].path, false);//this is what makes the music fade when you hit the stop buttonfunction fadeOut() { if (music.getVolume()>0) {  music.setVolume(music.getVolume()-5); } else {  music.stop();  pos_mc.slider_mc._visible = false;  pos_mc.slider_mc._x = 0; }}//this function is called when the first song ends, or the next button is press.  It moves to the next songfunction nextSong(){  if(loop == true and skipLoop != true){   music.stop();   music.start(0, 0);  }  else{   if(shuffle == true){    songNum = Math.floor(Math.random()*(numTracks-1));   }   else{    songNum++;    if(songNum == songInfo.content.length){     songNum = 0;    }   }  loading = true;  playing = false;  paused = false;  select();  if(skipLoop == true){   skipLoop = false;  }  music.loadSound(songInfo.content[songNum].path, false);  }   }//self explantory =)function prevSong(){ songNum--; if(songNum < 0){  songNum = songInfo.content.length - 1; }    loading = true;  playing = false;  paused = false;    select();  music.loadSound(songInfo.content[songNum].path, false); }//this function controls the text in the info window and what actions the player will take next based on what button is pressedthis.onEnterFrame = function() { dur = music.duration; pos = music.position; total = music.getBytesTotal(); loaded = music.getBytesLoaded();  //preloader if (loading == true) {  if (music.getBytesLoaded() == music.getBytesTotal() and dur > 0){   loading = false;   playing = true;   music.start(0,0);   music.setVolume(vol_mc.slider_mc._x);   music.setPan((bal_mc.slider_mc._x-50)*2);   status = "playing";   pos_mc.slider_mc._visible = true;  }  else{   pos_mc.slider_mc._visible = false;      if(music.getBytesTotal() != undefined){    artist = Math.round(music.getBytesLoaded()/music.getBytesTotal()*100)+"% loaded";   }   else{    artist = undefined;   }      title = undefined;   status = "loading";  } }  //updates the sound attributes (vol, bal, etc...) and displays their info in the text fields else if (playing == true) {  vol = music.getVolume() + "%";  bal = music.getPan();  if(whichDrag != "pos_mc"){    pos_mc.slider_mc._x = (music.position/music.duration)*100;  }    music.setVolume(vol_mc.slider_mc._x);  music.setPan((bal_mc.slider_mc._x-50)*2);  titleArtist = songInfo.content[songNum].path;  title = songInfo.content[songNum].title;  artist = songInfo.content[songNum].artist;  music.onSoundComplete = nextSong;   } else{  titleArtist = undefined;  fadeOut();  status = "stopped"; }  //controls the scrolling of the playlist if(scrolling == true){  if(playlist_mc._height > scrollWindowHeight){   percentScroll = (scroller_mc.slider_mc._y/(scroller_mc.scrollBg_mc._y + scroller_mc.scrollBg_mc._height));   scrollValue = scrollMax*percentScroll;   playlist_mc.target_mc._y = -(scrollValue);  } }   //displays the time if(timeWay == "forward" or timeWay == undefined){  trkInfo.setSeconds(music.position/1000);  trkInfo.setMinutes((music.position/1000)/60);  trkInfo.setHours((music.position/1000)/3600); } else{  trkInfo.setSeconds((music.duration -music.position)/1000);  trkInfo.setMinutes(((music.duration -music.position)/1000)/60);  trkInfo.setHours(((music.duration -music.position)/1000)/3600); } seconds = trkInfo.getSeconds(); minutes = trkInfo.getMinutes(); hours = trkInfo.getHours();  if(seconds < 10){  seconds = 0 + seconds.toString(); } if(minutes < 10){  minutes = 0 + minutes.toString(); } if(hours < 10){  hours = 0 + hours.toString(); }  trkHrs = Math.floor((music.duration/1000)/3600); trkMin = Math.floor((music.duration/1000)/60); trkSec = Math.floor((music.duration/1000) - (60*trkMin)); if(trkSec < 10){  trkSec = 0 + trkSec.toString(); } if(trkMin < 10){  trkMin = 0 + trkMin.toString(); } if(trkHrs < 10){  trkHrs = 0 + trkHrs.toString(); } if(loading != true){  time = hours + ":" + minutes + ":" + seconds;  totalTrkTime = trkHrs + ":" + trkMin + ":" + trkSec; } else{  time = undefined;  totalTrkTime = undefined; }};///////////////////////////////end onEnterFrame/////////////////////////////////controls the play buttonplay_mc.onRelease = play_mc.onReleaseOutside = function() { if(playing != true or paused == true){  if(loading != true){   if(paused == true){    seconds = pos/1000;    music.start(seconds, 0);    paused = false;   }   else if (loading != true) {    loading = true;    music.loadSound(songInfo.content[songNum].path, false);    //music.start(0,0);   }  } }};//controls the stop buttonstop_mc.onRelease = stop_mc.onReleaseOutside = function () { //if(loading != true){  loading =false;  playing = false;  paused = false;  artist = undefined;  title = undefined; //}};//controls the pause buttonpause_mc.onRelease = pause_mc.onReleaseOutside = function(){ if(playing == true){  if(paused == false){   pos = music.position;   music.stop();   //playing = false;   paused = true;  }  else{   seconds = pos/1000;   music.start(seconds, 0);   paused = false;  } }}//controls the next buttonnext_mc.onRelease = next_mc.onReleaseOutside = function(){ if(loading != true){  skipLoop = true;  nextSong(); }}//controls the previous buttonback_mc.onRelease = back_mc.onReleaseOutside = function(){ if(loading != true){  prevSong(); }}loop_mc.radio_mc.onRelease  = shuffle_mc.radio_mc.onRelease = function(){ if(this._parent._currentframe == 1){  this._parent.gotoAndStop(2); } else{  this._parent.gotoAndStop(1); } if(this._parent._name == "loop_mc"){  if(loop == true){   loop = false;  }  else{   loop = true;  } } if(this._parent._name == "shuffle_mc"){  if(shuffle == true){   shuffle = false;  }  else{   shuffle = true;  } } }//controls the slidersvol_mc.slider_mc.slider.onPress = bal_mc.slider_mc.slider.onPress=pos_mc.slider_mc.slider.onPress=function () { whichDrag = this._parent._parent._name; this._parent.onMouseMove = function() {  updateAfterEvent(); }; this._parent.startDrag(false, 0, this._y, 100, this._y);};vol_mc.slider_mc.slider.onRelease = vol_mc.slider_mc.slider.onReleaseOutside=bal_mc.slider_mc.slider.onRelease = bal_mc.slider_mc.slider.onReleaseOutside=pos_mc.slider_mc.slider.onRelease = pos_mc.slider_mc.slider.onReleaseOutside=function () { if(whichDrag == "pos_mc"){  if(pos_mc.slider_mc._x == 100){   pos_mc.slider_mc._x = 99.5;  }  newPos = (pos_mc.slider_mc._x*(music.duration/1000))/100;  music.stop();  music.start(newPos, 0); } whichDrag = undefined; beenDragged = "pos_mc"; this._parent.onMouseMove = undefined; this._parent.stopDrag(); if(bal_mc.slider_mc._x > 47 and bal_mc.slider_mc._x < 53){  bal_mc.slider_mc._x=50; }};scroller_mc.slider_mc.slider.onPress = function(){ scrolling = true;  this._parent.startDrag(0, this._parent._x, this._parent._parent.scrollBg_mc._y, this._parent._x, this._parent._parent.scrollBg_mc._y + this._parent._parent.scrollBg_mc._height);}scroller_mc.slider_mc.slider.onRelease = function(){ scrolling = false; this._parent.stopDrag();}//controls the button that changes the time display from time elapsed to time left, and vice versatimeButton_mc.onRelease = function(){ if(timeWay == undefined){  timeWay = "back"; } else if(timeWay == "forward"){  timeWay = "back"; } else if(timeWay == "back"){  timeWay = "forward"; }}stop();

XML-Driven Menu Help
hi guys
I got the codes for XML Flash dropdown menu from the very popular
http://www.kirupa.com/developer/acti...pdown_menu.htm
tutorial

i have gotten most of the parts working nicely but now i need one last enhancement
currently the main menu items will revert back to its original state the moment my mouse leaves it
I need the main navigation item to remain in the "rollover-ed" while the sub menu opens
(the main nav item has to have the white background and blue text while the bottom menu is opened)
please refer to my attached main_menu.jpg to have a clearer view of what i mean

I searched through the forums and found this thread
http://www.kirupa.com/forum/showthread.php?t=202137
I have tried the method mentioned but it doesnt seem to work for me



Is there anyone who can help me?
thanks in advance

XML Driven (Name Catalog) ?
Not sure exactly what to call this, so I just went with name catalog heh.

Anyway, I created some images to help better understand what I am looking for. I don't think this is too incredibly difficult. I've created XML driven menus before. This is just a slight twist to it.

Basically I will have a name catalog that only displays 5 names at one time. If there are more than 5 names available you will be able to click on the arrow to retrieve the next 5 names... so on and so forth. You will be able to click the arrow until there is no more names, then you will be able to go back to the previous names.

I appreciate any help, or any insight on how I can achieve this. Usually I could just sit down and plug away at this, but this is really giving me a headache. I hoping somebody might have something like this already laying around...

Thanks for any help.





These images illustrate what I am trying to achieve a little bit better than my words. Well hopefully anyway

Ideas For A New Xml Driven Swf
Ok, so Im new to AS3 - but Ive already gotten a pretty good handle on XML/AS3. I have built a few movies that pull in content from xml and place it via actionscript on the stage.

So I have a new idea for a flash movie, but Im having trouble getting my head wrapped around how to do it. So I wanted to post it here and see what people think.

Basically, I want to pull in an xml feed and create an instance of a movieclip from the library on the stage for each node. Each MC will hold the content from that particular node. These MC's will be set to a timer, and every 5 seconds, the next MC will load. Ok, that part is easy and I have figured that out.

The next piece is animating how they appear on the screen. I want them all to move in from the bottom. So the first one appears, after 5 seconds it moves up off the screen and the second one moves up on the the stage, and so forth. How hard would that be to do? I figured I could use event listeners and timers, Anyone have any example code?

Please let me know

XML Driven Gallery.
I am trying to create XML driven image gallery using AS2. Here is my code.

var myxml:XML=new XML();
myxml.ignoreWhite=true;
myxml.load("gal2.xml");
myxml.onLoad=function(success)
{
xmlnode=this.firstChild;
leng=xmlnode.childNodes.length;
image=[];
for(i=0;i<leng;i++)
{
image[i]=xmlnode.childNodes[i].firstChild.nodeValue;
img_mc.createEmptyMovieClip("p_mc"+i,img_mc.getNex tHighestDepth());
eval("p_mc"+i).loadMovie(image[i])
}
}

but it cannot display anything on the stage. Please help me.

Thanks in advance

XML Driven RollOver Map, Help
I sincerely hope some kind soul can point me in the right direction on this as i feel like my brain is about to explode!

Basically, i have created a simple rollover map of London Boroughs. I have a dynamic text box following the cursor which is populated by an edited version of the Borough MC's instance name. So far so good.

I would really like a way of neatly loading text and image information in a pop-up for each Borough, when that Borough MC is clicked on, via an xml file which contains all relevent data.

I have managed to create a simple xml file to contain the data, and to 'trace' the various required attributes (borough name, data, images, captions), but am unsure how to connect the data to the action of clicking on a particular Borough.

From reading around the many xml discussions (mostly discussing image galleries) i think this involves using a loop array? As i am new to flash i am struggling to find the right way of applying this method in this circumstance.

Please help!

Yours desperately,

dfg

XML Driven Gallery, Please Help.
I have never done an XML gallery, I have read over many tutorials and searched google thoroughly without success.

Basically I want an area on the left of thumbnails with a scroll, represented by the red line, when you click a thumbnail the large version appears in the large black area, doesn't have to be any fancy fade in/out effects, just show up.

The thing is, it needs to be XML driven so that others can add images to the XML file without getting into Flash, any help would be greatly appreciated.

Thank you.

XML Driven Mp3 Player
Hi All,

I just can't seem to figure this out... I want the xml mp3 player automatically play the next song, currently you have to press the next button to play the song. Is there anyway also to have the songs in "queue" load while the current song is playing? Any help would greatly be appreciated! View example


XML Code:
<?xml version="1.0" encoding="UTF-8"?>
<songs>
    <song url="Bob Sinclair - World Hold On.mp3"/>
    <song url="Kings Of Leon - Knocked Up.mp3"/>
    <song url="Josh Ritter - Open Doors.mp3"/>
</songs>

Actionscript Code:
// Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);
 
// Array of songs
var sa:Array = new Array();
 
// Currently playing song
var cps:Number = -1;
 
// Position of music
var pos:Number;
 
// Load the songs XML
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
    var nodes:Array = this.firstChild.childNodes;
    for(var i=0;i<nodes.length;i++)
    {
        sa.push(nodes[i].attributes.url);
    }
    playSong();
}
 
xml.load("songs.xml");
 
z// Play the MP3 File
function playSong():Void
{
    s = new Sound();
    if(cps == sa.length - 1)
    {
        cps = 0;
        s.loadSound(sa[cps], true);
    }
    else
    {
        s.loadSound(sa[++cps], true);
    }
    playPause.gotoAndStop("pause");
}
//added this to try to play the next song
s.onSoundComplete = function(){
this._parent.playSong();
}
//<--------------------end
// Pauses the music
function pauseIt():Void
{
    pos = s.position;
    s.stop();
}
 
// Pauses the music
function unPauseIt():Void
{
    s.start(pos/1000);
}
 
// Music Controls
 
// Play/Pause Toggle
playPause.onRollOver = function()
{
    if(this._currentframe == 1) this.gotoAndStop("pauseOver");
    else this.gotoAndStop("playOver");
}
 
playPause.onRollOut = playPause.onReleaseOutside = function()
{
    if(this._currentframe == 10) this.gotoAndStop("pause");
    else this.gotoAndStop("play");
}
 
playPause.onRelease = function()
{
    if(this._currentframe == 10)
    {
        this.gotoAndStop("playOver");
        this._parent.pauseIt();
    }
    else
    {
        this.gotoAndStop("pauseOver");
        this._parent.unPauseIt();
    }
}
 
// Next Button
next.onRollOver = function()
{
    this.gotoAndStop("nextOver");
}
 
next.onRollOut = next.onReleaseOutside = function()
{
    this.gotoAndStop("next");
}
 
next.onRelease = function()
{
    this._parent.playSong();
}

Xml Driven Mp3 Player
hi cheers for looking, ive been trying to make an xml driven mp3 player for days and every tutorial i try doesnt work, i have a few posts on here asking for help on certain scripts.

i cant get the audio to play no matter what i try

does anyone know of any GOOD tutorials that actually leave you with a working product by the end of it

or would any one be able to take a look at my script and tell me what im doing wrong.

any help would be really appreciated.
thanks

Xml Driven Flv Player?
Does anybody have a fla for it?

XML Driven GuestBook.
I'm loading in an xml file, this one.
Code:

<?xml version="1.0" encoding="iso-8859-1"?>

<guestbook>
<entry>
<myName>Some textSome textSome textSome text</myName>
<myMail>Some textSome textSome textSome text</myMail>
<myText>Some textSome textSome textSome textSome text</myText>
</entry>
<entry>
<myName>Some textSome textSome textSome text </myName>
<myMail>Some textSome textSome textSome textSome text</myMail>
<myText>Some textSome textSome textSome textSome text</myText>
</entry>
<entry>
<myName>Some textSome textSome textSome text</myName>
<myMail>Some textSome textSome textSome textSome text</myMail>
<myText>Some textSome textSome textSome textSome text</myText>
</entry>
</guestbook>


What i would like to do with this beside showing the text, show a number in a textfield (instance name of"veel") with the amount of "entry's" in my xml.
This is my actionscript:
Code:

var xmlLoader:URLLoader = new URLLoader();
var xml:XML = new XML();
var xmlList:XMLList = new XMLList();
var veel:Number = new Number();

xmlLoader.addEventListener (Event.COMPLETE, LoadXML);
xmlLoader.load (new URLRequest("http://edo.site90.net/test.xml"));

function LoadXML (e:Event):void {
      xml = new XML(e.target.data);
      xmlList = xml.entry;
      
                // this doesn't work, obliviously. How do i get it to work?
      veel = xmlList.length();
      hoeveel.text = veel;               

      gb_txt.htmlText = xmlList;
      sbar.update();
}

thx for reading.

XML Driven Content
I have a flash file where it reads from an XML file that is being generated through MySQL and PHP. Here is the XML document..

Code:

<!-- Database: `artKiosk_db` -->
<artKiosk_db>
   <!-- Table projects -->
   <projects>
      <id>1</id>
      <artist>Matt Clark</artist>
      <file>IMG/matt_clark/</file>
      <file_name>file01.jpg</file_name>
      <description>This is Matt Clark's project</description>
      <media>Digital Photograph</media>
      <department>IMD</department>
      <class>MM1123</class>
      <date>Quarter 9</date>
      <client>James Curran</client>
      <display>1</display>
      <featured>1</featured>
   </projects>
   <projects>
      <id>2</id>
      <artist>Lisa La</artist>
      <file>IMG/lisa_la/</file>
      <file_name>file02.jpg</file_name>
      <description>This is Lisa La's project.</description>
      <media>Website Comp</media>
      <department>IMD</department>
      <class>MM1123</class>
      <date>Quarter 8</date>
      <client>James Curran</client>
      <display>1</display>
      <featured>0</featured>
   </projects>
   <projects>
      <id>3</id>
      <artist>Alyssa Tucker</artist>
      <file>IMG/matt_clark/</file>
      <file_name>file01.jpg</file_name>
      <description>This is Alyssa's project</description>
      <media>Digital Photograph</media>
      <department>IMD</department>
      <class>MM1123</class>
      <date>Quarter 9</date>
      <client>James Curran</client>
      <display>1</display>
      <featured>1</featured>
   </projects>
</artKiosk_db>


In Flash, I have created buttons that list each student by creating movie clips. I want to be able to click on those buttons to reveal some of their respective sibling nodes in a new frame on the timeline. Is there a way?

Also, since the XML will be constantly updated with new students and projects, I can't hard code this stuff.

Xml Driven Imagegallery
I'm currently working on a small imagegallery that loads all the thumbs, images and also som text from an xml-file. And i now have som problems that i don't really know how to solve.

The firt problem is in my closePicture funcion. When i click a thumb a bigger image opens.. so far so good. I can then close that image throught a simple mouseclick on it. But if i open a new image without closing the first one i get some strange errors. The gallery don't reallt work 100% yet..
All problems is comin when im about to close images.. I dont get that function to work..

I'm aslo wondering how i can implemate a previous and a forward button to my images?

Some helpt would be great!

CODE
Code:

var imageText:TextField = new TextField();
var xmlTween:Tween;
var imageLoader:Loader;
var xml:XML;
var xmlList:XMLList;
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest("portfolio.xml"));

xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);

function xmlLoaded(event:Event):void
{
    xml = XML(event.target.data);
    xmlList = xml.children();
    var Xer:Number = 0;
    var Yer:Number = 0
    for ( var i:int = 0; i < xmlList.length(); i++)
    {   
        imageLoader = new Loader();
        imageLoader.load(new URLRequest(xmlList[i].attribute("thumb")));
        if(Xer == 249){
            Xer = 367;

        } else {
            Xer = 249;
            Yer += 70;
        }
        imageLoader.x = Xer;
        imageLoader.y = Yer;
        imageLoader.name = xmlList[i].attribute("source");
        addChild(imageLoader);
        imageLoader.addEventListener(MouseEvent.CLICK, showPicture);
    }
}

function showPicture(event:MouseEvent):void
{
   imageLoader = new Loader();
   imageLoader.load(new URLRequest(event.target.name));
   imageLoader.x = 12;
   imageLoader.y = 60;
   addChild(imageLoader);
   imageText.x = imageLoader.x;
   imageText.y = 400;
   for (var j:int = 0; j < xmlList.length(); j++)
   {
      if(xmlList[j].attribute("source") == event.target.name)
      {
         imageText.text = xmlList[j];
      }
   }
   var bar:bottombar = new bottombar();
   addChild(bar);
   bar.x= 1;
   bar.y = 399;
   var bar2:bottombar2 = new bottombar2();
   addChild (bar2);
   bar2.x= 1;
   bar2.y= 500;
   xmlTween = new Tween(imageLoader, "alpha", None.easeIn, 0, 1, 0.2, true);
   imageLoader.addEventListener(MouseEvent.CLICK, closePicture);
}

function closePicture(event:MouseEvent):void
{
   removeChild(imageLoader);
   removeChild(imageText);
}

imageText.autoSize = TextFieldAutoSize.LEFT;
addChild (imageText);


XML
Code:

<?xml version="1.0" encoding="UTF-8"?>
<images>
   <image source="test1.jpg" thumb="liten1.jpg">1</image>
   <image source="test2.jpg" thumb="liten2.jpg">2</image>
   <image source="test3.jpg" thumb="liten3.jpg">3</image>
   <image source="test4.jpg" thumb="liten4.jpg">4</image>
   <image source="test5.jpg" thumb="liten5.jpg">5</image>
   <image source="test6.jpg" thumb="liten6.jpg">6</image>
</images>

Database Driven
Hey guys,
Could say i m a newbie at this...i was wonderin if there is any way to intergrate say mySQL with flash to create a presentation.
I do understand there is a way to just call the "text" into a flash movie as in a news ticker but is there a way to animate that text with say morphing effects or fade in and out effects?
thanks guys

Variable Driven Combo Box.
Who said that the path to flash "Guruness" was easy?
Hi Matt, Pope,
Have a problem with a dynamic combo box I've created.
http://www.media-core.com/combobox.fla.zip
Problem: Can't get my query string to load properly from my database. GAK!!! I know that it's a path issue, but a fresh pair of eyes would be really nice at this point. Cheers folks. Mark

[Edited by dmunro on 03-25-2002 at 09:24 PM]

2 Actions Driven By 1 Button ?
Who can help me with the following (for Flash MX) ?

When pushed, a button must perform two following actions.
The first action is something like "play()" and the next is "gotoAndPlay label x"

Why ?;

I want to slide a graphic into the stage and when another button is pushed, I'd like the first one to slide out and then the next one to slide in.

At this moment I have 1 layer with 3 buttons, 3 layers with graphics, 1 layer with labels and a layer with actions.

Frame 1-10 are empty (a "stop" in frame 1 and 9). The first graphic slides in from frame 10-70 (a stop in 70) and slides back from 71-130 (stop in 130). The next graphic slides in from frame 131-190 (stop) and back from 191-250 (stop). The third.....

One of the buttons has now the following script:
on (press) {
play();
}
on (release) {
gotoAndPlay("2");
}

Where "2" is label 2 or frame 131-250

If I push the button, the graphic under label 1 slides back and when I release the graphic under label 2 slides in. If I release quickly you don't see the slide back and if I hold to long it blocks.

Any suggestions how to do this different or how to drive two actions with one button would be very much appreciated.

BTW; I guess it should be something like:
On (release) {play() "and when you hit stop in any frame ahead" gotoAndPlay("2")

Data Driven Flash?
I have an xls document with information that I would like to incorporate into a flash movie. Does anyone know of any tutorials that explain how to accomplish this? Thanks to anyone with input.

e

LoadMovie Driven By Parameters HELP :(
Hello, I would like to make my SWF know which SWF to load by parameters in the HTML address like this....
http://mypage.com/main.html?whichMovie=movie1

Inside of my SWF, I have this code which doesn't work...

Code:
loadMovieNum(whichMovie+".swf", 1);
Can someone tell me what I am doing wrong, or if it isn't possible?

Thanks

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