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
Similar Posts:
Oct 26, 2010
I try to make an intro animation inside a website, and when the animation is done or when you push the Skip button, it navigates to the index.html file from the site root.So I have in my site root the folder Flash, where the intro.swf is, and within the intro.swf I called the navigateToURL(new URLRequest("..index.html"), "_self"); method. Now it's not working.
View 3 Replies
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Jun 7, 2010
In services-config.xml we got following configuration of endPoint.
<channel-definition id="any-amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
</channel-definition>
Before compiling flash application i set up context-root as compilaction option.
binmxmlc -context-root / -services "flex/services-config.xml" -optimize=true -o ....inMessenger.swf Messenger.as
In my case this is "/"
And the problem is that messanger.swf is able to pull request if the web application is started as ROOT in tomcat webapps. I mean it can only be access by this url localhost:8080/. If i try to move webaplication to another folder - for example to localhost:8080/myApplication messenger.swf would not work properly sinse i have to change root_context as well.
So my question how to dinamicly determine context-root in run time, without hardcode it as option of compiler ? I want my .war application work properly regardless of it position in webapps folder(url).
View 2 Replies
Feb 1, 2010
In AS3, how can you access a relative variable within a specific movieclip on the stage?I have a test file that changes the variable "myVar" in one of the displayobject movieclips drawn on the stage. I want to simply trace the current value of this displayobject's myVar for additional purposes.In AS2, you would achieve this by calling the instance name and then the variable contained within.Assuming 3 movieclips existed on the stage named Container1¯, Container2¯ and Cotainer3¯trace(_root.myContainer2.myVar);// returns Hello which is value of variable "myVar" within the movieclip instance named "Container2".How would you do this in AS3?[code]
View 6 Replies
Nov 9, 2011
This is a head scratcher. Why would a root relative path cause a Security Sandbox error.. but an absolute path to the exact same path work fine..
[Code]...
View 0 Replies
Apr 29, 2010
when I first created my website I defined it in a random folder of my own choosing. Now, many months of construction later I want add some php related stuff and have to setup a proper local testing server.
I therefore have to move the whole thing to an htpdocs subfolder in MAMP - how can I do this so all links and filepaths etc are updated?
View 1 Replies
Oct 25, 2009
I have a document class called Racine in which I add all the resize events so that the stage takes all the available screen. extract of Racine class :
[Code]...
As a standalone site, it is ok, but now, I want to make a preloader, and I am wondering what is the simplest way to achieve that by making less modification as possible in my Racine class? Suppose I create a swf called loader.swf loading my site, site.swf, is it possible to have a document root also for loader.swf?
View 1 Replies
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
Mar 25, 2011
No matter how much I look, I can't find that option anywhere in Flash. The manual doesn't say either.
View 4 Replies
Jul 23, 2009
On this page are listed Source, Library, and External Library lists. I am working on a large flash project with hundreds of files. It appears that CS4 caches a copy of my fla's similarily named folders here, EVERY time I publish my files. These lists are now hundreds and hundreds of items long. I want to clear these lists, but the only option I can find is the minus sign.
Is there a way to wipe these lists clean, or, does anyone know an external xml file or such (i have serached), where this data is stored so I can manually remove it.
View 1 Replies
Sep 24, 2011
When I draw a path with the pen tool, and fill it, it seems as if the shape now has two parts. If I drag the filled area around, it's breaking apart from the path (or border). So how can I make this one entity?
View 3 Replies
Dec 14, 2010
A client of mine has had 2 sites (both Flash sites) attacked over the last 12 months, so he's been asking: should he go for a static HTML site or stick with a Flash site? Is there ways to make a Flash site more secure?
View 1 Replies
Mar 14, 2011
I'm finishing up a flash template that I have used on numerous occasions and it has worked really well. This time however, the nav button that is used to bring up html pages within my site got out of whack. I have checked (and changed) the flash/menu_v8.swf?button=3 relative to the index page I'm trying to link to, but to no avail. I have also gone into Flash and can change the h-link of the TEXT on the button to the corresponding page, but it makes no changes whatsoever.
View 3 Replies
Aug 25, 2011
I am adding MovieClips in columns and rows according to the main container with static width and heightnow if user wants to enter for more rows and columnsHow I should change the Moviclips size that can adjust within main container ( Blue Box as in image )Image 1 : I am adding small white movieClips with default width and heightImage 2 : its required , small movieClips resized according to main container, when Rows and Cloumns are increased
View 4 Replies
Mar 9, 2010
I tried to set the .swf width to a percentage value but no matter what I use for the height, I get ugly whitespace above and under the applet.
Video demo: [URL]
Is there a way to get away with the unnecessary vertical margins?
The webpage is [URL]
View 6 Replies
Mar 1, 2011
I'm developing my first flash app. I'm trying to use classes because they'll be very important in my future app. I created a simple movieclip with a star. However, instead of putting it directly on the stage, I'm calling it from library, using the addChild method to place the star in the stage. To do that, I simple right click over the movieclip icon->properties->check export to action script->and I give a name to the class (for example: myMC)
Then, inside the class I wrote:
package {
import flash.display.*;
import flash.events.*;
public class myMC extends MovieClip {
var star:myMC=new myMC();
public function myMC() {
[Code] .....
As I am placing the two variables origin_x and origin_y inside the constructor, I'm expecting to get 250 and 200 respectively. After drop the star, I want to send it to it's original place, and that's why I need to keep this values. And here's the problem, origin_x and origin_y are both ZERO, instead of 250 and 200... The value is not relative to stage. I managed a little bit and I found this post : [URL]. Unfortunately I tried to replace by the suggested code, but both values remain zero. An interesting thing, is that if I put the star directly in the stage instead of calling it from the library as I am doing, I get correct values in origin_x and origin_y.
View 1 Replies