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




TRYING TO ASSIGN ACTION (url) To A Button



Hi im trying to give a button an action (geturl) but when i try it says "current selection cannot have actions applied to it" why which state of up over etc do i need to be on so when someone clicks it goes to the page.



FlashKit > Flash Help > Flash Newbies
Posted on: 02-12-2005, 09:39 AM


View Complete Forum Thread with Replies

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

Which Action To Assign Button?
Hi, any help with this would be worth alot to me. its fairly simple....


I am creating a photospread very similar to the one here.... http://www.artcoup5.com

and i need to know how I can create the fade out effect every time I click on a new image.

You'll see on the link about that the current image fades out when another is clicked and a new one fades in. I assume this takes place usiing actions...

I figure I can get it to fade in by assigning each button with an Action>goto> frame that corresponds to pic fading in....


the trick is, when someone clicks on a diff't button, how is the present image going to fade out before the 'goto' action for the fade in takes place?


so F*cking confused. please help me!

Which Action To Assign To Button?
Hi, any help with this would be worth alot to me. its fairly simple....


I am creating a photospread very similar to the one here.... http://www.artcoup5.com

and i need to know how I can create the fade out effect every time I click on a new image.

You'll see on the link about that the current image fades out when another is clicked and a new one fades in. I assume this takes place usiing actions...

I figure I can get it to fade in by assigning each button with an Action>goto> frame that corresponds to pic fading in....


the trick is, when someone clicks on a diff't button, how is the present image going to fade out before the 'goto' action for the fade in takes place?


so F*cking confused. please help me!

Assign Action To Button
I have stopped my movie on frame one. And ihave a button that when pressed should take you to scene2 but i get this error.

Code:
**Error** **Error** Scene=Scene 1,
layer=frendpage , frame=1:Line 1:
Statement must appear within on handler
goScene_btn.onRelease = function (){

Total ActionScript Errors: 1 Reported Errors: 1
.
This button thing is annoying....

Assign An Action To A Button
I need aid, I need to duplicate a button and to assign an action to a
button in I specify, use the following code:

for (i=1; i<=26; i++){
duplicateMovieClip(this.boton,"bot"+i,i);
setProperty("bot"+i, _x, ((i*271)));
"bot"+i.onRelease(
loadMovie("disenos/m"+i+".jpg",_root.destino)
);

}

Please Help me

Trying To Assign An Action To A Button, Keep Getting An Error
I can't figure out what keyframe, symbol, or whatever it is I need to actually add the action to. I want to add this code to a button:

on(release){
gotoAndPlay("Scene1",79);
}

Every time I do and try to test the movie, I am given this error:

**Error** Scene=Scene 1, layer=nav_music, frame=33:Line 1: Mouse events are permitted only for button instances
on(release){

Total ActionScript Errors: 1 Reported Errors: 1

I have no idea what I am doing wrong, especially because I was successfully able to implement this but 2 weeks ago.

Any ideas?

Failed To Assign Action To Button/MC
I wanted to assign action to my MC when I click / release. But if I put it like cube.addListerner, it won't work.

Please help me.

This is where I have the code:

ActionScript Code:
for (var i:Number=0; i < picList.length(); i++) {
                cube=new Cube(materials,60,2,80,10,10,10);
                cube.name="cube" + i;// set instance name

                //trace(cube);
                cube.x=Math.random() * 950 - 460;
                cube.y=Math.random() * 700 - 330;
                cube.z=-5;
                cube.rotationZ=Math.random() * 360;

                scene.addChild(cube);
            }
            cube.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK,objectPress);
            cube.addEventListener(MouseEvent.MOUSE_UP,objectRelease);

        }
        //----------------------------------------------------------------------------------------

        private function objectPress(e:InteractiveScene3DEvent):void {
            trace(materials);
            startDrag();
        }
        private function objectRelease(e:MouseEvent):void {
            stopDrag();
        }

Assign Action To Dynamic Button
Can anyone please help me with this???

I am creating a dynamic group of buttons based on a string that i pass to flash file. There is no problem creating these buttons (that I do duplicating a movieclip from my library) The question is, that i need these buttons to open another page, all buttons the same, but passing a parameter. How can i assign the action to my buttons?

My frame 1 code is at this moment:

for (i=0; i<totalItems; i++) {
_root.attachMovie('loader', 'imageLoader'+i, getNextHighestDepth());
_root['imageLoader'+i]._x = 132*(i);
_root['imageLoader'+i]._y = 1;
_root['imageLoader'+i].imageLoader.loadMovie(_root['img'+i]);
}

The string that flash receives is something like
totalItems=3&img0=pic01.jpg&id0=01&img1=pic02.jpg& id1=02

and the parameter i want to pass to the new page is the value of 'id'.

Thanks in advance!

Assign Action To Dynamic Button
Can anyone please help me with this???

I am creating a dynamic group of buttons based on a string that i pass to flash file. There is no problem creating these buttons (that I do duplicating a movieclip from my library) The question is, that i need these buttons to open another page, all buttons the same, but passing a parameter. How can i assign the action to my buttons?

My frame 1 code is at this moment:

for (i=0; i<totalItems; i++) {
_root.attachMovie('loader', 'imageLoader'+i, getNextHighestDepth());
_root['imageLoader'+i]._x = 132*(i);
_root['imageLoader'+i]._y = 1;
_root['imageLoader'+i].imageLoader.loadMovie(_root['img'+i]);
}

The string that flash receives is something like
totalItems=3&img0=pic01.jpg&id0=01&img1=pic02.jpg& id1=02

and the parameter i want to pass to the new page is the value of 'id'.

Thanks in advance!

How Can I Assign A Button Action To A Duplicated Movieclip?
Hi all,

I come from a design background so you could definitely say I'm not a programmer. Still, I thought I had a pretty intuitive mind when it came to deciphering some actionscript. (HAH!) I downloaded sephiroth's slide menu to get familiar with how that particular actionscript works, and I managed to add more buttons, change the icons, the text, and even figured out placement and spacing and labeled each action accordingly for future reference. Cool, I thought. Then, I proceeded to add the links to the buttons (which are separate swfs that load on level 1). That's when I got in over my head.

Here's my thinking: since all the buttons are generated via actionscript from one movieclip, and the differences between the buttons (icons and text) are determined by the arrays, I figured I could put the swfs in an array and call them that way. But I am unsure how to do determine an event for a button that is "scripted" (terminology?). I'm probably hopelessly lost, but still would like to know if I'm on the right track.

Thanks,

Aeneah

Assign Play And Stop Action To A Button
I'm very much new in Flash, I'm using Flash MX. can someone show me a step by step procedure on how to assign a play and stop action to a button. 'Coz whenever I'm adding a play action in the down state, all the actions are grayed-out and I can't add an action

please help

XML- Is It Possible To Assign More Than 1 "action" To The Button - Senocular Tutorial
I have studied Senocular tutorial at Kirupa : XML- Driven Drop Down Menu at this link an I learnt a lot.

The menu1.xml has a structure like this :
Code:
<?xml version="1.0"?>
<menu name="example">
<item name="example" action="message" variables="this shows an example menu with no real functionality"/>
<menu name="submenu">
<menu name="submenu">
<item name="item"/>
<item name="item"/>
<item name="item"/>
</menu>
<menu name="submenu">
<item name="item"/>
<item name="item"/>
<item name="item"/>
</menu>
<item name="item"/>
</menu>
<menu name="submenu">
<item name="item"/>
<item name="item"/>
<item name="item"/>
</menu>
<item name="item"/>
<item name="item"/>
<menu name="load menu">
<item name="example" action="newMenu" variables="xmlstuff/menu1.xml"/>
<item name="messages" action="newMenu" variables="xmlstuff/menu2.xml"/>
<item name="links" action="newMenu" variables="xmlstuff/menu3.xml"/>
</menu>
</menu>
and the snippet code for action are :

Code:
Actions = Object();
Actions.gotoURL = function(urlVar){
getURL(urlVar, "_blank");
};
Actions.message = function(msg){
message_txt.text = msg;
};
Actions.newMenu = function(menuxml){
menu_xml.load(menuxml);
};
Please have a look at the item name ="example" above. It has an action"message".

So, my question is :Is it possible to assign more than 1 "action" to the item name ="example"? How?

I desperately need your help.

XML- Is It Possible To Assign More Than 1 "action" To The Button - Senocular Tutorial
I have studied Senocular tutorial at Kirupa : XML- Driven Drop Down Menu at this link an I learnt a lot.

The menu1.xml has a structure like this :
Code:
<?xml version="1.0"?>
<menu name="example">
<item name="example" action="message" variables="this shows an example menu with no real functionality"/>
<menu name="submenu">
<menu name="submenu">
<item name="item"/>
<item name="item"/>
<item name="item"/>
</menu>
<menu name="submenu">
<item name="item"/>
<item name="item"/>
<item name="item"/>
</menu>
<item name="item"/>
</menu>
<menu name="submenu">
<item name="item"/>
<item name="item"/>
<item name="item"/>
</menu>
<item name="item"/>
<item name="item"/>
<menu name="load menu">
<item name="example" action="newMenu" variables="xmlstuff/menu1.xml"/>
<item name="messages" action="newMenu" variables="xmlstuff/menu2.xml"/>
<item name="links" action="newMenu" variables="xmlstuff/menu3.xml"/>
</menu>
</menu>
and the snippet code for action are :

Code:
Actions = Object();
Actions.gotoURL = function(urlVar){
getURL(urlVar, "_blank");
};
Actions.message = function(msg){
message_txt.text = msg;
};
Actions.newMenu = function(menuxml){
menu_xml.load(menuxml);
};
Please have a look at the item name ="example" above. It has an action"message".

So, my question is :Is it possible to assign more than 1 "action" to the item name ="example"? How?

I desperately need your help.

Assign Cursor Action To MovieClip Using OnRollOver Action?
Hi all

I have a cool component from FlashLoaded which lets me create brilliant 3d layouts with out much hassle. The componet uses the cursors to zoom in zoom out and pan left and right.

I dont want to have to put an explanation on the site, I would like to put some invisible mc's or buttons on the stage that when the user rolls over them with the mouse it triggers that action.

Is there a simple piece of code i can place on the buttons to make this happen?

Many thanks in advance

Greg

Which Action Should I Assign?
What actions goes to a specific frame of a movie clip within a movie ( ex. 53) and plays from there till the end. My main movie has only one frame, but move clips have 50,60,....., i need to tell him to play from a specific frame within that clip till the end.)

I want to assign an action to one button, so when mouse is clicked, a part of clip is played ( from 53rd frame till stop).

Thanks for help.
__________________
Buby

How Do You Assign An Action To The ENTER Key?
hello!

i have a password text field, and besieds having a submit button, want the user to be able to press ENTER key and send them to a certain frame on time line (say frame 10)

how is this done??

thanks,
tm

Dynamicly Assign Action
Hi there!

I have the folowing .fla wich gets its data from a text file

From there I get a filename that I want to link to.

Everything works fine except the linkin' part.

I am using fscommand folder with .bat files to point to my final docs.

Enclosed is my .fla

Regards

Cant Assign Action To Movieclip
why can't I assign actions to a movieclip or button in CS3 as I could in MX or Flash 8? Am I missing a setting option?

How To Assign Action On Keypress (space Bar)?
Hi Friends...

I am developing a simple game...

I have allow the user to use space bar for easy interactivity..

How can i trace the key pressed ..particularly the space bar.. (.iskeydown or somethin like that?)

Help me pls..

Thanx in advance

How I Assign An Action To A Movie Clip?
How I assign an action to a movie clip??
I made this drop down menu and have hidden buttons so I must
assign the action inside the movie clip and not on the main stage. Is different because I already tried the same way
as if was on the main stage but is not working!!
What I should do? modify something?

Have relation with Instance>track as menu item?
I have NO idea what could be. I really appreciate any guide.

Thanks

Assign Action To Enter/pagedown Key
Is it possible to assign an action to the enter key in the keyboard.

I'm creating a presentation with flash, and I would like to have the "next frame" key to activate not just by clicking on it with the mouse but also by pressing "enter" key or "page down" key, similar to the way we work with Microsoft Power Point.

Is it possible?

Thank you.
Efrat.

How Can I Assign An Action To Only A Single Scene?
How can i assign an action to only a single scene? like i used this snow effect say for example at scene 2, and i want scene 3 to be without snow effect, how can i do that because when i use this code it plays it non-stop even on the other scenes?

I used this snow effect from kirupa...
http://www.kirupa.com/developer/mx/snow.htm

Assign Action To Movie Clip
I have a scene where questions need to be answered before a clock runs out on a bomb. I have created the countdown clock as a Movie Clip that spans the frames where the user is answering questions. When the Movie Clip finishes (gets to zero) no matter where we are in the scene, I want it to go play a new scene.

Help please.

How Can I Assign An Action To Only A Single Scene?
How can i assign an action to only a single scene? like i used this snow effect say for example at scene 2, and i want scene 3 to be without snow effect, how can i do that because when i use this code it plays it non-stop even on the other scenes?

I used this snow effect from kirupa...
http://www.kirupa.com/developer/mx/snow.htm

How To Assign A Code Action Scripts To A Attached Movieclip?
The following code attached a new movie clip from library linkage.

ActionScript Code:
dep = this.getNextHighestDepth();
attachMovie("player", "newplayer", dep);
newplayer._x = 200;
newplayer._y = 600;
Then i wanna add a new code at the newplayer movieclip with these :

ActionScript Code:
onClipEvent (enterFrame) {
    Forward = 65;
    Backward = 68;
    Up = 87;
    Down = 83;
}
i get a suggestion by using these code

ActionScript Code:
_root.newplayer.onEnterframe = function () {
    Forward = 65;
    Backward = 68;
    Up = 87;
    Down = 83;
}
BUT NOT WORKING~!~!!~
PLEASE HELP~!~!~! my email: wkwebsite@yahoo.com

How Do I Assign Get Url In Button
hello im always using flash 5 before , and new to flash 8
the action script is really confusing to me in flash 8
how do i assign a button to open a browser windows

the website is Edward Garmindo : Denim Specialist :wan 2008
i need the browser to open this page Edward Garmindo : Denim Specialist :wan 2008
at the same windows

thanks

How Can I Assign A Keystroke To A Button?
I'm using buttons to initiate actions, but I would prefer to simply make them invisible and respond to keystrokes. Can anyone help me out?

Assign Two Things To A Button
HOw do i assign two things to a button? I want to make it so that if on roll out it goes to frame 1 and if on release it goes to and stays frame 5. THanks for any help.

How Do I Assign A Scene To A Button?
I have downloaded this animated spring button because I like it and want to use it in my site. However, there is an url assigned to the invisible button in the clip.
I want to use the button to jump to the approriate scene in my site movie.
Somehow I can't get it to work. What am I doing wrong?
If there is a workaround or alternative button with simular appearance I'd love to hear that, my site really needs to go live soon.

Assign Text To A Button
How do I assign text to a button using Actionscript?

Assign A Button To A Level
Hello, I'm using this .fla for allowing my swf to go fullscreen:

http://julian.empiregn.com/2007/2/22...ies-with-Flash

The problem is that the swf i'm trying to use this fullscreen script with loads other movie clips on certain layers like 20005, 20010 etc, and this 'toggle fullscreen button' (toggle_btn) gets covered by that content. How do I tell the button to load at a particular level? I know jack, just don't know code. Thank you!


_quality = "HIGH";

v_mc.vtxt = "FP Version: "+getVersion();

Stage.scaleMode = 'noScale';
Stage.align = 'tl';

EventListener = new Object;
EventListener.onResize = function() {
// enter what you want to do on resize, for example:
toggle_btn._y = Stage.height - toggle_btn._height - 10;
}
EventListener.onFullScreen = function( bFull:Boolean ){
// change to fullscreen mode has been detected
if(bFull){
v_mc.vtxt = "You are in Full Screen Mode";
}
else{
v_mc.vtxt = "Everything is back to normal";
}
}
Stage.addListener( EventListener );

toggle_btn.onRelease = function(){
// toggle button has been hit
if(Stage.displayState == "fullScreen"){
Stage.displayState = "normal";
}
else{
Stage.displayState = "fullScreen"
}
}

EventListener.onResize();

XML Assign ChildNodes Into A Button
Ok.! I´d like to know how can I use flash buttons with a XML script, I´ll try to explain this, I have a XML code, which contains several nodes, this script, downloads images and its description into an empty movie clip, then I want to controle this nodes with my flash buttons...I need to specify flash buttons which part of my code I want to read.

Can someone help me???

XML Assign ChildNodes Into A Button
Ok.! I´d like to know how can I use flash buttons with a XML script, I´ll try to explain this, I have a XML code, which contains several nodes, this script, downloads images and its description into an empty movie clip, then I want to controle this nodes with my flash buttons...I need to specify flash buttons which part of my code I want to read.

Can someone help me???

Assign Id To Xml In Flash Button
Hello,


This might sound like a silly question...

But I am looking to get my movie to work, basically I have a movie in a scene which calls for a xml file which displays the content in a dynamic text box, next to an image, however I would like to have each button associate a particuar text section of the xml file, is this a possibility and if so please tell me how, cause I am going crazy

Christofer

How Do I Assign Form Actions To A Button?
on the donate page of http://www.roadrunnergolf.org, I want to assign form actions to the donate button. The following is the code (modified) from paypal. The code they generated assumes I'm using their image, but I'm using the image I made into a button. So I won't need point to the image on their server, but I need the button to submit, have the form action post and contain the hidden inputs.
Thanks, Rj.
<!-- Begin PayPal Logo -->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="donations@roadrunnergolf.org">
<input type="hidden" name="item_name" value="Roadrunner Golf Fund">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://www.roadrunnergolf.org">
<input type="hidden" name="cancel_return" value="http://www.roadrunnergolf.org">
<input type="image" src="http://images.paypal.com/images/x-click-butcc-donate.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>

How To Assign A Movies Clip To A Button?
Dear guys,
Actually what I means is I have a button and a movie clip, so that when I click the button right, then the movie clip will play in the next scene.Thank You for your helps!

How To Assign A Button To Download A File
I'm making a CD and I would like for the reader to click a CD and be able to save a PowerPoint file (included on the CD) to their computer. I saw the tuturial on launching PowerPoint and I can make it launch the PowerPoint file in Internet Explorer and then they can save it, but both are not foolproof and look unprofessional.

How can they get an option to save this file?

Assign Button Behaviours To A TextField?
namaste!

How can I assign to a textField the properties of a button or movieclip?

i.e.

myMovieClip.onPress = doSomething;
// it works

myTextField.onPress = doSomething;
// it doesn't work

I even tried inheriting movieclip properties in the textfield
myTextField.prototype = new MovieClip();
myTextField.onPress = doSomething;
// it doesn't work either!!!!!

Of course i could create a new movieclip and store the textfield inside... but then i would have addressing problems and code hassles...


Got any clue?

time and wisdom...
Pippo

[ FMX] Assign A Script To A Button (attachMovie)
PHP Code:




for (j=0; j<22; j++) {
    this.attachMovie("invisio", "btn"+j, k+l+i+j);
    this["btn"+j]._x = (89*j);
    this["btn"+j]._y = -1;
}







This script generates 22 invisible buttons on top of 22 thumbnails, works fine.

Now I want to assign a script to each button.
My thought was :

PHP Code:




this["btn"+j].onRelease = getURL("http://www.theremedy.be/temp","_blank");






But it doens't work that way.

Any thoughts on how to do this?

Do I need to define a function () first before I can use "this["btn"+j].onRelease"

Help appreciated.

ty

Assign Keyboard Stroke To A Button
Hi,.
can I assing a keyboard stroke to a button.
As I want to creat a button , and when I click on it , It should work like a keyboard stroke.
Actuallay I want to creat an arrrow showing up, down, left , right . when clicked should work like keyborad arrows
thanks
best regards
Nadeem

Assign Button.onRelease Problem
hello.
here's my situation:
In the main timeline I have an instance of a mc(ibutton_hold). withing that mc is an invisible button(ibutton).

based on values returned from an ASP script, I am duplicating the mc and then trying to set an onRelease function for each duplicated mc.button. It is not working.

here is an example of what i am doing.(i know the syntax may be off, this is not the exact code i am using, it's at home.)
max = 5
for(i=1, i<=max, i++){
duplicateMovieClip("_root.ibutton_hold", [ibutton_hold_"+i+"],i)

b_str = "ibutton_hold_"+i+".ibutton"

b_str.onRelease = function{
getUrl("./myurl.asp","_blank","POST")
}
}

so the onRlease function is not being set properly to the duplicated mc.ibutton. I think it may have something to do with the new depth assigned to the mc.ibutton.

I've tried using:
b_str= "_level"+i+".ibutton_hold_"+i+".ibutton"

but no results.

could anyone please shed some light on this for me?

thanks.

slobby

Can I Assign Button Actions In A Loop?
Can I assign button actions in a loop?

I have the follwoing code:

subMenu1.button.onRelease = function(){
// actions.
}
subMenu2.button.onRelease = function(){
// actions.
}
subMenu3.button.onRelease = function(){
// actions.
}
etc.

I want to put the above in a loop... but I can't figure out how I can do the function decleration.

I've tried a few things... but nothings working.

Any help would be appreciated.

Thanks.


OM

Assign JavaScript Function To A Button
hi peeps

I would like to assign a javascript call to my submit button but i dont know how??I cant find it in the action section

im using flashmx if it helps.

thank you

Cant Assign Button Mode To Specific MC
I've duplicate a series of MC, but the thing is i can't traced the position of the MC. Every position of x,y,z is 0
And I can't seems to assign a buttonMode to it. It will somehow assign the buttonMode to teverything on stage rather than a specific 1.


Code:
private function xmlLoaded(event:Event):void {
xml=XML(event.target.data);
xmlList=xml.children();
var picList:XMLList=xml.pic;//list for pic
for (var i:Number=0; i < picList.length(); i++) {
cube=new Cube(materials,40,5,42,10,10,10);
cube.name="cube" + i;// set instance name
trace(cube);
cube.x=Math.random() * 960 - 460;
cube.y=Math.random() * 710 - 330;
cube.z=-40;
cube.rotationZ=Math.random() * 360;
scene.addChild(cube);
}
addEventListener(MouseEvent.CLICK,objectPress);
}

Cant Assign Button Mode To Specific MC
I've duplicate a series of MC, but the thing is i can't traced the position of the MC. Every position of x,y,z is 0
And I can't seems to assign a buttonMode to it. It will somehow assign the buttonMode to the MCs and a Plane i created.


ActionScript Code:
private function xmlLoaded(event:Event):void {
         xml=XML(event.target.data);
         xmlList=xml.children();

         var picList:XMLList=xml.pic;//list for pic
         for (var i:Number=0; i < picList.length(); i++) {
           
            cube=new Cube(materials,40,5,42,10,10,10);
            cube.name="cube" + i;// set instance name

            trace(cube);
            cube.x=Math.random() * 960 - 460;
            cube.y=Math.random() * 710 - 330;
            cube.z=-40;
            cube.rotationZ=Math.random() * 360;

            scene.addChild(cube);
         }
         addEventListener(MouseEvent.CLICK,objectPress);
      }

How To Assign Multiple Events To One Button?
Hey

I have recently started using flash, and now I have encountered a problem. Hopefully you guys can help me??

I have a button that I would like to react differently on 2 different events. I want the button to move the movie to a certain frame on mouseclick and to another frame when the mouse moves away from the button without having made a click.

Right now the only thing that works is the moving away from the button. In fact the mouseclick does exatcly the same thing



My actionscript looks like this:

stop();

musicians_btn.addEventListener(MouseEvent.CLICK, navigate2);
musicians_btn.addEventListener(MouseEvent.ROLL_OUT , navigate3);

function navigate2(e:MouseEvent):void {
gotoAndStop(2);
}

function navigate3(e:MouseEvent):void {
gotoAndStop(3);
}

Please help

Assign A Sound To A Button Problem
Hello,

I created a button and added sound to it. When I enable simple buttons I can hear the sound when I press the button however when I test the movie (ctrl + enter) I can’t hear the sound. Can someone help me to resolve this problem or tell me why does it happen.

Tanks

Radio Button - Assign Values
Hi all,
I have a basic form with two radio buttons.
They each have a label "1" and "2".
I have a dynamic text box - var name "total".
When r button "1" is selected, I would like "x" numerical value to be displayed in "total" and the same for r button "2", but with "y" numerical value displayed.

I am assuming it is fairly simple, but have searched to no avail.

Thanks in advance.
D

Linking/assign A Flash Button
first of all, im using front page program to import my swf file. now, how can i assign my flash button to go to front page file?

Assign Button OnRelease In For() Loop
I am trying to do some dynamic button assignment when loading a XML file in the form of (it might not be pretty code, but its just for testing)

ActionScript Code:
var picList:XML = new XML();
picList.ignoreWhite = true;
 
var urls:Array = new Array();
var captions:Array = new Array();
var thumb:Array = new Array();
var whichPic:Number;
 
picList.onLoad = function(){
        var photos:Array = this.firstChild.childNodes;
        for(i=0;i<photos.length;i++){
            urls.push(photos[i].attributes.url);
            captions.push(photos[i].attributes.caption);
            thumb.push(photos[i].attributes.thumb);
        }
 
        loadPicture(urls[0])
        description.text = captions[0];
        whichPic = 0;
       
        //Thumbnails---------------------------  
        for(i=0;i<photos.length;i++){
            k=i+1;
            _root["thumb"+k].loadMovie(thumb[i]);
            _root["thumbBut"+k].onRelease = function(){setPicture(i)};
        }
}
picList.load("pics.xml");

where I have some functions that handle the effects etc. when loading the pictures (that is the loadPicture(), and setPicture() functions).

My trouble is that none of the buttons actually work when using this procedure (all buttons try to load a picture with index photos.length+1 i.e. non existent), but if I instead define the buttons actions seperately as

ActionScript Code:
_root.thumbBut1.onRelease = function(){setPicture(0)};

the buttons work as intended.

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