ActionScript 2.0 :: Loading External SWF Files With Button Click

Oct 14, 2009

First of all, right now I have 2 buttons, which are defined as buttons. Clicking on button1 loads swf1, clicking button2 unloads swf1 and loads swf2. Heres the basic code for that transition which is pasted ON the button...

on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "F2";
container.loadMovie("F2.swf");
} else if (_root.currMovie != "F2") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "F2";
container.play();
}}}

This works like a charm, no problems. The problem I am having is that I need the button (which will eventually be a part of an animated drop down menu) to have more functionality. When I try to make a movieclip button, no variation of this code above will work to load the swf. I am totally lost. Here is the latest incarnation of the movie clip button code. This version is in the timeline, but I've tried variations directly on the movie clip as well

mc_HeightTest.onPress = HeightMovie
function HeightMovie(){
if (_root.currMovie == undefined) {
_root.currMovie = "F2";
container.loadMovie("F2.swf");
} else if (_root.currMovie != "F2") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "F2";
container.play();
}}}

Why the code pasted on the button will not work when its used in conjunction with a movie clip button?

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Loading External Text Files Into A Textbox When Click Buttons

Jul 28, 2006

I'm loading external text files into a textbox when you click buttons, like so:

[Code]....

This works fine, no problem. But I've got a bunch of buttons. So, I write this as a function:

[Code]....

View 2 Replies

Professional :: Next Button In Array For Loading External Swf Files?

Jan 5, 2011

Someone here recently helped me immensely with a question I had about creating a previous button in my flash file that would allow the user to click on the button and view the previous swf file.  I'm hoping someone can help me with making the Next button now, too.

I have a movieclip that loads an array of external swf files.  I thought making the next button would be as simple as changing just a select few things to the previous button.However, that's not working.  When I try that, the movieclip doesn't even load the swf files.  Below is my AS2 code for my file.  I bolded the part at the end that is for the previous button.  Does anyone know how to make the previous button?

[Code]...

View 16 Replies

Professional :: Loading External Swf's - Fresh Everytime When Click On The Button?

Feb 2, 2010

I have created buttons with this Actionscript. They load in the external swf's fine, but when I click on them again they load them in again, and again, and again... What do I need to write in the code so it loads in fresh everytime you click on the button? (or in other words, cleans up the load in page before it loads in new files).

[Code]...

View 1 Replies

Flash :: Loading / Unloading External SWF Using Buttons From Loaded External Files

Feb 23, 2011

I spent almost a week trying to figure out how to unload a currently loaded swf using its button and loading a new swf... I have three files, a main.fla, file1.fla and file2.fla. In my main.fla, I have a code which loads the other two files. If i will click the "unload" button in the file1.swf, I would like the main.fla to unload the file1.swf and load the other file, file2.swf. Here is the code to load the file1.swf:

[Code]....

View 1 Replies

ActionScript 3.0 :: Loading External Swf That Loads Other External Files?

Apr 24, 2010

Lets say I have subgallery.swf file that loads jpeg images. And I have gallery.swf file that loads subgallery.swf.The jpeg images and both swf files are in the same folder.When I test gallery.swf it loads subgallery.swf but subgallery.swf doesn't load images. When testing subgallery.swf alone, it loads jpeg files.Is there any limitation or setting preventing external swfs loading other content?

View 2 Replies

ActionScript 3.0 :: Loading Multiple Xml Files On Click (urlRequest)

Jun 2, 2009

I am having trouble loading multiple xml files when the button is clicked.

View 5 Replies

IDE :: Loading External Swf That Loads Other External Files?

Apr 24, 2010

I have subgallery.swf file that loads jpeg images. And I have gallery.swf file that loads subgallery.swf.The jpeg images and both swf files are in the same folder.When I test gallery.swf it loads subgallery.swf but subgallery.swf doesn't load images. When testing subgallery.swf alone, it loads jpeg files.Is there any security limitation or setting preventing external swfs loading other content?

View 3 Replies

ActionScript 2.0 :: Load External Html Files Into Dynamic Textbox On Click?

Apr 16, 2008

_root.links.link1.onRelease = function() {
loadMovie(page1.html, _root.content);
}

[code].....

View 2 Replies

ActionScript 2.0 :: On Click Of A <next> Button Display Swf Files One After Another

Jan 22, 2011

How can i on click of a <next> button display swf files one after another on a website?

I have created a few (will be a few hundreds eventually) flashcards (for leaning chinese characters), how can i make them show-up one after another on a click of a <next> button? (How to create the <next> button, where to place, how to code it, and how to make the swf files appear one after another when the button is clicked?)

Each flashcard is interactive with dozens of layers (all lasting one frame only, but there is a movie clip within a movie clip on the first frame of one of the layers (an animated clip to show *how to* write the character), it has a stop(); command in the first and last frames. And there are dozens of invisible buttons that allow the content (example words and sentences) to show up and hide on click of the buttons (all coded in AS2 i think).

Each flashcard on itself functions perfectly well when published , but i am really puzzled how could i connect all the flashcards and make them show up one after another on the click of the (yet to be created somehow) <next> button.

View 1 Replies

ActionScript 3.0 :: Load 2 Swf Files With A Single Button Click?

Sep 1, 2011

I want to load 2 swf files with a single button click. I'm currently using 2 different functions with different loaders and I call both functions with the same button, but I get error 2025.

View 3 Replies

Actionscript 3.0 :: Load 2 Swf Files With A Single Button Click

Sep 1, 2011

I need to load 2 swf files with a single button click. I'm currently using 2 functions, but I get: ArgumentError: Error #2025: The supplied Display Object must be a child of the caller.[code]because I tried to load everything into a single function and when I used two functions I got error 2025.What code should I use in order to load two swf files at the same time, with a single button click?

View 1 Replies

ActionScript 3.0 :: Loading The External Swf Files?

Aug 25, 2009

[URL] how can i enable the swf files to run randomly basis without click of button

View 2 Replies

Professional :: Loading External .swf Files?

Jan 20, 2010

I'm working on a simple example of loading external swf files with some ActionScript.I've placed an instance of List Component and gave it an instance name of loadList. Using Component Inspector, I assigned data for 4 external files as below:

Next, I've added a UILoader component (instance name - loadWindow). The code that is supposed to load the content into UILoader is this:

loadList.addEventListener(Event.CHANGE, selectItem);function selectItem[code]..........

View 4 Replies

ActionScript 1/2 :: Loading External SWF Files Into A FLA?

Jan 21, 2011

I'm having trouble importing an external .swf into my .fla. file. The only AS that is working gor me is-

loadMovie("panoSceneNoMarkers.swf", _root);

However, once the swf shows, it replaces the background interface. I assume I have to add a _level into the code but how?

View 8 Replies

Professional :: Loading External SWF Files Into A FLA

Jan 21, 2011

I'm having trouble importing an external .swf into my .fla. file. The only AS that is working gor me is-
 
loadMovie("panoSceneNoMarkers.swf", _root);
 
However, once the swf shows, it replaces the background interface. I assume I have to add a _level into the code but how?

View 1 Replies

ActionScript 2.0 :: Loading External .as Files?

Jul 3, 2009

I've been making a game using Adobe Flash CS3 and actionscript 2.0 on my desktop and it was working fine. I tried to transfer the folder containing the flash file and all of the .as files to my laptop via a jump drive and now, when I run the the swf, it doesn't appear to be loading any of my .as files. All of the files are still located in the same folder as my flash files and it still compiles and runs fine on my desktop.

View 1 Replies

ActionScript 2.0 :: Loading And Using External SWF Files?

Aug 12, 2009

When you load an SWF file, is there any way to pass data to and from the SWF file?

View 1 Replies

ActionScript 2.0 :: Loading As3 External Swf Files

Sep 5, 2011

i need to load an external swf which is in as3...and need it to be played in my as2 swf layout. with a time slider ,play, pause ,next, previous for that swf movie clip. give ur mail id i can sent my original files. give ur mail id i can sent my original files. [URL]

View 8 Replies

ActionScript 3.0 :: Pre-loading External Files?

Nov 3, 2011

It's been a while since I've posted here so I apologies if it's in the wrong place.

My ProblemI have a large (30mb) swf file created in InDesign. It's an interactive PDF. Now rather then allowing people to view it straight away and having to wait elements to load we'd like to pre-load it somehow.

I was wondering how I might go about building a preloader for this SWF file. I have limited knowledge of action script, and most of that was as2 rather then 3.

View 3 Replies

ActionScript 2.0 :: MX Loading External .txt Files?

Dec 31, 2002

When I click on a button eg news, I use the loadmovie function to load news.swf. In news.swf, I have the following command (from Kirupa scrolling dynamically loaded text tut) to load a text file in:

stop();
loadText = new loadVars();
loadText.load("news.txt");

[code].....

View 14 Replies

ActionScript 2.0 :: Loading External .txt Files?

Oct 10, 2003

I can't seem to figure out how to load an external .txt file into my movie. I can get it to work onPress, but not for a frame script. got a quick script to display an external .txt in a dynamic text box in flash?

View 1 Replies

ActionScript 2.0 :: Loading In External .as Files?

Dec 16, 2003

i know how to load in external .as files so I can update easily. but why do you still have to re-publish the swf in order for the new .as file 2 take effect.is there any way that you can make a .as file be read in & so that it updates the .swf file, much like the way loading an xml or .txt file does?

View 6 Replies

ActionScript 2.0 :: Loading External .BMP Files?

Feb 12, 2006

I'm making an image catalogue for a client, and for reasons unknown to me my client insisted that the images be stored as binary data in a database. ( i know, i know....but they wouldnt' listen) Anywho, the format of these images is windows bitmap (.BMP). I've just found out that they want to be able to manipulate these images in flash. So i need to have actionscrip open these images.Since the images are stored in the db they have to be accessed via a php file like this: get_image.php?id=imageid.

This works fine for displaying the images in a browser as i just put the string inside an img tag so: <img src="get_image.php?id=someid"/>The thing is, I can't seem to get flash 8 to load these images via loadmovie. I've been able to load jpeg and gif files no problem, but can't seem to get these bmps to work. Adding to misery is that because there are going to be in the neighbourhood of 40,000 images, i dont' want to actually have the images saved locally.this is what i have, it works fine for jpegs and gifs:this.createEmptyMovieClip("pic", 1);pic.loadMovie("image1.gif");

View 3 Replies

ActionScript 3.0 :: Loading External SWF Files

Oct 13, 2009

I'm trying to import some external files to my main flash file with buttons. I click button 1 and content 1 is loaded, click button 2 and content 2 is loaded, and so on. So, I got two ways for doing it:[code]The problem with this first option is that the content to the box is not renew with each click but it stacks one over each other, so I can't use it =/

View 3 Replies

ActionScript 3.0 :: Loading External Swf Files?

Dec 16, 2008

I made a flash movie with 4 buttons that I need to each load swf files into the original. I have 4 selections that each need to load a different slideshow. The second part of my problem is telling the loaded swf where its target area is to be displayed in.

View 1 Replies

ActionScript 2.0 :: Loading External SWF Files?

Apr 15, 2010

I am trying to load an external SWF into my project, I am pretty sure that my code is fine but when I try to display the SWF all I get is an instance of my StartPage movie clip. The code for the loader does not mention or even any relation to this movieclip! I have the loader in a class file for a separate movieclip, but no matter where I put the code I get the same result. I cannot understand why this is happening!I tried loading the same external SWF into a different project, and it worked fine.Is this a common problem? I haven't managed to find anyone online with the same problem.

View 1 Replies

ActionScript 2.0 :: Loading External SWF Files

Nov 1, 2004

I am relatively new to actionscript and was wondering how i could resize a movie with an easing motion? Is this possible? I would like to load multiple external swf files into one "main" movie with this effect.

View 4 Replies

ActionScript 2.0 :: Loading The External Files?

May 2, 2005

on Flash MX 2004 having problems with loading external jpegs and stuff. I got a tutorial from here and loading from a web address on it is okay, but I can't get my one to load from my hard drive because there is always an error with the path. Each of my buttons has this assigned

button6.onPress = function() {
my_mc.loadClip("file:///c:/flash pictures/picture6.jpg", "container");
};

and results in this error

Error opening URL "file:///c:/flash pictures/picture6.jpg"

What's the correct format for putting in a file path? This may be an immensely stupid question, but I'm new to this and totally confounded.

View 3 Replies

ActionScript 2.0 :: Loading External SWF Files Into ImgMask

May 12, 2009

I' have a website where I have to load external swf files (contains a preloader and pictures). I am able to load the first swf file but it only goes till the preloader, once the preloader gets to 100% loader it stops there, but it's supposed to display the a picture. I have created an empty movie clip and it's instance name is imgMask and this is the code I'm using to load the external swf.
_root.imgMask.loadMovie("boda_katy.swf", 65);

When I preview it it loads, the preloader counts the picture size and once it reaches 100% it stops there, doesn't display the pic. But when I use
"loadMovie("boda_katy.swf", 65);
It shows the picture. But I needed to load into the movie clip imgMask.

View 1 Replies







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