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


Similar Posts:


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

Actionscript 3.0 :: Relative Paths Of A Child Swf?

Mar 19, 2010

I have two swfs, index.swf and history.swf. History.swf loads and xml file and some images using a relative path. This swf works fine on it's own.When I load history.swf from within index.swf to display it on stage, I get an error saying "TypeError: Error #1009: Cannot access a property or method of a null object reference. at History()"

I ran a test loading a basic test.swf (just text on stage) from within index.swf and it works fine.I am guessing that maybe once the history.swf is loaded into index.swf, the relative paths within history.swf are failing.

View 2 Replies

Professional :: Projector In Linux And Relative Paths

May 17, 2007

I create a projector for Linux by executing a swf file in flash player and chosing "create projector" from the file menu. The initial swf loads external resources (using MovieClip Loader.loadClip for example). In the swf this works fine but in the projector this fails. The projector seems to always execute in the users home directory no matter where it is in the file system, thus to find the external resources the path should be relevant to the users home directory. The problem i now have is that my application will be packaged and distributed on a cd rom. At development time i have no idea of the path to where the cd-rom will be mounted in the end users machine.For what motive does the projector execute in the users home directory and not in its real location?

View 1 Replies

Automatic Absolute To Relative Paths Conversion?

Jul 15, 2009

I have a bunch of Flash (.fla) files where I need to convert all absolute (root) target paths in timeline scripts to relevant relative ones. Doing it manually in Flash CS4 is very tedious work and using "replace" action is tedious too as there are multiple nested timelines. Is there any way to automate this task?

View 4 Replies

Professional :: Use Site Root Relative Paths?

Mar 10, 2010

I am developing a Flash application where I load some images. The image paths are contained in an xml file that is read from the application .Up to now, I am using relative paths in the xml file. My question is if I can use site root relative paths?Let's say the site's directory is sth like below
 
- root
     - /images
          - /image1.jpg[code]....

I know I can use absolute paths but I prefer to use site root relative paths if that is possible.

View 4 Replies

Professional :: Use Relative Paths With The GetURL Command?

Jan 3, 2012

is it possible to use relative paths e.g. ../website/home.html rather than [URL] with the getURL command?

View 1 Replies

ActionScript 3.0 :: How To Get SWF Files To Follow Relative Paths

Nov 19, 2010

So I got this Flash project of mine. It imports dynamically other flash files that can be found at other places (on the same domain). And those other flash files load XML files using relative paths. The problem is: when I just load one of those other flash files, then they treat their relative paths from the location of the flash file that loaded them on, and not from their own directory on. Is there any way I can simply tell the loaded swf file to keep following it's relative path orders from it's own directory on, and not from the directory of the file that imported it on?

Or are there really just two ways to fix this:
- place the xml files at the location the loaded swf files expect them to be (though this would get quite messy)
- change the ways all the loaded swf files import their xml stuff (this would take quite a long time)

Example:
I got a file "peter.swf" in it's folder "project_peter".
Location: "project_peter/peter.swf"

I also got another swf file, called "basket" (for example).
Location: "project_peter/importedstuff/basket/basket.swf"

And basked would want to load an xml file.
Location: "xml_files/basket_config.xml"

So the true location of the xml file would be:
"project_peter/importedstuff/xml_files/basket_config.xml"

However, the basket file would try to load:
"project_peter/xml_files/basket_config.xml"

View 1 Replies

Professional :: Creating Projectors In Linux And Relative Paths

Apr 17, 2007

I'm having some problems when creating a projector of my movie. The movie dynamically loads other resources using the class MovieClipLoader. In a swf running in the standalone player the path to these resources is relative to the path of the swf. However when I create a projector from the shockwave the path to these resources is absolute and one directory higher than the real path.

For example.

1) I have a main.swf and resource.swf in the same folder /home/myuser
2) main.swf loads resource.swf with the line of actionscript
myMovieClipLoader.LoadClip("resource.swf", someClip);
3) I open the swf in standalone flash player and everything works fine.
4) I create a projector mainProjector and save it in the same directory.
5) The projector cannot find resource.swf unless i put it one folder up in /home in which case all works correctly.
6) I also note that I am able to move mainProjector anywhere in my system since it would seem to always execute in /home regardless of where i move it from which I deduce that the absolute path /home is saved in the projector. This would make it impossible to distribute the projector in a CD-ROM.

View 1 Replies

ActionScript 3.0 :: Are The Import Declarations Paths Relative To The Swf That Load

Oct 15, 2009

I have two Gallery classes (in two separate folders) that extend GalleryMaster (which resides in the folder above them). How do I specify this in the import ... declaration?Are the import declarations paths relative to the swf that you load?

View 4 Replies

IDE :: Relative Paths In Publish Settings / Formats / Flash?

Jan 25, 2010

Is it possible to publish to a relative path in the CS3 IDE? For example, I have my folders set up in the standard bin, src, lib configuration where the .fla is in the src folder and I want to publish to .swf to the bin folder. I've tried the obvious'.. /bin/ nsomeswf .swf' but this doesn't work.

View 1 Replies

ActionScript 2.0 :: CS3 Relative Paths - Can't Seem To Make Movie2.swf Communicate With Movie3.swf

Mar 22, 2009

My situation is this I have 4 movies which load each other, meaning: movie1.swf loads movie2.swf which loads movie3.swf which loads movie4.swf movie3.swf communicates with movie2.swf though the _parent path and it works. but i can't seem to make movie2.swf communicate with movie3.swf since movie2 is _parent i assumed movie3 is a _child...but it does not work so my question is what do i replace _child with?

PHP Code: _child.mc.gotoAndStop("subM" + no); ps: would apreciate it if u could tell me a bit about levels ex: _level10/_level0 what do they mean and how can i tell on what level i have something

View 1 Replies

Flash Builder 4 :: Using Relative Paths With The -output (-o) Compiler Argument?

May 2, 2010

I'm trying to use a relative path in the -output compiler argument, here's what I've tried (with and without quotes):

-o="./deploy/file.swf"
-o="/./deploy/file.swf"
-o="./file.swf"

[code].....

View 1 Replies

Actionscript 3 :: Create Relative Paths To Swcs In Module Dependencies For Flex?

Dec 6, 2010

Can someone tell me if its possible to create relative as opposed to absolute paths to swcs in module dependencies for Flex or actionscript modules?In Flex Builder i would simply edit the swc path as'../lib/.swc..But there doesn't seem to be a way to edit the path in IntelliJ once you've defined it.

View 1 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 2.0 :: Make A Loader For A Swf That Has Already Been Opened?

Jan 25, 2004

Is there a way to make a loader for a swf that has already been opened but has a:

on (release) {
loadMovie('movie.swf', 2);
}
on a button?

see, the 'movie.swf' file is rather large in this case, and I don't want the person to think something is wrong. Also, ANOTHER problem is that the movie.swf file was created from an imbeded .fla that no longer exists. So it's stuck just being the movie that it is. I also can't import it to another .fla b/c it just shows up as blank keyframes.

View 1 Replies

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

ActionScript 3.0 :: When Loader.swf Loads The RSL And The Other 10 Swfs The Loader Throws Errors?

Aug 12, 2009

i have a main loader swf file called loader.swf and it loads an RSL.swf (runtime shared library for my swf files) and then 10 swf files, each one to a container (fE.: movieclip '01' in loader.swf, then movieclip '02' and so on). the 10 swf files have a lot of references to RSL.swf, and i have to use RSL.the problem is when loader.swf loads the RSL and the other 10 swfs the loader throws errors like this:

Code:
*** Security Sandbox Violation ***[code]...

then i put in EVERY swf files (loader,RSL and the other 10) the code Security.allowDomain ("*") but throws the same errors...

View 1 Replies

ActionScript 2.0 :: Load Swfs Relative To The Time?

Aug 23, 2005

I'm making a site in flash and I wanted to add something to it. The site consists of a main swf that loads external swfs into blank movie clips when you click a button. The thing is, I want it to load swfs relative to the time. I have a clock in a movie clip and I want a 'day' swf file to load when the time is within a specific time frame. Then I want it to load a 'night' swf file if the time is anything beyond that. how would I go about doing this?

View 1 Replies

ActionScript 3.0 :: Load External SWFs, AddChild(Loader) Versus AddChild(Loader.content), Etc?

Jul 29, 2009

I have a main "shell" swf which, by clicking several buttons, will load/unload various external swfs into a Placeholder_mc which resides on the main timeline in Shell.swf In the documentation and tutorials I've seen a couple different methods, and I'm not sure I quite understand the difference, or at least the reason you would use one over the other...In the 1st method, you can just add the Loader object using the addChild() method:

Code:

var myLoader:Loader = new Loader();
var myURLRequest:URLRequest = new URLRequest("ExternalFileA.swf");
myLoader.load(myURLRequest);
Placeholder_mc.addChild(myLoader);

This will apparently add myLoader to the display list once it has completely loaded.The 2nd method, you supposedly can add the Loader.content; however, it appears you can only do this once the content has completed loading, so you need to incorporate an event handler with the contentLoaderInfo object:

Code:

var myLoader:Loader = new Loader();
var myURLRequest:URLRequest = new URLRequest("ExternalFileA.swf");
myLoader.load(myURLRequest);

[code]....

What are the pros/cons of adding the entire Loader object, as opposed to the Loader.content and vice versa?

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 :: Add And Remove Swfs With UI Loader?

Nov 9, 2009

I have a flash file with frame labels, home, profile, contact.it also has 4 separate photogalleries, gal1, gal2, gal3, gal4 also in frame labels. the galleries are all separate swf files. I used the UI loader and added gal1.swf and 3 more separate loaders for the rest of the galleries. What happens is after you select the first gallery the mouse becomes invisible because the loader is still on the stage. How do I remove the loader from the stage each time I use a button?

View 3 Replies

ActionScript 3.0 :: Replacing Swfs In Loader?

Jun 24, 2009

Im moving up from as2 and want to use buttons as shown in the code below. How do I empty holding container though eg "holder1" in this case.Here is Code:

import fl.transitions.Tween;
import fl.transitions.easing.*;
surr_mc.addEventListener(MouseEvent.CLICK, slideshow);

[code]....

View 0 Replies

ActionScript 3.0 :: Reload Loader With Different Swfs

Aug 14, 2009

I am having issues with this code, and I really cant figure out why. I am building a portfolio gallery, with one loader who loads 5 different .swf which load XML files. Everything work, but once I unloaded it to reload it, it says that its loaded but I dont see anything anymore... I probably tried a 1000 versions, but here is my latest code: Load the first gallery

[Code]....

View 0 Replies

ActionScript 3.0 :: Loader Won't ConstructChildren() On Some SWFs?

Oct 7, 2009

I'm getting this sort of error while trying to load SWF's inside another swf (using the Loader)

ReferenceError: Error #1056: Cannot create property stageTitleLabel on Main.
at flash.display::Sprite/flash.display:Sprite::constructChildren()
at flash.display::Sprite$iinit()
at Main$iinit()

I've kinda tracked down the issue to not having "Declare Stage Instances Automatically" checked, as I am declaring the stage instances in the code, so that the code will compile in Flash Develop as well as the IDE (i.e. in the flex compilor as wel as the IDE)

[Code]...

View 3 Replies

Actionscript 3.0 :: Pre Loader For External Swfs?

Aug 23, 2010

I am using the below code to load in external swfs. I normally put the preloader in the external swf but that does not work with this code. I therefore need to put the preloader in this swf. All the preloader need to be is the numbers (1-100).

Code: Select all/
/EXTERNAL SWF LOADER
var loader:Loader= new Loader();

[code].....

View 3 Replies

IDE :: Positioning Loader, XML, Swfs, Gallery?

May 20, 2009

This is driving me crazy. When I preview in Flash, everything looks fine. When I preview in HTML. Not so much. I've created a gallery using xml and have the code centering (and otherwise positioning) each new loaded item by referencing each ones information.

It seems to have trouble doing this with the first swf and positioning it at 0,0 after I click through the forward/back buttons that swf moves to a different location on the stage. My guess is that the loader height and width get calculated as 0,0 before the image gets loaded, and then screws everything up from there.

import fl.transitions.*;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.display.LoaderInfo;

[code]....

View 3 Replies

ActionScript 3.0 :: Using The Loader To Load Swfs In Different Levels

Jul 24, 2010

as you can see it loads an new swf on top of my main. I did not relaize that because of a dropdown menu in the main.swf evrytime I load another swf on top ie obscures the dropdown. besides putting the dropdown in each swf and removing it from the main which would be the obvious, I wanted to avoid this as the loded swfs will have slideshow pro videos which will be a bit heavy.

[Code]...

View 4 Replies

ActionScript 2.0 :: Mc Loader And Swfs Loading And Position?

Oct 4, 2006

Here is the thing : on rollover on thumbnails ( buttons)its preview has to appear on the top of it.My corrected code works fine exepted that my swf don't load in a good way..they load at 60 kms from the thumbnail...and in a distorted size!I don't get it.I turn the thing in all ways but it is getting worth...What is my mistake?Code for each button ( thumb)

on (rollOver) {
_root.caption._visible = 1;
_root.caption.image_mc.loadMovie("images.swf");

[code].....

View 1 Replies

ActionScript 3.0 :: Loader Class - Best Solution For Communication Between SWFs?

Mar 18, 2009

I want to ' import ' or ' download ' some SWF file into my main-swf file. I then want them to do a lot of communication back and forth. The best would be if I could just call functions from the new SWF file from my main-swf file, or the other way around. Do I use the loader class? And do I use the .parent.parent thing? Or is there a better solution?

View 3 Replies







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