ActionScript 3.0 :: Replace Original SWF With Another When Button Clicked

Apr 27, 2011

I would like to make a map in falsh, where first you see the country with the counties. When clicked to one county the map of that county would appear with the smaller regions in it. I made one swf where you see the country (country.swf) with the counties, and one for all counties (county1.swf, county2.swf, etc.).

I would like to get a solution to replace the original country.swf with the county1.swf when clicked to county1-button, or with the county2.swf when clicked to county2-button. Next to these I would like to place a go-back-button in all county.swf files. I tried to load in the other swf files, but than the original swf remained visible in the background, which is not suitable in this case.

View 0 Replies


Similar Posts:


ActionScript 2.0 :: Replace Mc On Their Original Position?

Oct 17, 2008

im doing a drag and drop quiz in as2, and so far it all works, except the Reset function which is suposed to replace all of the numbers on their original position. Here is the function that at the begining of the frame stores in two arrays the original positions of all the numbers:

Code:
function posInitiale() {
for (j=0; j<=target1.length; j++){[code].....

This, doesnt work, it replaces all of the outside of the scene of flash, if you open the swf bigger you will see them at the bottom of the screen, and they are all on top of each other. But again, if in this function I trace both the arrays I still get the same result, which are the correct position they should go on.

View 2 Replies

ActionScript 3.0 :: Flash String.Replace Won't Replace "%20" From An Original String

Jun 22, 2011

I've got a strange situation where I'm replacing the text in a string that I've taken from an XML, but the .replace function for the string keeps failing. I've tried running the example given on the Adobe site, so I know the value I'm trying to replace ("%20") isn't at fault - it's something about the string I have! I've included the code below, but it seems correct. Is there a particular tip I should know when taking XML values into AS3? I'm putting them in strings for this project.

[Code]...

View 5 Replies

ActionScript 2.0 :: Menu [renamed] - If Link Is Clicked The Previous Returns To Its Original Position

Aug 30, 2006

How do I create a easy script for vertical links, which when pressed, the link moves up and content comes inbetween the link and the rest of the links. I also need it so if another link is clicked the previous returns to its original position.

View 5 Replies

ActionScript 2.0 :: Active Button - Stay The Rollon Color After It's Clicked And Then The Rolloff Color When Another Button Is Clicked?

Sep 29, 2008

How can I make it stay the rollon color after it's clicked and then the rolloff color when another button is clicked?

[Code]...

View 7 Replies

ActionScript 3.0 :: Detect Wheather The Button Is Clicked Or Not And Disable It If Clicked?

Jun 9, 2010

I have 4 navigation button and like home, about us etc....  And i want to disable home when it is click and cannot clicked it until the user click another button first. means if a visitor is at home page then home navigation is disabled, and all other are active, and when they click at aboutus button then the pages goes to the about us page and the about us button is disabled and other get active. I want this solution in AS3 with oop concept.

View 6 Replies

ActionScript 2.0 :: Buttons To Stay Orange Once Clicked And Only Roll Out Back To Grey When The User Has Clicked On Another Button In The List

Feb 7, 2007

I've got about 6 buttons laid out, one on top of the other in a list format. In their normal state the buttons are grey in colour, when I rollover them, the buttons flash and turn to orange. Now, what I need to happen is this: I want the buttons to stay orange once clicked and only roll out back to grey when the user has clicked on another button in the list. I've been told that the best way to do this is via adding a listener, however I am a little unsure as to how to go about this. I've checked the flash help file and have a basic understanding of how listeners work...but can't really wrap my head around applying it to this situation. Perhaps I will need to have all the buttons as separate broadcasters?

View 2 Replies

ActionScript 2.0 :: Motion Tween The Button To Return Up To Its Original Spot When Another Button Is Then Pressed?

May 26, 2005

I'm trying to create a set of 4 vertically arranged buttons that 'split' apart when those buttons are pressed. For example, if you click the topmost (1st) button, the bottom three buttons will drop down so submenus (for the 1st button) can now be revealed beneath. Again, when you click the 2nd button from the top, the bottom two buttons drop down, revealing submenus, and so on.

Now, is there a way that I can use actionscripting to tween the buttons to not only motion tween a drop down when a button is first pressed, but also to motion tween the button to return up to its original spot when another button is then pressed? Right now, I have two keyframes, side-by-side which each containing a different y-scale value for an object. Can I do some actionscripting to get the object to motion tween upward to its original spot instead of "clicking," or snapping back to is original spot when another button is pressed?

View 1 Replies

ActionScript 2.0 :: Nav Button States - Button To Stay In It's Active State Until Another Button Is Clicked

Dec 17, 2004

I have a menu with five nav buttons (atcually MovieClips). Each has three frame labels: "on", "stay", and "off". The rollover and rollout animations play flawlessly, but I'm at a loss as to how to give each button a sticky "active" state. I'd like the button to stay in it's active state until another button is clicked, then I would like it to play it's "off" animation. Each MC has this code:

[Code]...

View 2 Replies

ActionScript 2.0 :: Replace Button Comonent With Simple Button

Oct 26, 2009

I have found this fine example for multilanguage choice:URL...I have changed initLanguageSelector() to this:[code]It works OK with button component but I need it to work with simple movieclip or button.

View 2 Replies

ActionScript 3.0 :: Snap Back To The Original Position / When Let Go Of Mouse Button?

Sep 26, 2010

I want to make a magic 8 ball in actionscript 3. I'd like to be able to click on the movie clip of the 8 ball, shake it with the mouse, and then have it snap back to its original position when I let go of the mouse button. I have three problems:

1) I can make the 8 ball track the mouse, that's easy, but how do I make it snap back to the original position when I let go of the mouse button?

2) I want to constrain the movement of the 8 ball movie clip so it won't go all over the stage, just enough to move it back and forth a bit.

3) How do I randomize output of answers in the 8 ball window...such as, "not now," "doesn't look good," or "yes" etc?

View 2 Replies

ActionScript 2.0 :: Movie Clip Button Up-state, Stay Up Until Clicked On Other Button?

Feb 23, 2006

how to keep a Movieclip Btn 'Over State' to stay in the over position until another button is clicked?

View 1 Replies

ActionScript 2.0 :: Write A Code For A Button When The Button Is Clicked It Should Move To The Nextframe?

Nov 28, 2007

how to write a actionscript code for a button when the button is clicked it should move to the nextframe.

// About and smile1 button scripts
stop();
_root.smile1.onPress = function() {
if (mouse_over_smile1) {

[code]....

i have given 3 functions as onEnterFrame,onPress,onRelease. i tried all these but didnt get the result.smile1,smile2,smile3 are button instances which are declared on the monie clip.my main thing is i hav a button, when i click on that button it should go the next frame which i have declared in "gotoAndPlay(6)" method.

View 1 Replies

ActionScript 2.0 :: Movie Clip Finish Playing When A Button Is Clicked And Then Go To The Frame Label Associated With The Button

Jun 2, 2011

Anyway what I need to do is have a movie clip finish playing when a button is clicked and then go to the frame label associated with the button. I hope I'm explaining myself ok. So if I had say 4 buttons Home Gallery About Contact If Contact is clicked then I want the Home page to play (Which is a fade out) and then go to Contact Page (which will fade in). Then If Gallery is clicked then I want Contact to fade out and then go to Gallery page and fade in.

View 6 Replies

ActionScript 2.0 :: Make A Button In Such A Way So That After Clicked On It The Button Will Change Colour Indicating That The Link Has Been Visited?

Sep 1, 2004

I am trying to make a button in such a way so that after you clicked on it, the button will change colour, indicating that the link has been visited.

View 3 Replies

ActionScript 2.0 :: Disable A Button After It Is Click And Then Enable It Once Another Button Is Clicked?

Sep 8, 2009

I'm trying to figure out how to disable a button after it is click and then enable it once another button is clicked. I'm stuck on how to enable the button.

on (rollOver) {
this.gotoAndPlay("s1");
_root.slideshow.gotoAndPlay("s4");

[code].....

View 1 Replies

ActionScript 2.0 :: Replace Button Upon Release

Dec 28, 2010

It controls a collection of 6 "slides". Each slide has a corresponding button, and it also slides every x seconds when the mouse is still. I'd like the buttons (b1 through b6) to change once they are pressed (to a similar image, just with a black dot in the center, which shows it is selected) and then return once another one is selected. I have a very minimal knowledge of actionscript

[Code]...

View 2 Replies

Professional :: Possible To Click A Button In A Swf And Have It Replace The Swf With A Different One?

Jul 27, 2010

I am not sure how to explain it but,.I would like to have a swf that has a button. When you click it, It would load a differnt swf.that would alow me to create a menu swf that when a user click a menu topic it would reload a differnt swf.

View 2 Replies

ActionScript 2.0 :: Original Code Which Works Fine When Button Is Present On The Root Timeline?

Jan 21, 2008

//This is my original code which works fine when my button is present on the root timeline
btn_up.onRelease = function() {
getURL("javascript:Launch('website.html', 2000, 1200)");

[code]....

View 2 Replies

Professional :: Make A Button Active If Another Button Is Clicked?

Dec 13, 2010

I want to make a button (or graphic) active and visible if another button is clicked. But it must be invisible and unclickable before the other button is clicked. (this is a "find the differences between the 2 pictures game" and I want circles to appear over the differences that the user finds but only after he clicks it)

The button (or graphic) I want to become active has instance name of "sockcircle_btn" The button you click to make it appear is called "sock_btn"

In the first frame of the sockcircle_btn layer, this is my code

sockcircle_btn.addEventListener(MouseEvent.CLICK,sockcircledisable);
function sockcircledisable(evt:MouseEvent):void{
sockcircle_btn.mouseEnabled = false;
}
 
In the sock_btn frame (frame 3) this is my code

sock_btn.addEventListener(MouseEvent.CLICK,sockcircleenable);
function sockcircleenable(evt:MouseEvent):void{
sockcircle_btn.mouseEnabled = true;
}

The file is setup to loop between frames 2-3. But the sockcircle_btn never enables even when sock_btn is clicked.

View 5 Replies

ActionScript 2.0 :: Play Button Out Label When Another Button Clicked?

May 2, 2006

Pretend a button is selected - when that button is selected it goes to the active frame which shows that the button is selected. When you click another button it currently resets itself - BUT - I want it to go to and play frame "mouse_out" and than reset itself. Below is the code I am currently working wtih:

[Code]...

View 6 Replies

ActionScript 3.0 :: .replace Won't Replace - Array With A String As Each Entry

Sep 21, 2010

I'm having some real trouble getting .replace to actually replace something. Here's my code...

[Code]...

I can trace both newFiles[i] and keywords[i][whatever], but the replace doesn't replace anything. The regex is valid as well. I'm using regexr to test it, and it works perfectly there... but will not for me and I don't know why.

View 4 Replies

ActionScript 3.0 :: YouTube API - Remove Or Replace Play Button?

Sep 9, 2010

I'm using the YouTube API to load YouTube videos into a custom player. I'm loading HD video and trying to either remove or add a custom PLAY button ( the play button that appears in the center of the video when AutoPlay is false)

View 2 Replies

ActionScript 3.0 :: Replace A Loaded External Swf File From Button Within Itself?

Oct 17, 2011

I've got button events that load swf files into the main movie. Within the loaded swfs are additional buttons. When these buttons are clicked I want the targeted swfs to replace the current swf. I guess I don't understand how to reference the Loader var within the main movie.

Currently, when the links are clicked in the loaded swfs, the movies are loaded on top, rather than replacing them.[code]...

View 0 Replies

ActionScript 2.0 :: Tricky Navigation - Replace The Chosen Button?

May 23, 2002

i got 5 buttons in a row. on mouseover i want to replace the chosen button with 3 or 4 buttons (they should smoothly, vertically come up and all other buttons should come closer, depending on the longest of the new buttons). on rollout i want to go back to the first button.

so, i put the first row of buttons on frame 1 (the actions stop). on mouseover it keeps going to frame 2 and smoothly the buttons come up. on 5 there s a stop action. on rollout it keeps going to frame 8, where its back to normal again. on a second mouseover its supposed to go to frame 2. and theres the problem, sometimes it works, sometimes not.

View 1 Replies

ActionScript 2.0 :: Replace _root With _level2 But Doesn't Work On Mouse Button?

Jul 19, 2006

i was doing tutorial from the page [URL]

my problem is that I have in main timeline movie1, who have movie2 in side, and movie2 have movie3 inside it. in movie3 is buttons like in the tutorial. so i try to replace _root with _level2 but doesn't work on mouse button AS.

[Code]....

View 1 Replies

ActionScript 3.0 :: Only See A Button After Another Button Is Clicked?

Apr 8, 2010

I have created a flash project all in the 1st frame of my main timeline, so i can only do this via action scripting as i dont want to go back into my sub timelines, i just dont know how to write the coding! this is what i want to do: button2.visible=false but if button1 is click then button2.visible=true

View 1 Replies

Make Take Appear When A Button Is Clicked?

Oct 7, 2009

I have a simple question for someone --Im very new at Flash. I have a box and 3 different colored buttons at the left. When a person clicks the red button the box turns red, green button turns the box green, etc. My question is I would like the text color of the box to appear under the box according to what button they press. Here is my code to turn the box red. What line would i add to have the word Red show up under the box when the red button is clicked. Do I type the word Red and make it a movie clip? Then what?

[Code]...

View 1 Replies

Get Text To Appear When A Button Is Clicked?

Oct 7, 2009

I have created a box with 5 buttons with their corroesponding color names beneath them at the left. When you click on a button it will change the box to that color. How do i get the color name that is clicked to show up under the box?

View 8 Replies

ActionScript 3.0 :: Button Must Be Clicked Twice?

Jun 12, 2010

im working on a new project, and its finished - but there is one issue.... to travel to the next page, you must click the button 2 times ( even if the clicks are 30 seconds apart )....what would cause this? the method we were asked to do was to base the page transition on the timeline rather than embeded in its own MC like previously. that is easy, and here is my set up ( frame and actions ):

[Code]....

and on frame 132 is the frame label "start" and this code:engage.play(); the buttons are in their own MC on frame 125 and are coded correctly ( here is an example of btn 1 ): function btn1Click(event:MouseEvent):void{ MovieClip(root).gotoAndPlay("trans"); MovieClip(root).page=1;} btn1.addEventListener(MouseEvent.CLICK, btn1Click); btns 2, 3 and so on are written the same.... now, i get no errors, but you must click each button twice ( and if its in the middle of the transition sometimes 3 times

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved