ActionScript 3.0 :: Adjust Loading Paths Of Loaded SWFs?

May 28, 2011

I have an SWF called A.swf which dynamically loads other assets from a relative path. However, if I want to load this A.swf into B.swf, for the dynamic loading in A.swf to work properly, A.swf and B.swf have to be in the same path. But I want A.swf to be in another folder, along with its assets.

There are no broken paths - if the loading path was relative from A.swf, all the assets would load correctly, but when I load A.swf into B.swf, all the paths start from B.swf, even if they are requested from A.swf, and that causes problems for me.

View 7 Replies


Similar Posts:


ActionScript 2.0 :: CS3 Buttons In Loaded Swfs Loading Other External Swfs Into The Main Timeline?

Sep 11, 2009

I have a main fla file which loads an external swf into an empty movieclip on the main timeline which works fine but I want a button in the external swf to load another external swf into another empty movie clip on the main timeline.eg. start.swf loads UKEIAMap.swf into (empty movie clip within start.swf) MapLoader_mc then a button havant_b within UKEIAMap.swf needs to load HavantProjectSheet.swf into (empty movie clip within start.swf) ProjectSheetLoader_mc without unloading UKEIAMap.swf

View 3 Replies

ActionScript 2.0 :: Loading Other Swfs From Loaded Swfs?

Aug 2, 2006

Flash - 8 : Above is an example of what I would like to do/have done. I've gotten as far as loading the "loaded.swf" into the "start.swf" but my problem is I'd love to use that little loading action I made earlier without copying and pasting into the new movie the same actions for a different link. So, how do I load "loaded2.swf" into "loaded.swf" via the link in "loaded.swf"?

View 1 Replies

ActionScript 3.0 :: Relative Paths And Swfs Opened With Loader?

Feb 12, 2009

Relative paths with Loader seems to be different than with loadMovie. How do I access the main movie's (mov_a) functions from the loaded movie (mov_b)? I tried using mov_b's parent and root but neither worked.

For the sake of clarity, this is mov_a's code:

[Code]...

View 1 Replies

Actionscript 2 :: Opening Other SWFs Using Relative Paths On Networked Drive

Mar 26, 2012

We cannot seem to get an original .SWF to load its partner .SWF files.While the <object> tag will load its file properly, the .SWF cannot load other .SWFs into it.The ActionScript is autogenerated via AS2 "Behaviors", and basically calls either loadMovieNum(file, this) or this. LoadMovie(file), depending on how it was loaded previously. Each group of .SWFs that reference one another will exist on a drive-mapped network share.A Client is using the "Behaviors" feature of ActionScript 2.0Said behavior is to load other .SWF files in the same path depending on an onRelease() event Neither the Client, nor ourselves, are fluent with Flash & ActionScript.The .SWF will be hosted in HTML inside of a custom application.The software programmatically loads HTML from a stream, not a file.Said HTML uses the standard <object> tag to host the Flash .SWF.The primary .SWF is located underneath a mapped networked drive (example: "K:") in a series of subfolders.The group of .SWFs will reside in the same folder Our controlled environment is WinXP+SP3 and Flash 9, with extremely-limited ability to update.They are strongly against using absolute paths, as it will affect reuse of certain .SWF groups.

Using Process Monitor and dabling with the "base" <param>, we have seen the following: Without the param, it tries to find the .SWF as a Registry value underneath AboutURLs. This is likely a side effect of our app initially pointing to "about:blank" before dynamically loading the HTML.With the full path ("Kestsub") as base, it tries to find the SWF on the root of the "C:"Testing with a real HTML file (not yet able to test with the App), providing a full path without the drive letter ("estsub") will navigate to this path from the same drive as the HTML. Given our limitation (the "about:blank" thing), this probably will either be the "C:" OR the Registry. Is this possible by using any HTML/ JavaScript on our end, or will we have to have some ActionScript that will determine the current SWF's path, use that to dynamically obtain the location of the other SWFs (also in the same path), then try to teach this Client how to implement the script? Again, they (and we) know little about Flash; they used "Behaviors" to try and get this to work.

View 1 Replies

Flash :: Loading A SWF Dynamically Causes Previously Loaded SWFs To Misbehave

Mar 26, 2010

I have run into a very strange problem with Flash and Flex. It appears that under certain circumstances, movie clips from a SWF loaded at runtime (using Loader) cannot be instantiated if another SWF has been loaded in the mean time. Here is the complete code for a program that reproduces the error. It is compiled using mxmlc, via Ensemble Tofino:

[Code]...

View 4 Replies

ActionScript 2.0 :: Getting Loading Paths From A .txt File?

Nov 30, 2007

I can load variables into flash text fields but I can't use those variable in my action script. Heres what I'm trying to do. I have a top5.txt file that looks like this:&title1=L.A.M.B. FRAGRANCE&body1=National Geographic reminds us to stay Green - with a little fromNatalie Portmany Green

&detailspanel1=
&imagepath1=/topfiveimages/image1.jpg
&videopath1=/topfivevideos/top1.flv

[code].....

View 1 Replies

ActionScript 3.0 :: Loading Image Paths From Xml File?

Aug 4, 2010

I have been fighting with my issue of loading an xml file from flash for about 10 hours. When I run the swf on my desktop it works fine. If i access the file directly on my server it works fine as well in FireFox and Internet Explorer. When I run it from my portfolio www dot cspsolutions dot ca/portfolio(first portfolio item) and you run it in FireFox it displays the error:

Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: products.xml
at ImageChanger()
at ImageChanger_fla::MainTimeline/frame1()

I know that the path is correct because I uploaded the whole directory so the file structure should stay the same. To get a better understanding of the situation you can view the file at www dot cspsolutions dot ca/portfolio/imageChanger . It only raises the error in FireFox however the animation does not display in both browsers.

View 7 Replies

ActionScript 2.0 :: Convert The XML Paths To Flash Paths

Mar 5, 2007

Does anyone know if there is some kind of program that can convert the XML paths to Flash paths. Hmm...what I'm after is some little program that basically lets me open up an XML file, point on a node or attribute and the program will the flashpath to this node/attribute, where the path is something like: his.firstchild.childnode[2].attribute.jadajada

View 1 Replies

ActionScript 3.0 :: Loading External Child SWF - Lock Paths Dynamically

Jul 26, 2010

I have a Main.swf that loads an external Child.swf, also the Child.swf loads some external files. My problem is that once the Main.swf loads the Child.swf. The paths that Child.swf reads (for it's external files) are no longer normal and it reads the paths from the Main.swf. (Main.swf is in another folder). Is there a way to lock the paths of the child.swf dynamically from the Main.swf?

View 1 Replies

ActionScript 2.0 :: Adjust The Size (width*height) Of A Externally Loaded Movie?

May 27, 2004

s how to adjust the size (width*height) of a externally loaded movie?

View 12 Replies

ActionScript 2.0 :: Loading / Calling .swf (relative / Static / Hard-coded Paths)

May 7, 2004

if someone can shed some light to this matter... i'm pretty new (somewhat) w/ AS let's say, i got an .swf (voets enahnced mp3-player) @ [URL] --which works perfectly at the moment. i then referrenced this .swf in [URL] --which doesn't work prolly because the .swf is calling the XML (i.e. "onlineplaylist.xml") relative to its whereabout, which is /test08. the question is, is there any way around this problem, so that if i put all .SWFs in a certain location (server/directory/what-have-you...), and referrence it from another server &/or directory (like above), it would work?

[Code]...

View 2 Replies

ActionScript 3.0 :: Add Paths To The Flash Runtime Search Path For Loading Files?

Mar 13, 2012

Is there a way to add paths to the Flash runtime search path for loading files? Say I want to load myXML.xml and its down in /myDir1/myDir2/myXML.xml. Is there any way I can add "/myDir1/myDir2" to the search path so I can just load using the string "myXML.xml" INSTEAD of loading by the full path "/myDir1/myDir2/myXML.xml"? My directory structure will be changing on a semi-regular basis so I can't hard-code the direct path to the file.

View 8 Replies

ActionScript 3.0 :: Loaded Swfs Not Working When Loaded Through Xml?

Jun 10, 2010

I have a "photo" gallery that loads numerous SWFs through xml, one by one on click. All works fine. All my SWF work fine stand alone. But when I load them into the player, many swf dont work properly.in example, I have textinput textfields in many of the swfs, which work fine on their own but not when loaded into the player. Then I have a word search game that works fine when alone, not when in player. I can see there is something as my mouse cursor changes into the "button finger", but nothing visual.

All drag and drop assigments work fine etc. I have no idea whats up. I have receantly switched to as3 and in as2 there was _lockroot declaration that solved similar problems, but now in as3 (where it supposedly should be automatic) it doesnt work. As it seems that it cannot recognise it own stage value, or selection_focus when loadedinside another swf through xml.Using cs4, as3.

View 4 Replies

ActionScript 3.0 :: Using New() On Loaded Swfs?

Aug 7, 2010

Usually when I want to create multiples instances of a same movieclip (that's already in the main .fla library) I use new mcClassName()but what if the clip is external, for example Ball.fla, Ball.as and Ball.swf? I've loaded Ball.swf into the main .fla and I don't know what to do now

View 4 Replies

ActionScript 3.0 :: Loading Multiple .swfs Into Multiple .swfs?

Aug 13, 2010

I am loading multiple .swfs into multiple .swfs, but the .swf are never being properly unloaded. I thought they were unloading until I started monitoring my Page File Usage and seeing it increase everytime I loaded another external swf.
 
In using this function to load my content, what would be the proper way/function to unload the content?

[Code]...

View 2 Replies

ActionScript 1/2 :: Loaded Swfs Distorting?

May 5, 2009

I've made a simple portfolio web site which loads a swf file containing the navigation at the top and then the navigation loads individual swf files containing full page images.The problem is the full page images are distorting very slightly when they are loaded in. I've attached two images, the first image (picture2.png) is how looks when I just open the image's swf file, and the second image (picture3.png) is how it looks after its loaded in by the navigation.

View 2 Replies

ActionScript 3.0 :: Unloading Xml Loaded Swfs?

Sep 29, 2008

how to unload the swfs in as3 once you click a button to load a new one.

My file works great, with the exception of the videos playing over each other. slight bummer.

I have five buttons that each pull an external swf that is controlled by an xml file. If there were not sound it would not be an issue, but the sound overlaps if you click to the next link before the first video finishes playing.

I uploaded all the files here, including two test flv files. the files were too big to upload to the kirupa forum.

[URL]

View 3 Replies

ActionScript 2.0 :: Two SWFs Loaded - Possible To Control One With Another

Nov 22, 2009

I m loading 2 .swf in one flash file and want to control one with another. The first contain small animation and other has play and stop button. Now I want to control that animation with these 2 button.
Files details:
test1.swf: It has the animation
test2.swf: It has the 2 buttons
test3.swf: It is the main file, in which I m loading the 2 files i.e. test1.swf and test2.swf

View 1 Replies

ActionScript 3.0 :: Keep Menu On Top Of Loaded Swfs?

Jan 9, 2011

This may seem a stupid question but I just started learning AS3, Is it possible to keep my menu on top of externally loaded swfs? My menu is sitting on the main timeline as movieclip and the externally loaded swf overlap my main timeline completely completely covering my menu.[code]....

View 5 Replies

ActionScript 3.0 :: Scope Of Loaded SWFs

May 5, 2011

I recently changed the setup of my project from only having one SWF, to loading in my main SWF through a preloader. I'm facing a problem of scope. My old code for targeting things no longer works. This is it.

ActionScript Code:
if (this.parent.contains(Credits)) {
Credits.gotoAndPlay(120); CreditsText1.gotoAndPlay(120);
}

What would I change this code to in order to target the exact same spot in my loaded SWF? I should add that all my code is in an external .as file, which is set as the DocumentClass for the loaded SWF. I've tried both "this.parent.parent.contains" and "this.contains" Neither worked.

View 5 Replies

ActionScript 3.0 :: How To Keep A Menu On Top Of Loaded Swfs

Jan 8, 2011

Is it possible to keep my menu on top of externally loaded swfs? I believe it should be but I just cannot figure out how to do it. I have searched around and I believe I should use something like addChildAt but when I try to use it in the main menu actionscript my external swfs do not load anymore.. My menu is sitting on the main timeline as movieclip and the externally loaded swf overlap my main timeline completely completely covering my menu...

View 3 Replies

ActionScript 2.0 :: Possible To Controlling Loaded Swfs?

Apr 21, 2004

What I'm trying to do is create buttons in one swf that load another swf and also give instructions to begin playing from a certain frame in that swf. The target swf has a preloader on frame 1 and then a movie clip that contains a video in frame 2. Depending on which button the user presses the video will be cued up ready to play at different frames. think it may need an if statement ie if x=34 then goto frame 34, but I can't seem to pass the variables to the loaded swf.In the zip file is an example of what I'm trying to do.

View 10 Replies

ActionScript 3.0 :: Accessing Variables In Loaded SWFs

Oct 12, 2009

If I load an SWF file, is it possible for the pre-loader to access and change a string variable inside the loaded swf? Is there any special way to do this or would it be a simple case of loadedMC.variable = "new value"

View 3 Replies

ActionScript 3.0 :: Make Transitions Between Loaded Swfs?

Oct 13, 2009

I am trying to make transitions between loaded swfs. Below is my code. I know I need to add to one of the functions to make it play the "out" transition before the new swf is loaded. Each swf has a timeline with a stop frame and a frame labeled "out". The below script allows me to press buttons and load the coresponding swf to the stage.

Code:

package
{
import flash.display.MovieClip;
import flash.display.SimpleButton;

[code]....

View 21 Replies

ActionScript 3.0 :: Accessing Variables In Loaded SWFs?

Mar 16, 2011

If I load an SWF file, is it possible for the pre-loader to access and change a string variable inside the loaded swf? Is there any special way to do this or would it be a simple case of loadedMC.variable = "new value"

View 2 Replies

ActionScript 3.0 :: Loaded External Swfs With Transitions

Oct 26, 2009

I need help getting my loaded swf files to play the "out" transition before the next movie loads. I have a main swf with 5 buttons (movie clips) that load external swf onto the stage.[code]The loaded swf has a stop() an intro animation and on the last frame have.dispatchEvent(new Event("removeMe", true));

View 6 Replies

ActionScript 1/2 :: OnLoadInit - Go To Frame When All The SWFs Are Loaded?

Apr 28, 2010

This code is not functioning! How do I amend this code to go to frame 5 when all the SWFs are loaded?

[Code]...

View 2 Replies

AS3 :: Xml - Space Externally Loaded Swfs With Different Heights?

Feb 17, 2011

I'm loading in swf files into a holder swf and want to position each loaded swf underneath eachother with a 10px margin.

This is what I have so far, Its pulling in all the data correctly now just want to position the loaded swfs.

import flash.display.LoaderInfo;
var swfLoader:Loader;
var xml:XML;

[Code]....

View 1 Replies

ActionScript 3.0 :: Removing Unnecessary Loaded SWFs Already Seen?

Jan 28, 2009

I'm loading 31 SWFs in total. For example, the first one shows and it has a 'Next' button. When Next is clicked, then it loads the second SWF; and so on until reach a total of 31 SWFs.

No problem here, but thing is that while more SWFs I'm loading, heavier gets the file and little by little it's being taking longer to load. Because when I reach the 31 SWFs, I got a total of 31 childs loaded one after another.

I've been thinking in the posibility of removing the SWFs once they are no longer seen but can't find how to do it...

This is what I'm doing:

ActionScript Code:
import flash.events.MouseEvent;
import flash.display.Loader;
import flash.net.URLRequest;

[Code]....

It basically does this in every one of the 31 FLAs, so, as you can see, it goes loading and loading SWFs. Problem, as I said, while bigger the amount of SWFs loaded, slower the process gets. I'm using e.target.parent.addChild because all this is inside a MovieClip called mc.

How to remove the ones I'm no longer using?

View 4 Replies







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