Flash :: Loads A New Movieclip/swf File On Button Click?
Sep 5, 2011
I am creating a library like flash file for our game. I am using adobe flash cs5 with as3 and adobe indesign. I am still very new at flash(a real newbie) and i am wondering if anyone could help me in my problem.
i have a movieclip file named "mainPage". mainPage contains 6 buttons (with a cyrstal design) but lets focus only on 1 button. The 1st button contains the name Art_btn which calls the movieclip artBook when the button is clicked (which is my problem) . I have another movieclip named "artBook". the contents in my artBook are separated or written on each frames that could be called when clicked next or prev.
here is my prob. i dont know what is the right code that would call for artBook when Art_btn is clicked.i tried inserting codes such as loadMovie, gotoAndPlay and addChild but when I test it, the mainPage contents doesnt show up and it produces errors.
[Code]...
View 1 Replies
Similar Posts:
Dec 14, 2011
I have read all threads and can not find a solution but i am not somebody with a lots of knowledge about actionscript so here is my problem i am using this script .
[code]....
the problem is that when i click on the first button loads ok but when click on second still showing the first movie clip in the back ,,,,, i have try everything without luck ,,,, i guess i need to keep reading but will like to find an answer to this situation ,
View 3 Replies
Mar 30, 2009
I downloaded a flash template and have modified it to suit our company but there is something that I can't do. When the file loads in the browser, music immediately plays and loops until you click a button to stop the music. On our video page, we have video
that we need to play that has sound in it. How do I get the background music to stop when my video plays without having to go up and stop the music manually. The videos are loaded via an external XML document and there are no buttons in the FLA file to link code to. the website is [URL]
View 4 Replies
Aug 27, 2009
I am trying find the correct as3 code to make a button on Click, open a pdf in a new window. I have tried different ways, but when I add the code not only does it give me errors, but it makes my swf flip through all the pages instead of stopping on load. It is fine before I enter the code for this button. Just to let you know, this button is within a movie clip on the main stage. I really wanted it in a MC within another MC, but can't figure out where to put the code.
Should it go on the main timeline, where all the rest of the code is, or should it go within the MC?
View 12 Replies
Mar 2, 2012
I am loading swf file on prev and next in my image gallery. its an xml driven gallery..its working fine.Now i want when i click on next and prev button it loads the swf but with different url.I came to know that it can be done by using deep linking.
View 2 Replies
Jul 31, 2009
When the page loads, the first menu button (PORTFOLIO) is automatically OnClick. I want the user to be able to rollover it and click it when the page loads. I attached my file.
View 0 Replies
May 10, 2006
Take a look at this site. [URL] You notice when you click on a button the current 'site' you are on dissapears befor the next one loads. How is this done? It's like the code tells flash first to 'close' the current page and then load the page you clicked on.
View 1 Replies
Feb 27, 2006
if you open up the TEST.swf you can see how I want my transition to look like.. everything works perfectly.. then if you open the Load.swf and click one of those red buttons.. it loads up the external swf.. but if you click another button it loads up the same external thing.the difference between Load.swf and TEST.swf is that in Load.swf is container in which the TEST.swf is loaded..
View 4 Replies
Jun 21, 2010
I am building a flash interface and I would like a menu where it is hidden to begin with (just a tab). You click the tab to expand it, and click again to collapse it. I've made a movieclip with animation of the menu opening up and closing, but I can't seem to work out how I'd go about making the movieclip open and close properly.
View 4 Replies
Nov 25, 2011
It used to happen in AS2.0 as follows :
my_Mc.onPress = function()
{
trace( this)
}
//output :
[my_Mc Movieclip]
[Code]...
View 2 Replies
May 18, 2011
I need a counter click button that can storage every click on a txt file or something..
View 1 Replies
Feb 21, 2011
i am developing one small imteractive game.in that i'm getting one difficulty.Difficulty is: i want to play a moviclip whenever i 'll click on button ,and .For that i hav applied logic in following way.[code]whenever i'am clciking on first movieclip(btn), it definitly goes to 0(i.e off), but 2nd movieclip(instance name "alpha") is not coming to 1.
View 3 Replies
Sep 20, 2009
I have created a flash file that I will export as an SWF. It is to go on my web site. The one problem I have is that I need to put code in the flash file so that when you click a button it allows you to download a file from my website to your desktop. How do I script this?
View 7 Replies
May 16, 2010
In my game I would like it so once I have died you can click the 'Main Menu' button and it will take you back to the main menu and clear everything else which had been going on.
But at the moment as seen in the flash file attatched once you have died in the game a child form appears with two buttons on it 'Play Again' and 'Main Menu'. On clicking the 'Main Menu' button as you can see it takes you to the main menu but all the stuff from the previous frame are still there in the background.
View 0 Replies
Jan 20, 2011
I want to call flash file (.swf file) on click button in flash file.
View 1 Replies
Jan 3, 2007
I have added this code to a button in my flash file. When the viewer presses the button a external .swf file will load. The problem is how do I specify where it loads. For example, when the viewer hits the button the external swf file default loads at 0,0. If I want it to load somewhere else on the page is there a way to make it load at a certain specified location? Here is the code I am using on the button.
Code:
on (release) {
loadMovieNum("test.swf", 1);
}
Now this works fine and the swf file is loaded correctly but it is always at the top left corner. How can I go about loading it in a specific place on the flash file? Is there a way to create a holder that would make it load in that certain area?
View 1 Replies
Oct 30, 2009
Click a button in a flash file and an iframe in the same page resizes.
View 1 Replies
Apr 9, 2011
The old way to allow audio to be played/streamed in the browser was a flash button, such as that seen on [URL]. What's the new iPhone-friendly way to give the ability to click on a simple button to listen to an audio file in the browser? If the answer is HTML5, is the such a button built and available? I don't need an MP3 player with steaming and such, only a button.
View 1 Replies
Feb 23, 2010
have this flash xml menu that loads external swf files like this:
Code:
<item title="ABOUT"content_path="http://mysite.com/folder1/folder2/folder3/about.swf"target=""mouse_rollover_color="0xFFFFFF" mouse_rollout_color="0xDDDDDD" />
and I have this swf file with cms that I'd like for this menu to load. Currently the swf file load external text using this code:
Code:
if (contenturl1 ne "") {
loadVariablesNum(contenturl1 + "/" + userid + "/content.txt", 0);[code].....
but when the xml menu loads this swf file its structure loads but not its data.I tried using :
Code:
this._lockroot = true;
in the loading swf main time line but it did not work.I should also mention that the dynamic data that loads onto the swf that is to be loaded by the menu, resides not in it main time line but 4 movie clips deep .I don't know if that makes a difference or not.
View 1 Replies
Sep 26, 2009
I was just wondering why it is that after I have clicked a button to run a movieclip, I have to click it twice to run it again? I would like to be able to run it again with just one click - it is for a true and false set of questions. The movieclip is an animation that runs if correct (and there is another if it is incorrect.
Here is the button script
on (release) {
_root.tf1_mc._visible=false;
_root.tf2_mc._visible=true;
_root.tf2_mc.gotoAndPlay(1);
}
comment: tf1_mc runs when the true button is clicked and tf2_mc runs when the false button is clicked. The script above is for the false button
View 3 Replies
Oct 28, 2007
I'm have a flash file which loads an xml file sub.domain.com/data.xml. It loads fine when the swf is loaded from sub.domain.com but it does not load from [URL]..It's all the same directory on the webserver. I tried using crossdomain.xml and allowed access from *.sub.domain.com. Doesn't work.
Any idea what would work? besides using php to determine the current domain (www or not) and load in the path via flashvars.
View 2 Replies
Jun 25, 2009
I have an animated logo swf file that loads and runs once on the home page every time the page loads. The logo has been updated to appear in three different colour schemes. I want one scheme to load and when the page is refreshed or revisited, one of the other colour schemes to load in its place. They can appear in any random order, just a different one to the one that played before reloading.Can someone point me to an answer or tell me how to do it? I have found a way in JavaScript but this only works on plain images, not swf files.
View 6 Replies
Jan 6, 2010
I have made a sort of drop down menu of a movieclip. There are actually two, the first one named list_over_mc is only to detect when the mouse is in the area for when to drop down the menu (onRollOver) and the other one, list_mc, is holding the menu itself. The problem is that when the menu is down nothing happens when I click the button (now named knapp1_btn). I have tried with another but with the same sort of script (but placed outside of the movieclip list_over_mc) and that works so I'm guessing it is because the button is "over" the other movieclip.
View 3 Replies
Aug 9, 2009
I'm almost 100% sure that I have to write an if, else statement for this. Below is the code I have for a button(movieclip) I created. It is suppose to play an animation when you click on it. Then when you click it again it's suppose to play a second animation that will take it back to the original state. What is happening is, it goes straight to the clicked state without playing the animation. However when you click the second time it plays the animation that takes you back to the original state. Am I correct in believing the only way to get the animation to play on both clicks is to use an if, else statement.
function clickPlus(event:MouseEvent):void {btn1.gotoAndPlay("clickOpen"); }btn1.addEventListener(MouseEvent.CLICK, clickPlus);
function clickX(event:MouseEvent):void {btn1.gotoAndPlay("clickClose"); }btn1.addEventListener(MouseEvent.CLICK, clickX);
btn1.removeEventListener(MouseEvent.CLICK, clickPlus);
View 3 Replies
Jul 7, 2010
I have browse button on stage. when i click this i am uploading a image to a movieclip. then the movieclip is added to the stage. my issue is when i click the browse button 2nd time i need to select another image and add to another movieclip and display it to the stage
View 2 Replies
Jan 20, 2009
I got this code but when i click on another button is is still there how do i get it to disappear? I have two movieclip one is the snow and another movieclip is an empty mc called snow2
ActionScript Code:
i =0;
while (i<25) {
//duplicateMovieClip (dot, "dot" +i, i);
dot.duplicateMovieClip("snow"+i, i);
i++;
[Code].....
View 1 Replies
Feb 2, 2009
public function mc1():Void {
for (i=0; i<9; i++) {
c = c+30;
//here my_clip is a refrence to stage
var mc_new = my_clip.attachMovie("mc_bread", "bread_"+i, my_clip.getNextHighestDepth()+1, {_x:80, _y:385-c});
mc_new._visible = false;
[Code] ......
See the function visibility I am trying to set visible a movieclip on a click of a button. this code gives no error but still movie clip is not visible.
View 1 Replies
Aug 3, 2009
I am building a navigation menu with buttons that call and show a movieclip just below the button. I have no more compiler or output errors. Despite this, I still dont have a working navigation menu.The movieclips are only found in the library and are being called by buttons on the timeline. I currently have all the actionscript on frame 1 on a separate layer of the main timeline. None of the buttons or movieclips have code associated with them individually.The code I have created is as follows (I omited some bc the functions get repetitious).
Code:
stop()
va html_con_mc = new MovieClip
[code].....
View 2 Replies
Nov 4, 2009
Before telling you my problem in actionscript, I would like to explain on how the system works. Please bear with my long explanations.I have a list of data that need to be display out. I've created one movieclip and I named it table_mc. Inside the table_mc, I put 2 dynamic text and one blue box with alpha 0. In order to display a list of data out, I used a table component in flash to duplicate the movieclip, table_mc. It saved me from doing a "for loop".
I wanted the list of data to be clickable so I converted the 2 dynamic text in table_mc, into movieclip. I named it table_but. When I clicked onto table_but, the blue box will appear, alpha 100 to show that it is being clicked.Here's the problem. I've done an actionscript in table_mc. In the list example, when i clicked onto no '2', the blue box appear and if I clicked onto no '5' the blue box for no '2' should disappear. Unfortunately the blue boxes will appear there together when i clicked onto no '2', '5' and '7' because they shared the same movieclip table_mc. Is there a way to do it when the blue box can only appear at a time?
View 2 Replies
Feb 21, 2011
how to play a movieclip on button click in actionscript 2.0.
View 3 Replies