Paths To External Files (jpg's) From A Swf

Jul 31, 2009

I'm loading external jpgs into a swf movie. This works fine from the swf. The problem is when I embed it in the html. File Structure that I want:

movie.html
FolderB>
ImageFolder>image.jpg
movie.swf  (path to the images is ImageFolder/image.jpg

When I run the movie.swf from within the directory, it runs fine. However, when I embed it in the movie.html it doesn't run. Question: Are paths from the swf relative to the PAGE that the swf is contained in vs the swf itself? Hope that makes sense.

View 5 Replies


Similar Posts:


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

ActionScript 3.0 :: Load Image Base On The Paths In XML Files Error?

Aug 3, 2010

I wan to write AS3 program that load image base on the paths in multi XML files (user choose which xml file they want by button), the first time it worked properly but in 2nd, 3rd... time, it have an error:

Code:
TypeError: Error #1010: A term is undefined and has no properties.
at Main/processXML()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()

[Code]....

View 1 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 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 3.0 :: Protect Files (make External Then Unopenable Such As .lib Files)

Jul 19, 2011

I'm working on making a pretty chunky game engine for games I plan on making, but I was wondering if you make external AS files unopenable such as .lib files, so that if I give it to a friend that wants to use it, he/she cannot change my code. Is there anyway to make external AS files unopenable? Also, obfuscation isn't an option for this problem as it only stops the people who hack the finished product, not stopping people who have access to the actual files.

View 2 Replies

ActionScript 2.0 :: External Text Files Wont Load Into External Swf File?

May 28, 2007

Structure: There is 1 main file that loads external SWF files depending on what is clicked on.One of the external SWF files loads its text from external text files. This works fine when viewing the SWF applet on its own. But when viewing as a whole site, the text doesnt appear. Very annoying.I made that particular SWF on my mums computer running Flash MX 2004The flash file itself uses the Scrollbar component from MX.Could someone tell me why the text doesnt load in this scenario? It runs fine on its own, just not as an external SWF.

View 4 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 1/2 :: External Class Files Not Updating When "Delete ASO Files" Executed?

May 3, 2009

I've got an external .as file in the same folder as my flash file. In the process of writing the code, whenever I make a change and then test the movie, the flash movie is obviously still looking at the OLD information. I tried using the "Delete ASO Files" on the menu, to no avail.I can' find these ASO files anywhere on mycomputer.Aha! I tried something else. I quit flash,restarted and ran the same script with no changes. It returned the data correctly, but then gave me this unpleasant message:256 levels of recursion were exceeded in one action list.This is probably an infinite loop.Further execution of actions has been disabled in this movie.There are no loops of any kind in the code, which is below.

//This is the Person.as file:
class Person { public var HomName:String = "unknown"; public var HomEmail:String = "unknown"; public var HomPhone:String = "unknown"; public var HomSaveFreq:Number = 0;

[code]......

View 27 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 3.0 :: Text Is Loaded From External Text Files And Styled With An External Css File?

Jun 7, 2009

I've managed to piece together a flash website with my limited as3 knowledge. The text is loaded from external text files and styled with an external css file.

It's working perfectly in Firefox and Explorer but it only works SOME of the time in Safari (on my mac).It's hit and miss. Sometimes it styles the text sometimes it doesn't.

[Code]...

View 1 Replies

Use Fonts In External SWF Files?

Nov 16, 2010

What I would like to do is a flex app, that uses fonts that are available in external swf.[code]...

View 1 Replies

ActionScript 3.0 :: Swf Using External Files?

Oct 11, 2009

Is it possible for flash to use external files? use images managed in a folder in a photo preview animation.

View 1 Replies

Actionscript 3.0 :: How To Use .as External Files

May 4, 2009

I downloaded a source of the dragging3d tutorial "dragging3d.as" .I want to use it edit it in some ways but i cant.I can only open it up with flash cs3.maybe edit it there.But than what?How to compile it? or what should i do to turn it into a stage , a .flv file?

View 2 Replies

ActionScript 2.0 :: When To Specify Paths And When Not To?

Mar 10, 2005

I'm new and need to understand when we should specify paths to a movie clip, button etc and when we don't need to specify paths?

Can someone enlighten me on this?

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

ActionScript 3.0 :: Link External .pdf Files?

Dec 5, 2009

I am trying to external .pdf files to my flash file. What I want to do is have the user click a button on a given topic and it opens the .pdf in Acrobat. I know that it can be do because I did it in Actionscript 2.0, I just need to know what the code is in Actionscript 3.0.

View 2 Replies

ActionScript 3.0 :: Link External .pdf Files

Jan 18, 2010

I am trying to external .pdf files to my flash file. What I want to do is have the user click a button on a given topic and it opens the .pdf in Acrobat. I know that it can be do because I did it in Actionscript 2.0, I just need to know what the code is in Actionscript 3.0.

View 5 Replies

AS3 :: CS4 Button Opening External Files?

Aug 31, 2010

I'm working on a Flash project (which will eventually be published as an .exe - not sure if that makes any difference) which has buttons which need to open up external files.The external file will vary in type (there will be at least one button each for .pdf, .exe and .swf).I've managed to get this from various online help things:


Code:
function f_testURLOpener()
{
var url:String = "BWorking.exe";
var request:URLRequest=new URLRequest(url);
navigateToURL(request);
}

I've tested it with about 5 different file types and it only seems to work if the url String begins with "http://". Even local htm/ html files don't open.

View 9 Replies

ActionScript 3.0 :: Updating External Files To The .swf

Jul 17, 2008

I have a .fla file which is pulling in a document class. Within that main class document many other classes are being called like the code attached. my question is when I make a change to a .as file such as XaMLDiplomat.as, and then republish the .fla, should those changes update to the .swf? I am not seeing the changes I made to the external .as file, so that is the reason for this post.

View 4 Replies

Load External Files From SWF Root?

Jan 14, 2010

I have been provided with some flash movies/apps to include in a web design that I am doing.  These flash movies load an external xml file.This is failing.The problem appears to be that when the flash movie goes to load the file using a relative directory path, it starts at the very root of the web directory, where the main jsp file is, instead of the where the .swf file is located.[url]...

View 1 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 3.0 :: Import My External Files?

Oct 6, 2010

I'm in the middle of coding a Flash CS5 file with AS 3.0, and a part of that code has me importing an external .as file I wrote. When published, the SWF works fine - but only when it's in the same directory as the external .as file I imported to begin with. Ideally, I'd like the published SWF to work independently without needing to be packaged with the .as file

View 1 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

Professional :: Using External Reference Png Files

Aug 23, 2011

I've been requested to create a flash project in which all images are external references.Images (mostly png) are created and can be modified anytime by artists, fla files and actionscript are created by developers. When opening a fla file, images should be automatically updated with the latest ones on the server and be visible in the fla file.Technical requirements are as follow : Actionscript 2.0 and Flash player 9 max.I tried to use the Loader component, it seems to be what I want (with Autoload function enabled), but unfortunately ActionScript 2.0 component doesn't allow png files, and doesn't work anymore when embedded inside a movieclip or a button (image became totally invisible).A simpler solution should be to automatically run the "Update" button on every image in the library but I don't think Flash to be able to do such a thing.

View 1 Replies

ActionScript 3.0 :: Resize External Swf Files?

Nov 21, 2011

Tha following code is for resizing the Movie Clips which are on Stage. But how can I resize the external .SWF files? I am laoding an external .swf file through Gallery_mc.addChild(loader)[code]...

View 1 Replies

AS3 :: Packaging External Files Into One Stand-alone.swf ?

Jun 13, 2011

I've created a very large scale Flash game and have apparently had a massive oversight - the flash portal websites wishing to host my game need it in one stand alone .swf. However, the problem is I load everything externally. I load the level data from .plist files, the images from .png and the sound from .wav, all located in folders in the .swf directory. They're loaded through Loader's and URLRequest.

Is there any way I can embed these so it will run as a stand alone? Preferably an easier way than individually writing embed lines, as there are 1000s of files.

View 1 Replies







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