ActionScript 3.0 :: Loading A Swf File Who Loads Multiples Swf

Jul 17, 2010

I'm working on a presentation who loads a gallery built in a .swf file.

I'm using the following code (Actionscript 3):

var container:Loader = new Loader();
container.load(new URLRequest("gallery-v1.swf"));
addChild(container);
container.x = 0;
container.y=100;

So far so good this code works ok, loading gallery-v1.swf in the correct place. But the gallery also load a few swf itself.

The result is when I load the gallery, is placed in the correct position, but the gallery also loads other swf files on the root(?) of my project, in the 0,0 position and overlapping or clearing my job!

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Pre-loader Loads 80% Of File Before Loading Itself?

Nov 22, 2010

The SWF loads itself almost entirely before even displaying Frame 1 (the pre-loader). Said pre-loader exists in it's own scene; when this scene is exported on it's own, the file size is 1.6 megs (the full export of all scenes is 1.9 megs). There is VERY little content in the preloader, in fact, a blank first scene exported on it's own is ALSO 1.6 megs. There is, however, a lot of content throughout the rest of the file (music, graphics, font, all embedded at the request of a client).It looks sort of like it's trying to ensure that some arbitrary amount of the resources are present before the first frame loads.

I used to be deep into Flash way back in the CS3 days, but haven't touched it since; the result is I am fairly familiar with AS3 but CS5's new features (many of which seem to replace entirely code-oriented methods with point and click methods) often times make me scratch my head, so you'll have to forgive me if this is the sort of 'five times a week question' y'all are numb to by this point.but I'm still not entirely sure.I've already scraped every last little bit of that awful TLF text stuff from the project, and I've fiddled with the action script settings but haven't had any luck.I'm not exactly sure what code to post here, as little of it seems relevant (after all, the problem appears to be happening before anything I've written runs). Please, though, if there's anything I can do to make this more clear, I'm totally willing to oblige.

View 3 Replies

Xml :: Loading A Configuration File BEFORE The Flex Application Loads?

Apr 19, 2010

We are using an XML file as an external configuration file for several parameters in our application (including default values for UI components and properties values of some service layer objects). The idea is to be able to load the XML configuration file before the flex application initializes any of its components. This is crucial because XML loading is processed a-synchronously in flex, which can potentially cause race-conditions in the application.

For example: the configuration file holds the endpoint URL of a web service used to obtain data from the server. The URL resides in the XML because we want to allow our users to alter the endpoint URL according to their environment. Now because the endpoint URL is retrieved only after the XML has been completely loaded, some of the application's components might be invoking operations on this web service before it is initialized with the correctendpoint.The trivial solution would have been to suspend the initialization of the application until the complete event is dispatched by the loader. But it appears that this solution is far from being trivial. I haven't found a single solution that allows me to load the XML before any other object in the application.

View 1 Replies

ActionScript 2.0 :: Loading Into The Movie Loads A Easily Editable External XML File?

Sep 15, 2009

I know this goes against the logic of most menus. I am building a menu. I have very nice mc called "menu_list" and loading into the movie loads a easily editable external XML file with all my over categorys and sub menus

it looks like this...client.niallohara.net/xml_menu.html

[Code]...

View 0 Replies

ActionScript 2.0 :: When The Xml Menu Loads Swf File Its Structure Loads But Not Its Data?

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

Have An Animated Logo Swf File That Loads And Runs Once On The Home Page Every Time The Page Loads?

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

ActionScript 2.0 :: Multiples Of A Number?

Feb 17, 2010

There must be a simpler way than to say:

PHP Code:

if(x == 5 || x == 10 || x == 15) //etc
{
y += 1;
}

Is there a way to set it so that if "x = multiple of 5" then "y += 1;"

View 1 Replies

Xml :: Descendants With Multiples Conditions?

Apr 21, 2011

Example of my XML list:

<listnode>
<nodeA id="1">
<nodeB id="1" />

[code]......

View 2 Replies

ActionScript 3.0 :: Add Multiples Of Same Mc From Library?

Jun 26, 2010

I did a search and didn't find what I was looking for so if this is a repeat of a previous thread I apologize.

Essentially I'm looking to add multiple instances of the same mc I have in the library. I found some code while searching around, but can't seem to get it to work. I don't get multiple mc's on the stage[code]....

View 3 Replies

Actionscript 3.0 :: 'tagging' And Item In XML - Multiples Of The Same Attribute?

Jan 22, 2010

I'd *like* to use E4X filtering to enable users to sort some content.... the XML structure looks something like this:

<item title="" type="" />

type="" is the issue, as each item could have multiple types... for ease of use, i'd love to be able to do something like type="print, web, video"but obviously that doesnt work.... Does anyone have experience with some kind of 'tagging' structure for items loaded from XML?

View 5 Replies

ActionScript 2.0 :: Display Multiples Lines Of Text Thru XML?

Jun 29, 2009

I'm setting up this animation of photo transitions. Each "set" consists of a photo and two lines of text on top of it, and so forth...I based it on this tutorial [URL], and most of it works, but stumbling on how to show the two separate lines of text...I'm guessing I need another array for the 2nd line of text after "description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;" (see below) ?

function loadXML(loaded) {if (loaded) {xmlNode = this.firstChild; image = []; description = []; total = xmlNode.childNodes.length; for (i=0; i<total; i++) { image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;

[Code].....

View 1 Replies

ActionScript 3.0 :: AddChild(object); / Add Multiples Of A Movie Clip ?

Jun 23, 2009

when I use:

var a = parent.addChild(cloud);
a.x=10;
a = parent.addChild(cloud);
a.x=100;

I only get one cloud made at the position (100,y) (or, the last cloud I declare is the only one to show). How do I add multiples of a movie clip ?EDIT: I tried using addChild(new cloud) but the compiler says "Call to a possibly undefined method cloud."

View 8 Replies

ActionScript 3.0 :: Find Last Instance Of Set Of Characters In A String With Multiples Of That Set

Jun 2, 2010

Lets say I have a string like so...

../images/work/environment/images/biz1.jpg

as you can see the set of characters of "images" in that string twice.

I need to replace the second "images" with something else. Had there only been one "images", I would have done something like this...

Code:
var url:String = "../images/work/environment/images/biz1.jpg";
// Pattern we are looking for in string
var imagesPattern:RegExp = images;
// Replace
AddThumb( url.replace(imagesPattern, "thumbs"));

Because there are two "images" this will not work.

View 5 Replies

ActionScript 2.0 :: Xml Generated Drag And Drop - Multiples Origins Points

Mar 2, 2011

im kind of new to flash, and i have a question. On my scene, i have buttons generated from a xml file that can be dragged. I took the code from a tutorial on the web and added the drag function. I also have a drop zone where i put the button and it do some function. Here is my question, when i drop the button on the drop zone, the button stay in the center of the drop zone. If i drop another button to the drop zone, i want the previous button to return to its original position. How ?

Is there some kind of function to retrieve the last button used ? But even with this function, the problem is that if you click a new button, but change your mind and click on another one without dropping it in the drop zone, the last button is not the one in the drop zone anymore.

View 9 Replies

Share Swf File That Loads Another External File?

Jun 8, 2011

So I wanted to give a demo of my project to someone, but I encounter a problem, Im loading an external swf file, and even if I give him both files, it doesn't work.Share swf file that loads another external file?

View 1 Replies

ActionScript 2.0 :: Flash File Which Loads An Xml File?

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

ActionScript 2.0 :: Show 'loading' Image While Swf Loads?

Aug 14, 2009

I am a php programmer who has no experience whatsoever with flash. I've got a swf on my website that calls an image. The images it calls can take a few seconds to load and I would like to display something in the meantime to let the visitor know that the site is working.[code]I've done some Googling and I think it is something to do with LoadListener. Am I right in thinking that this "self monitors" the process and that you can use this to display something in lieu of the actual swf loading??

View 10 Replies

ActionScript 3.0 :: Loading An External Swf That Loads An Object From Url?

Dec 30, 2009

i am trying to load an external swf that in turn automatically loads an object. i want the external swf to only be loaded once the object is loaded in it. right now it loads the external swf first and then the external swf loads the object specified at a url...

View 3 Replies

Flex :: Get Around A Security Sandbox Violation When A Swf Is Loading Another Swf Which Loads Another Swf?

Oct 30, 2009

I have a AS3 swf [1] that is loading another AS2 swf [2] which is loading another AS3 swf [3].

I'm getting a Security Sandbox violation on the AS2 swf trying to access the last AS3 swf (3), but I'm using Security.allowDomain("*") in practically all the classes of the first AS3 swf (1).

View 1 Replies

ActionScript 2.0 :: Loading Thumbnails In Loop Only Loads Last Thumb

Mar 26, 2010

I am trying to load a group of thuimbnails using Moviecliploader within a class function. Only the last image is loaded onto the stage. can anyone point me in the right direction, I have been wrestling with this for a couple of days.

[Code]....

View 9 Replies

ActionScript 2.0 :: Loads An External SWF While Going To A Transitional "Loading?

Apr 24, 2002

I have a button, that, when you press it, loads an external SWF while going to a transitional "Loading ..." screen. Afterwards, I want the loading screen to disappear, and have my portfolio.swf become visible. My code is as follows

[Code]...

View 1 Replies

Javascript :: Loading Flash Preloader Before The Game Content Loads?

Aug 20, 2010

i have a small requirement. like i am currently working on a games website in which whenever i open the game a flash preloader needs to open first and hide the game file while the flash preloader loads. once the flash preloader completes its loading then immediately the game content need to display. i heard it can be done using javascript,ajax.

View 1 Replies

ActionScript 3.0 :: Parent Loading In Child That In Turn Loads In Jpegs?

Oct 31, 2009

I'm getting a bald patch on my head from frustration with the following problem. I have a parent AS3 swf which loads in a AS2 swf like so;

stop();
var ldr:Loader = new Loader();
ldr.load(new URLRequest( "as2child.swf"));
addChild(ldr);

contained in the AS2 file is the following script which loads in jpegs when the user clicks the next button, etc.

[Code]...

however when you view the AS2 swf via the AS3 swf it does not seem to load in the jpgs when requested.
I need to retain the AS2 file so cannot rewrite in AS3 as the image loading thing is only a small part of the AS2 file.

View 1 Replies

Getting The Progress Bar To Unload Once File Loads?

Aug 14, 2009

I have have applied the progress bar from the componets panel in Flash CS3 using AS2 and I have been able to make it function: however, I have not been successful in getting the progress bar to unload once my file loads. I have tried a couple of things like using an if statement and the unLoadMovieClip but I seem to be wording the code wrong because neither have worked at all, they even have cancelled out all the other code. Here is my code:[code].......................

View 3 Replies

Flash :: Swf Which Loads In A Flv File Via Flashvars

Nov 22, 2010

I have a video player swf which loads in a flv file via flashvars. This works perfectly, but when it reaches the end it loops ie Goes back to start and plays again. This only happens when it is embedded in a page because when I press cntl+Enter to preview as swf alone it works.

[Code]...

View 2 Replies

Flex :: Swfloader With A Swf Which Loads Another Swf File?

Mar 23, 2011

I have one Swfloader. This swfloader loads file A.swf.On creationComplete event, File A.swf loads another swf(file B.swf).

Everything works fine when I run the application once in the same machine.But when I run two or more instance of the application, the first works fine (both file A and B are loaded) but the second swf (file B) is not loaded by file A.why the first swf (file A) doesn't load file B, when the application is running in multiple instance ?

View 1 Replies

ActionScript 3.0 :: Loads Images From Xml File

Feb 7, 2010

how to load images from an xml file into my flash file. I want to make something very similar to: [URL] So that it has a next and previous option. All my images will be exactly 128x128 pixels (png files), but there could be any number of them.

View 1 Replies

ActionScript 2.0 :: Creating A UI That Loads An Xml File

Apr 5, 2011

I will be creating a UI that loads an xml file. The UI will allow the user to edit some questions and categories that are found in the xml. (UI pulls data from xml). Will this require use of php and mysql? Is there a way to do it without using a server side language-say I want this to run standalone..not online....

View 3 Replies

ActionScript 2.0 :: Loads Some Variables From An XML File

May 31, 2004

Got a movie that loads some variables from an XML file. The content of each XML.node fills the corresponding dynamic (on the fly) recipients (mcs).
I know how to do this once, not using a for (loop) basic parser, so, I got stuck with this simple code while I was trying to "make it" with a "loop" parser.[code]The idea is to have 2 buttons that change the number of the array sothat I can access the next XML.node without having to write all the code again, neither the dynamic recipients -movie clips- nor the parser. Can't I make a function from all of these sothat I can call it later?

View 1 Replies

ActionScript 2.0 :: Run A Php File When Flash Loads?

Nov 1, 2005

I am trying to figure out how to run a php file when a flash file is opened on a site or ran. the php file has no output or anything to do with the flash, it just needs to be run to update the mysql database. I need the script to be run from my site even if the flash is on another site, but i do not want to show that it is being run. I want it to be a hidden thing. Is there any way possible to do do this with flash?

View 2 Replies







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