Flash8 :: Loading AS From Another Swf File ?

Feb 18, 2010

I am creating a new site using Flash 8 AS2, I have a question but im not even sure if its possible. I have created (for arguments sake) Main.swf which is made up of a logo, music player and a main window, this main window is a MC called content (content_mc). This loads external SWF files into it.

At the moment when the main.swf file is accesed it automatically fades content_mc window to black then fades back out to display a swf file called 'door.swf' that all loads fine and heres my question --- within door.swf there is a button (door_btn) what i want to happen is when door_btn is clicked I want it to look at the action script listed under the main.swf file and fade out content_mc (currently displying door.swf) then fade back in with the a new swf file i.e room.swf.

So the main.swf file has no buttons on it, all the buttons will be displyed within the swf files loaded into the content MC, when any of these buttons are clicked I want the Main.swf to perfom the transition and disply the new swf file, is this possible ?

The code im using at the moment is as follows: In Main.swf i have a content_MC and transition_MC

Content_mc

Code:
onClipEvent (enterFrame) {
if (!loaded && this._url != _root._url) {
if (this.getBytesLoaded() == this.getBytesTotal()) {

[Code]......

I know ive got to put some code into the external swf files but i dont know what ?

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Flash8 Loading A .txt File On A Different Domain?

Mar 8, 2010

Loading the text file works just fine until I put the .swf on another domain. How can I still load the .txt file without just putting it on the same domain? Is there some kind of security or permission that I can place into the html or flash?

View 1 Replies

ActionScript 2.0 :: Flash8 - Control A Movie Clip Of One Swf File From Another Swf File

Nov 30, 2010

I am working on a project which there are two .swf file play side by side simultaneously. I need to use one of the file to control the animation in another file.

If they are in same .swf it should be easy. I can just use:

gotoAndPlay("frameNumber")

but there are two .swf now. (lets say movieA and movieB) I think I should use something like:

"LinkToMovieB".gotoAndPlay("frameNumber")

"LinkToMovieB" should be the link to movie clip in the movieB file.

my problem is how do I get the link to movie B's movie clip. or there is other proper way to do this task.

View 1 Replies

ActionScript 2.0 :: Flash8 Loading A .swf From A Different Drive ?

Mar 11, 2009

I need to make a flash located on the internet load a swf from user's PC/network. Essentially, make it so that "myrandomsite.com/main.swf" can load "U: andomfolderinfo.swf".

I tried using cross domain policies but that didn't help (of course I've never used them before so I'm not entirely sure how they work). And I'm not well versed with Javascript but I am willing to try. I'm trying to do is have a .swf from C: read files from U:

View 3 Replies

Flash8 :: Insert An Swf File Into Another Flash File?

May 2, 2009

I'm trying to insert an SWF flash file (a game) into another Flash file. However, when I import the swf file into the library and drag it onto the frame (and insert the stop(); command onto the frame action to stop it playing the whole movie), the SWF file plays constantly, ignoring all the actionscript and button commands in the game SWF file.When I try inserting it using the Window component, the game SWF refuses to play at all - it just stops (clicking buttons in the game work, but it goes-to-and-stops instead of go-to-and-play like it's supposed to do).When the game SWF is played by itself (by just double-clicking to open it from Windows Explorer or embedding it in a web page), it works fine.

View 2 Replies

ActionScript 2.0 :: Flash8 Data Loading From Server Is Freezing Flash

Jun 10, 2009

I have an ASPX script that load the properties of a long list of objects from database (about 1000).

Then I have a spinning mc to entertain the user while data is loaded.

The problem is that it starts to spin, and then, at certain point of data reading the animation freezes indicating that Flash is too busy gathering and putting data into the LoadVars object (it restarts to spin after finish data reading).

Question is: there is a way to override this and force Flash to give priority to the animation? I think that's a very ugly behavior by the point of view of user and would be nice if it could be fixed.

Personally I cannot see another way to turnaround it but performing several smaller and consecutives database readings (to reduce CPU load), but I think that's a totally unaceptable solution...

View 1 Replies

ActionScript 2.0 :: Flash8 Loading External Text With Multiple Spaces

Sep 5, 2009

I have been trying to get this working right for days and it is driving me crazy. It should be very easy, so I'm not sure what I'm missing.

I'm loading in an external text file, which is fine, but the problem is with how it is displaying.

It should look like the attached word file. But when I paste it in a text file it gets messed up. A sample of that is attached as well. I have tried making it look the same in the notepad file, but that doesn't come out right in the flash.

I have tried everything, importing as html, using xml files, copying the text into different programs and then into the text file.

View 3 Replies

ActionScript 2.0 :: Flash8 : Dim Background Content After Loading An External Swf Into Main Swf?

Dec 15, 2009

dim background content after loading an external swf into main swf. I was told that a dark movie clip placed over the whole site but under the external swf with alpha set to 50% would work. I need the background content to dim when the external swf is loaded and then go back to normal when exiting that page link. How can this be done thru xml or actionscript?My website is an xml flash template that loads the text and pictures for the site Thru xml file. Anyone have sample code? I am newbie to actionscript.

View 7 Replies

Flash8 :: Saving And Loading Attached Object With Shared Objects?

Sep 7, 2010

I know the basics of shared objects but I never really got into it I was wondering if there is a way that I could save and load movieclips that I attach to the stage(Each has its own name such as clip_1,clip_2,etc) including the location(_x,_y,rot) and have it duplicate them all over again and move them to the same location as before (I'm using Actionscript 2, by the way)

View 1 Replies

ActionScript 2.0 :: [Flash8] Loading / Unloading Movies / External Swf Files

Jun 29, 2009

wherever I look for scripts is either AS 1.0 or 3.0... I used to work as a cartoon animator (didn't need AS at all) now I'm trying to build up my own site to show my portfolio. I'm having difficulties loading and unloading external swf files. Basically I'm a total newbie, I managed to figure out that you need an empty movie clip where it will be played, and the buttons themselves...

View 8 Replies

Flash8 : Reduce The File Size?

Nov 6, 2009

I am designing a website. My flash file comes up to a size of 1.5 mb. It takes around 1 minute to load.reduce the file size.

View 1 Replies

ActionScript 2.0 :: Flash8 - How Much Text Is Inserted From An Xml File

Apr 7, 2009

I have a loop which duplicates a MC ('news_list')on the stage and places it underneath the most recent clip...

code:
for( i = 0; i < total; i++)
{
var news= news_list.news_item.duplicateMovieClip("news_item" +i, i);[code].........

I have a text box inside the MC which autosizes depending on how much text is inserted from an xml file. This should then obviously increase the height of my 'news_list' movieclip.What I want is for the next instance of the 'news_list' MC to be placed directly underneath the current one,no matter the height of the clip.Currently,I can only get it to position a specified distance below the current instance.The code above is what I've currently got,but I can't quite grasp how to grab the height of the current instance, and then use that in the code to place the next instance below it...

View 2 Replies

ActionScript 2.0 :: Flash8 Save To External File?

Apr 12, 2009

I have a number of different swf files that all have a score variable. I was wondering is it possible to save this variable into an external file and be able to load these variables in a different swf?

View 3 Replies

ActionScript 2.0 :: Flash8 Import Txt.file - Know When Updated

Apr 16, 2009

If I use an imported txt-file in my flash-move. Is it possible for flash to see if it has been uppdated ( last time saved ) the last five days?

View 2 Replies

Flash8 :: Dynamically Create XML File References?

Jun 29, 2009

I need to create two combo boxes that are populated by an XML file. In the first combo box there are 13 choices and depending on what the user selects I need to populate the second combo box with the correct information. Now I can create the first combo box just fine but when I try to dynamically create the XML file name for the second combo box it doesn�t seem to work. What I am doing so far is taking the data from the first combo box and adding the quotes and .xml with this piece of code:

PHP Code:

pModCombo = '"'+event_obj.target.selectedItem.data+"Combo"+".xml"+'"';
pModComboXML = new XML();
pModComboXML.ignoreWhite = true;
pModComboXML.load(pModCombo);

If you trace that code it creates the file name just fine however the xml file will not load. If I replace that code with the normal xml code like this:

PHP Code:

pModComboXML = new XML();
pModComboXML.ignoreWhite = true;
pModComboXML.load("new.xml");

The second xml file seems to load just fine. However, if I create an if statement with all the different xml file names I will have to update the swf every time I add a new choice in the first combo box. So my question is does anyone know how to dynamically create the xml file name?

PHP Code:

pmComboXML = new XML();
pmComboXML.ignoreWhite = true;
pmComboXML.load("brands combo.xml");

[code]...

View 6 Replies

ActionScript 2.0 :: Flash8 File Tree Without XML Or Mysql?

Sep 6, 2009

I was wondering if it's possible to make a file tree in flash without xml or mysql. Just define the folder to read from the same server and the component would display folder contents...

View 6 Replies

Flash8 :: Save Variable Data Is Swf Or Other File?

Jul 5, 2011

there are 2 items on stage, one is the "button" with instance name myButton and a dynamic text field.so the action script goes this way...

myVar=0;
myButton.onRelease=function(){
myVar++;
trace("click");
}

the dynamic text is initially zero (0) and when i click the button it counts the clicks up to here every thing works right but...when .swf file previewed in html after clicks if refresh is pressed the number is going back to zero.i want to upload this file and use on webpage.

View 5 Replies

ActionScript 2.0 :: Flash8 : Load A Text File?

Mar 25, 2012

i have a flash file where i have created a text it is dynamic .i would need to get evry 10 seconds an update on this text from a file called update.txt

View 2 Replies

Flash8 :: Reading The First Line Of A Text File And Stopping

Aug 7, 2009

I am using flash 8 and I have succeeded so far in loading variables from a text file that contains around 20 lines and have the variables displayed in texboxes. The problem is that it goes directly to the last line and displays those variables. I need it to read the first line only and stop so I can add a "next" and "previous" buttons and be able to navigate through the database.

View 11 Replies

ActionScript 2.0 :: Flash8 Url For Txt File In Dynamic Text Field?

Jun 3, 2011

dynamic text field, which displays a txt file.

If I hardcode the file name in the code, then it works fine. This is on the first frame of my movie, which holds the dynamic text field.

Code:
myData = new LoadVars();
myData.onLoad = function(success)
{

[Code]....

Is there a trick to defining url's for dynamic text fields? Because if I hardcode the path from the server, it works locally, but again not on the server..

View 2 Replies

ActionScript 2.0 :: [Flash8] Mc Color Change Through External File?

Jan 2, 2007

I want to change the color of a movie clip, and I've succeeded with the following code:

var my_color:Color = new Color(mc);
my_color.setRGB(0xFF0000); // mc turns red

Now, this is only the start. What I really want is that the color is changed via an external textfile (or similar).

I've gathered that this is possible with the LoadVariables function, but I can't seem to get it right. Does anyone have a solution for this? I'd also like to know how I should format the textfile code (should it be something like this: "&mc=0xFF0000"?)...

View 14 Replies

ActionScript 2.0 :: [Flash8] - Read The Slides.xml File Thats In Each Folder?

May 21, 2010

I'm using flash 8 and slideshowzilla to make a 3d /2d gallery site. Ok, here's what I have so far. I have one folder named 3d and another named 2d. Each folder has all the files that slideshowzilla makes to play the gallery. (see image) In flash 8 I have the 2dimages.swf and 3dimages.swf set in loaders and it all works fine but i get a "Error opening URL 'file:///C|/slides.xml' and the gallery won't play because the slides.xml file that it's looking for is in each folder. how do I get flash to read the slides.xml file thats in each folder?

View 1 Replies

ActionScript 2.0 :: Flash8 Flash_A To Detect Flash_B's Sharedobject File?

Jun 30, 2009

I just learned how to use sharedobjects few week ago. Is it possible for Flash_A to detect Flash_B's sharedobject file?

View 1 Replies

ActionScript 2.0 :: [Flash8] Username And Password Data In Separate File?

Jan 22, 2006

i am have big problems, im designing a login screen and it will require more than one user to be able to access differnt parts of the flash file. at the moment i am using IF statements.

[Code]...

there is no problem with this method but if a user wants to change there username how to change the script. the other thing is the flash file is being converted to a standalone .exe file so it's basically like a program. to get to the point I need to know if there is any way for the Actionscript to be able to read a .txt document so that when the username and password is changed in the .txt document flash will read it so when they enter the new username and password it will still allow them to access the files.

View 7 Replies

ActionScript 2.0 :: [Flash8] External File - Button To Switch Between Backgrounds

Mar 9, 2006

I'm making a flash banner for a client, it has a button to switch between backgrounds, however, how do I say something like

[Code]...

View 7 Replies

ActionScript 2.0 :: Flash8 : Why Does Flash Not Manipulate Data Imported From A Text File

Mar 4, 2009

I cant believe that Flash will let you load data from a text file then doesn't allow you to do anything with the data other than display it. Surely there must be a way you can do something the data imported ie perform some calculations.Is this beyond Flash or is this something that has been addressed in AS3?

View 4 Replies

ActionScript 2.0 :: Flash8 : Properly Organize Dynamically Loaded Thumbnails From A Xml File?

May 28, 2009

how you properly organize dynamically loaded thumbnails from an xml file, into a grid.What I'd like is for the number of columns and rows to be set in the xml file also, and for the flash file to auotmatically fill out the rows / columns based on how many thumbs are in the xml file.

I've found examples of this type of thing in both as3 and as2, but I can't seem to get my as2 version working properly... how to create a thumbnail grid in as2...I don't really want the thumbs to link to a bigger version fo the image...

View 5 Replies

ActionScript 2.0 :: Flash8 : File Upload Not Working With Flash Player 10.1 In Firefox?

Jul 14, 2010

I have a file upload script to upload pictures to a server. It has been working fine in all browsers but when I upgraded the flash player to 10.1 in firefox 3.6.6 yesterday it stop working.I retested with another computer and as soon as i installed the flash player 10.1 it stopped working.I did some debbuging and noticed that the error return from the FileReference listener is I/O error.It doesnt make sense because the file is in the server and it works fine in all other browsers.I changed allowScriptAccess from "samedoamin" to "always" without luck. it works perfect in other flash player versions.the HTML that embeds the movie:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="550" height="300" id="test" align="middle">
<param name="allowScriptAccess" value="sameDomain" />

[code]....

View 5 Replies

ActionScript 2.0 :: [Flash8] Place An External Swf File On It In A Desired Position When The Corresponding Page Is Being Loaded + Scaling

Aug 18, 2006

I have a flash file (a flash navigation bar actually, which gets loaded in all the webpages inside the website). What I am trying to do is place an external swf file on it in a desired position when the corresponding page is being loaded. I am using FlashVars (variable name -> 'movieName') to pass the name of the movie clips. These variables are read by the navigation swf file and the corresponding swf file should be loaded in the area specified. Now, to create a container, I am using createEmptyMovieClip() method which will host all the external swf files.

The swf files are all being loaded but with a lot of problems. First, no matter what I try, the swf file comes at a fixed place (which is way off from where it is supposed to be). I have tried checking if the container loaded the movie before fixing its position but it changed nothing. Although it did change the position of a weird background colour box I am getting when the movie starts loading - which brings me to the second problem.

A rectangular box flashes once when the external swf is loaded, and its position is being affected by whatever I am setting the _x & _y values of the container movies to. I have no idea why it is happening as it doesn't happen when I test that swf seperately.

[Code]...

View 1 Replies

ActionScript 2.0 :: [Flash8]Loading 3 External SWFs W/mousewheel Scroll--but Need Them To Scroll Indep?

Jun 3, 2011

I am loading a different external SWF into each one using Load External SWF behavior.Although each SWF is a different file, they are exact copies of each other (have exact same functionality); all 3 are text boxes with both scrollbar scrolling and mousewheel scrolling.Problem is, when on the stage at the same time, they all three respond to mousewheel scroll at the same time. I need them each to respond to users' mousewheel scroll only if the mouse is over the respective area (so that way they don't all scroll at the same time).The file was developed for me and the developer is not available at this time.

View 1 Replies







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