Create New Button Using AC2 On Different Frame
Hello, According to "button tag" attributes values in the xml files, i want to create a new button on flash frames. For example, xml codes is <button frame="5" x="110" y="110" weight="80" height="80"></button> After flash loading this tag, it will create new button on the frame 5, x= 110 , y=110 . i provide xml-flash connection and create new button which based on xml values for the only FIRST frame. How can i do to create new button other frames? please help me.. i am sending source code(fla) and xml. Thanks for your support.
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 12-19-2008, 04:32 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Create New Button Using AC2 On DIFFERENT Frame
Hello,
According to "button tag" attributes values in the xml files, i want to create a new button on flash frames. For example, xml codes is
<button frame="5" x="110" y="110" weight="80" height="80"></button>
After flash loading this tag, it will create new button on the frame 5, x= 110 , y=110 .
i provide xml-flash connection and create new button which based on xml values for the only FIRST frame.
How can i do to create new button other frames? please help me..
i am sending source code(fla) and xml.
Thanks for your support.
Attach Code
Stage.showMenu = false;
_parent._visible = false;
menu_cfg_xml = new XML();
menu_cfg_xml.load("main.xml");
menu_cfg_xml.ignoreWhite = 1;
//************************connect to xml
menu_cfg_xml.onLoad = function(ok) {
// create main menu after successful loading of XML
if (ok) {
search_bullet();
} else {
trace("XML not loaded");
}
};
//************
function search_bullet(){
count=0;
while (count<menu_cfg_xml.firstChild.childNodes.length) {
if ( menu_cfg_xml.firstChild.childNodes[count].nodeName == "bullet"){
create_bullet();
}
count++;
}
}
//***********
function create_bullet() {
counter = 1;
while (counter<menu_cfg_xml.firstChild.childNodes.length) {
// we must control PAGE number for the frame that created btn.
attachMovie("bullet", "btn"+counter, counter);
set("btn"+counter+"._x", menu_cfg_xml.firstChild.childNodes[counter].attributes.x);
set("btn"+counter+"._y", menu_cfg_xml.firstChild.childNodes[counter].attributes.y);
set("btn"+counter+"._xscale", menu_cfg_xml.firstChild.childNodes[counter].attributes.weight);
set("btn"+counter+"._yscale", menu_cfg_xml.firstChild.childNodes[counter].attributes.height);
counter++;
}
}
Main.xml
<content>
<bullet page="1" x="110" y="110" weight="80" height="80"></bullet>
<bullet page="2" x="120" y="120" weight="100" height="100"></bullet>
<bullet page="3" x="130" y="130" weight="50" height="50"></bullet>
<bullet page="5" x="140" y="140" weight="75" height="75"></bullet>
</content>
Create New Button Using AC2 On DIFFERENT Frame
Hello,
According to "button tag" attributes values in the xml files, i want to create a new button on flash frames. For example, xml codes is
<button frame="5" x="110" y="110" weight="80" height="80"></button>
After flash loading this tag, it will create new button on the frame 5, x= 110 , y=110 .
i provide xml-flash connection and create new button which based on xml values for the only FIRST frame.
How can i do to create new button other frames? please help me..
i am sending source code(fla) and xml.
Thanks for your support.
Attach Code
Stage.showMenu = false;
_parent._visible = false;
menu_cfg_xml = new XML();
menu_cfg_xml.load("main.xml");
menu_cfg_xml.ignoreWhite = 1;
//************************connect to xml
menu_cfg_xml.onLoad = function(ok) {
// create main menu after successful loading of XML
if (ok) {
search_bullet();
} else {
trace("XML not loaded");
}
};
//************
function search_bullet(){
count=0;
while (count<menu_cfg_xml.firstChild.childNodes.length) {
if ( menu_cfg_xml.firstChild.childNodes[count].nodeName == "bullet"){
create_bullet();
}
count++;
}
}
//***********
function create_bullet() {
counter = 1;
while (counter<menu_cfg_xml.firstChild.childNodes.length) {
// we must control PAGE number for the frame that created btn.
attachMovie("bullet", "btn"+counter, counter);
set("btn"+counter+"._x", menu_cfg_xml.firstChild.childNodes[counter].attributes.x);
set("btn"+counter+"._y", menu_cfg_xml.firstChild.childNodes[counter].attributes.y);
set("btn"+counter+"._xscale", menu_cfg_xml.firstChild.childNodes[counter].attributes.weight);
set("btn"+counter+"._yscale", menu_cfg_xml.firstChild.childNodes[counter].attributes.height);
counter++;
}
}
Main.xml
<content>
<bullet page="1" x="110" y="110" weight="80" height="80"></bullet>
<bullet page="2" x="120" y="120" weight="100" height="100"></bullet>
<bullet page="3" x="130" y="130" weight="50" height="50"></bullet>
<bullet page="5" x="140" y="140" weight="75" height="75"></bullet>
</content>
How To Create A Text Button That Goes To A Certain Frame
Hi,
Does anyone know how to create a flash text button that will go to a certain frame in a flash movie? Also, is there a way to load an external flash movie into a ceratin frame of another flash movie?
Thanks for the help!
Iceman
How Do I Create A Button In HTML To Go To Frame 2 Of A Swf File
HI..
I have an swf file and no original fla file, and I'm trying to create an HTML page with the swf file in it, but I want the embedded swf file to start on frame 2 instead of 1.
It seems like it should be possible. Any ideas.. I've tried playing around with parameters and variables in the url, with no luck.
thanks,
Elizabeth
Create Button Action Subject To A Given Frame Range
Hi
I have created a movie which have a set of simple navigation buttons which I would like to be able to start playing the movie from a series of labelled frames going to each label dependent on the position in the timeline?
For example if I have a label at frame 1(start_1) and a label at frame 50(start_50) and so on every 50 frames for a set time, what is the best way to code the button to tell it to return to start_1 before it has reached frame 50 or tell it to return to start_50 on reaching frames 51 to 100 and so on, in the timeline.
I gather that I can use an if else statement but how do I set variables to timeline frame positions to which the button will we act in the correct manner?
Alternatively is there a better(smarter) way to do this?
any help, prodding in a general direction is appreciated
Mizztah
[CS3] [AS2] How To Create A Timer For Each Frame
I m developing a game, and I have three stages(levels). Each stage is held in one individual frame in my timeline. I want to create a timer in each frame, so to count in how many seconds the player managed to clear each stage.
Any ideas how to code it?! I used the getTimer() function but this counts how many ms passed since the swf was loaded. I want to reset the count in each frame.
Any kind of help will extremely valuable! thx.
How To Create A Stop On Certain Frame.
1) I'm creating a presentation slide. I would like the animation stop in certain slide when the user clicked on body of flash. Example, I clicked on slide body at frame 10 but the animation will not stop unless it go to frame 50 which I defined it to stop at that point.
2) Have anyone have experience to make a slider bar on flash ?
Create Array In Frame 1
OK - super newbie here, but I've been studying hard.
I have my brand spanking new Flash movie where I've been adding buttons with small scripts and layers.
Then I wanted to create some arrays in Frame 1 of my actions scripts layer and stop the Frame. Problem is, the arrays just don't want to create.
Now I admit here that why I'd want to use _global or the var keyword or whatever is somewhat beyond me at this point, but I've tried several versions of the create array and nothing seems to appear in the debugger when I click on either level0 or global.
To compound the problem, if I make a new test fla and just try to create to array, the same scripts work fine. So I'm guessing one of my other "creative" elements on my real fla is messing up the create array somehow, but I haven't been able to find out what it is.
The trace() returns undefined when I run this script on Frame 1 and the debugger shows nothing being created. ugh! Anyone know what could make this happen?
_global.myArray:Array = Array();
_global.myArray.push(12);
trace(_global.myArray);
stop();
----------------------
myArray:Array = Array();
myArray.push(12);
trace(myArray);
stop();
----------------------------
var myArray:Array = Array();
myArray.push(12);
trace(myArray);
stop();
How To Create A Stop On Certain Frame.
1) I'm creating a presentation slide. I would like the animation stop in certain slide when the user clicked on body of flash. Example, I clicked on slide body at frame 10 but the animation will not stop unless it go to frame 50 which I defined it to stop at that point.
2) Have anyone have experience to make a slider bar on flash ?
How Create A Wire Frame Car
dear sir/mam,
i start an animation where i want to create a wire frame car and animate it. but don't understand how to create it and how to animate it ?? pls help ..
raj
Unable To Create A Frame For A Loader
I am trying to create a preloader that plays before the rest of the movie loads. Creating the preloader is not a problem. I insert a blank frame at the start of the movie for the pre loader but the kb stored in that frame is always the same as the first frame of the main movie. The last frame is small, so I tried creating the loader in the last frame and setting the movie to load from the back - did not work. The movie does contain jpegs - is this the problem?
Create MovieClip In A Special Frame
Is there a way to create a MovieClip in a special frame in another MovieClip only
with actionscript. (without going to the frame over the gui)
something like that but working:
mc.createEmptyMovieClip("movieClipInFirstFrame",1) ;
mc.nextFrame();
mc.createEmptyMovieClip("movieClipInSecondFrame",1 );
Is it possible at all to manipulate frames with actionscript (add/remove keyframes)?
best regards,
J0e7
How To Create A Listener For The Current Frame
i want to keep track of what frame the current flash movie is on. I've come across "_currentFrame" so i guess that's a step in the right direction. What i need though is a listener which will always give me the current frame.
What i am doing is having director MX 2004 call a frame via a label in flash and then i want to load on image based on what frame number it calls. (workin out interactivity between flash and director is too much stress for a noob :$ )
so i reason something like...
if ( _currentframe == 4 )
{
// display picture in pictArray[3] from xml
}
thanx.
Flash MX 2004
How Could I Create Delay In An Specific Frame?
Hi
In last frame of my movie I have some code like this on:
gotoAndPlay(125);
Now I want to pause my movie in last frame for 10 seconds and then execute above code .
How can I do it with AS 2.0?
Can You Create A Delay In Specific Frame?
I am trying to create a frame that loops for "x" amount of time before it goes to the next frame. Can this be done? And how. I know it is part of Action Script but am unsure in what combination.
Flapman
Create A Time Counter In One Single Frame
hi,
i need to know if somenone can tell me how can i create a time counter just with action scrpting, whithout any others frames or movieClips in the stage.
i want to create a slide show, that i'll get the imgs dynamicaly, and then i make a slideshow with them just by creating a loop that defines something like this..
(get the time when the photo apears)
(the loop starts counting 5 seconds for exemple)
(and then show next image and get the new time that it apears again)..
...and so on until the last image from the array.. then it starts again loading the first image...
THE PROBLEM is that i need this just by scripting...
can you help me please???
[F8] Can I Create A Hyperlink To A Specific Frame In My .swf File?
Hi There,
I am realitively new at flash. In my movie I have linked to a different site and I want to set it up so that when the user hits their browsers back button that instead of loading all the preloading parts of my movie that it justs takes them back to where they left off at say frame 63. Is that possible?
Thanks for any help on this.
Create Frame Animation That Follow _xmouse
Hi,
If i have an animation in a movie clip that has 100 frames.
My stage width size is 950px
How can I make the animation followed by mouse movement in elastic way?
That means if my mouse in x:1 , the frame inside the animation is 1.. If i move my mouse to 950 .. the frame will +1 until 950 in elastic way.
Sorry for bad english.
Thanks !!
p/s : I tried this :
targetframe = Math.round(_root._xmouse/12);
newframe += Math.round((targetframe-newframe)/6);
when I trace newframe value, it works in flash 6 but not in flash 8 (NaN) .
Help pls.
How To Create Smooth Page(Frame) Transitions
I'm using the timeline to store my web page content so the buttons take you to different frames for different pages. I drew my pages with hand and then scanned them so the web site looks like a real painting. I have 5 paintings(pages) in total 15 frames apart from each other on the same layer. When the user clicks a button i want one painting(page) to slide out to the left while the other one comes sliding in from the right side and settles in the middle. Now it is very simple to do this with two pages, i can just do a nice motion tween and boom done! But the problem is to do this for every possible page transition combination i need to make 5 x 5 = 25 + 5 x 5 = 25 for the reverse frames = 50 animations!!!!! and there must be a simpler way to tell the button to slide out something while bringing the other one in with actionscript without doing all this..
Tough one
Please help if you possess the knowledge...
How To Address A Button On The 5th Frame Of A Movie Clip With Action Script Located On The First Frame Of The Main Time
I'm trying to make a button appear on frame 10 of a movie clip and write actionscript on the main time line that addresses that frame 10 button. I'm not sure of the method I need to do to get that frame 10 button to get a url. I tested the same button when put on frame 1 and it worked, but I'm not sure how to address buttons and other symbols that appear as a result of the playhead moving to different places on movie clip time lines.
Can anyone help, or give me a link?
Thanks
Dennis
Attach Code
//works
_root.buttons_mc.go_btn.onRelease = function(){
_root.mall_mc.gotoAndPlay(1);
//a stop action is placed on frame 10 of the mall_mc movie clip
};
//this button is inside the mall_mc movie clip on frame 10
//doesn't work
_root.mall_mc.url_btn.onRelease = function(){
getURL("http://yahoo.com");
};
//An instance of the same url_btn is dragged on to frame 1 of the mall_mc
//movie clip and given an instance name url_frame1_btn
//works
_root.mall_mc.url_frame1_btn.onRelease = function(){
getURL("http://yahoo.com");
};
Flash Button To Take Movie Clip To The Next Frame Label Instead Of The Next Frame
I am trying to figure out how to create a button to take a movie clip to the next Frame Label instead of just to the next Frame. I have a slide show that I am working on with a fade effect from picture to picture. When I just use the nextFrame script it will literally take you from frame to frame on the fade in. Is there a script that will allow you to go to the next (or previous) Frame Label from where the movie was stopped?
Any help is greatly appreciated!
Looping Scenes To Go From First Frame To Last Frame And Rollover Button Play
I'm trying to figure out:
a) how to loop a scene to go from the first frame to the last to the second last etc
WHILE
b) having the scene play either forwards or backwards (as above) while the user has their mouse over a button but making the scene pause when the users mouse isn't over the button.
can anyone help me????
Create GotoAndPlay From Main Timeline To A MovieClip Frame
I'm barely stepping up from AS 1.0, and 3.0 is super cool, but also making my head spin. I'm knee deep in learning C# and AS 2.0 as it is, as well as working in VS 2005 for the first time, and I'm working very hard to get all of my asp.NET software to be running data driven Flash AS 3.0 UIs.
Flash Button In One Frame Goes To Movie Scene In Other Frame
Hey whats fellow flashers. Im sure this is a no brainer for you smarties, but its driving me crazy...I'm working on a site that has a flash movie menu in the one frame and the main movie in another frame. I need to be able to click on the buttons in the menu (top) frame and have them go to a certain location in the flash movie which is in the bottom frame. If I use the Get URL action, it lets me specify the frame, but not the label (location). If any of you guys have ideas or need me to explain further, please reply. Thanks.
Actionscript To Make A Button Move From Frame To Frame
I'm trying to take a Powerpoint Presentation and put it into Flash. The problem is that I im not sure how I can get a mouse click to advance to the next frame. I want a user to click on the Flash item and go from frame 1 to frame 2 and so on and so on. What would be the best way to do this so it looks and acts like a Powerpoint presentation.
Thanks
Make Button Go To Certain Frame Depending On What Frame Movie Is On?
I want to be able to tell a button to go to a certain frame depending on what frame the movie is on. In this flash file, I have a piece of paper moving to the top of the screen, two pieces of tape coming to tape it up, and then writing on the paper. I want to make it that if someone has already clicked on a link, and the paper and everything is on the top of the page, that the next link they click on, just goes to the frame where the writing for the page begins, and not have the paper and tape again and vice versa...
I hope this makes sense...
Quick Button Question Next Frame And Previous Frame
hey there, just a quick problem im hoping someone can help me with please?
ive got this code on a button:
Code:
on (press) {
newDepth++;
var h = box.createEmptyMovieClip("holder"+newDepth, newDepth);
h.loadMovie("vanda.swf", "_root.holder"+newDepth);
preLoader(h);
}
have then got this code on another button in the same timeline as above with this code:
Code:
on (press) {
_root.bar.buttons.box.holder+newDepth.gotoAndStop(nextFrame);
}
i would like these buttons to tell whatever swf has been loaded into the empty movie clip to go forward one frame and stop and backward one and stop? am i close?
[F8]Playing A Movie Clip From A Certain Frame To A Certain Frame With A Button
Hey guys,
im slamming my head in trying to figure this out.
I have an invisible button and only one mc, the mc loops 3x then stops, this is defined with as in mc.
Now i want to play the movie from the invisible button but only loop it once.
Which means i would like to play it from frame 1 to frame 215.
And also when u rollout i would like the movie to stop and go to frame 1.
this is my button code so far
Code:
on (rollOver) {
tellTarget ("loader")
{
gotoAndPlay (1);}}
on(rollOut){
tellTarget ("loader") {
gotoAndStop(1);}}
on (release)
{
getURL(clickTAG, "_blank");
}
Help please
Problem Coding Button Over Frame By Frame Animation
Compiler Error: Scene=Scene 1, layer=actoins, fr;'{' expected
Attach Code
function buttonClickHandler(event:MouseEvent):void
{
navigateToURL(new URLRequest("http://www.deseloper.com/gnome"));
trace("You clicked me.");
}
inv_btn.addEventListener(MouseEvent.CLICK, buttonClickHandler);
Edited: 03/13/2008 at 05:17:45 PM by trowzers
Needing To Go To Frame & Then Frame In Movie From One Button
Hello
My main timeline has a login movie clip. When someone enters the corect user name and password i want them taken to another frame on the same timeline.
On that frame I have a 'content' movie with a few labeled keyframes on its timeline.
So I want to be able to jump to a frame on the main timeline and to a frame on a 'nested' timeline all in the click of a button!
Here is my button action script:
on (release){
if (tUserEnter.text == "XXXXX" && tPasswordEnter.text == "XXXXX"){
this.gotoAndStop("_root.clients");
}
Ok, so this goes to the frame I want but what do I add to go to a frame within a movie on that frame?
Thanks for any help
Julian
Button: Frame By Frame Movement
I really need help.
on main movie I have 2 layers.
One layer contains 2 buttons
and the 2nd layer contains movie clip instance.
movie clip instance contains 30 pictures.
What i would like to achieve is when I click forward button(one of 2 buttons) I want movie clip to advance 1 frame forward then stops.
also, when i reach the last frame of movie clip, pushing forward button once more will take it back to frame 1.
[back button works the same way]
Can someone show me how I can do this?
I know it's easy for many of you, but to me this is extremely hard. don't know where to start the scripting.
Thanks in advance
Frame To Frame...button To Page...
I want to make my own flash menu for my webpage, but I want it to be in a frame. How can I make a button launch a page into a specified frame? (Flash MX)
Button [ ] On Click Goto Frame 2 [X] Movieclip X Mark Button
Ok I have a movie clip first frame looks like this [ ] second frame looks like this [X] I want to apply action script to it that says on press goto frame 2. Then another that says if on frame 2 go back to frame 1! But I'm kind of lost here I don't how to make this happen!
Can't Create A Button
OK I am new, but I am not that new. I followed the tutorial in Flash MX to the letter and I cannot create a button. I can create all of the states but when I click on the hit state the actions window says "current selection cannot have actions applied to it" can someone please tell me what I am doing wrong? It seems to me that this was working before.
Thanks,
Tony
How To Create This Button ?
Hello everyone !
I'd like to create a button (or clip ?) exactly the same as on this webpage : Bluemarlyn
Select : "Directors", then "Pierre Isoard" and finally "3617 annu" for example.
The goal for me is to create an animated button with rollover, rollout and release actions but which stays activated after a click.
During this time, the other buttons are still animated and selectable until they are clicked.
Thank for all !
Help How To Create This Button
hello guys I need help step by step to create button like this
1. when I click the BUTTON the text show up in text Area
2. when I click the copytext button I can paste it anywhere text area
Thank for your sharing
Create Button
This seems like an incredibly easy question but I have searched for the answer for days with no success:
I have downloaded a template and want to modify the menu as a way of learning to use Flash. The menu buttons change when you hover over them and when you click on them exchange photos and text below the menu. What I would like to accomplish is have the photos and text not move but when you click on the button you are sent to another web page. I have tried adding a link to the text, changing the text to a graphic with a link, adding an invisible button to the text. But nothing works. I also tried dealing with Actions but that has not been successful either.
How can I find and remove what currently happens when the text is clicked and then use either the getURL or the link to send the user to another webpage?
Create A Button Help
hi
how are you all?
please help me, can I create an image as a button by using Action Script?
thx alot
Create A Button With Value
Im just messing around with flash doing basic stuff. I want to create a small program that sends a value from a input text box, into a dynamic text box. One of my big problems is I dont know how to set the value of my button. How do I set values of my button. And say If I did set the value, how would I make the script run on click. So say if I named the button Clicker , the output box "OutputBox" and I named the input box "InputBox". would it be like this
Function Clicker(InputBox);
OutputBox:InputBox;
Or something like that, I dont know, I suck, so help me out. And what exactly is the instance name.
How To Create A Button
I want to create a button that will open a certain file can someone tell me what Action Script must I give to the button to open it and also with the opening of that file to close the flash(I need a command that will not open a new browser window just the file)
also I need an AS that will show/hide a text field
and last I will need an AS that will just close the flash
How To Create The Button
hi dudes, did anyone know how to create a button like that (http://www.mitsubishicars.com/06eclipse/) and any idea that how to design the intro? its very cool huh!?
pls give me some suggestion. thanks..
Can You Create A Button With AS?
is it possible to, after the release of one button that already exists on the page, fade in another button after 4 seconds using action script to creatte and animate it?
Hot To Create This Button?
I have three button named home, contact and about me.now i want roll over and roll out effects for each button. but my question is i want roll out effect appear to this button when i mouse over to another button only.
http://www.imagevuex.com/
visit this site and mouse over to "imageuue","purchase" and "setup and support" button below the logo
Create A Button
Is there a way to dynamicly create a button through action script?
I know that i can change EVERYthing about a button through it after words. so i have just made 1x1 pixel buttons and changed it with my actionscript
|