Actionscript 3 :: Pass A Base Path To A Swf Loaded At Runtime?

Nov 11, 2010

I have a main.swf which loads a module.swf and the module.swf loads some assets.The module.swf works standalone and also needs to work when loaded by main.swf.But unfortunately the module.swf can't find the assets when loaded by main.swf because the assets aren't located relative to the main.swf, but are located relative to the module.swf.As I can't touch the module.swf and I'm also unwilling to change the directory structure, I am looking for a solution close to the a "base" parameter which can be used when a swf is embedded into html

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Set The Base Class Of A Library Asset At Runtime?

Mar 27, 2009

I'd like to set the base class of a library asset at runtime,rather than specifying it before. Is this possible? I'd like it to just extend movieClip, but at runtime change that to extend a custom class.

View 1 Replies

ActionScript 2.0 :: Dynamically Changing Base Folder Of App At Runtime?

Nov 17, 2010

I have a flash file in folder "/" which loads another flash file in folder "/xyz/". The second flash file will load several resource files on its own. Now flash is looking for the resource files at the base folder "/" and instead of the other loaded flash's folder "/xyz/". The second loaded flash file is provided by a third party and can't be modified. Is there any way to dynamically change the base folder of the "application" at run-time? I've heard about the html swf tag "BASE" so I've tried loading the second flash file with a ".....?BASE=/xyz/" but it doesn't work.

View 0 Replies

ActionScript 3.0 :: Finding A Flash Library Object's Base Class At Runtime?

Feb 9, 2009

determine the base class of a Flash library object at runtime, using Actionscript? The toString method gives me the class of the object, but what I'd really like to determine is the superclass of the object. So, if I have an Actionscript class called "Fruit" and I created many different Fruit types in the Flash library ("Cherry", "Apple", etc.), is there a way in code I can determine that an "Apple" is a child of "Fruit"?

View 2 Replies

Actionscript 3 :: Override Base Path Parameter Inside Flex Application?

Jan 19, 2010

When using as3 and embed my swf via swf object JS, one of the parameters that being transferred to the embed JS function is "base=http://www.mydomain.com" which needed in order to load external widget into application.

Now, am also loading external assets like Styles.swf that placed locally on client side, and when I'm trying to load these assets I get error that they don't found in [URL]

For example: StyleManager.loadStyleDeclarations("Styles.swf");

Error: can't load [URL]

Is it possible somehow to load Styles.swf as local assets??? I've tried use

StyleManager.loadStyleDeclarations("../Styles.swf");
StyleManager.loadStyleDeclarations("./Styles.swf");
StyleManager.loadStyleDeclarations("/Styles.swf");

View 1 Replies

ActionScript 3.0 :: Path Resolving In Conjunction With BASE Embed Param And NetStream.play()?

Sep 11, 2011

"When  using progressive download (FLV), NetStream's .play(url) method is  not  resolving relative URLs in the expected way. Instead of being based   off the HTML's embed location and reading the "base" param, it uses the   location of the SWF file trying to load it." I have found  it on the web while searching for a solution to exactly the same  problem. Unfortunately no one provided an answer. If it is a bug it is  in fp ever since and no one has done anything with it. Does anybody know  any solution/workaround? I assume it is not possible to read base param  value from inside of the swf in order to resolve paths manually?

View 6 Replies

ActionScript 3.0 :: Pass Variables To Base Class Constructor

Sep 8, 2009

I have a bunch of movieclips( clip A and B for this example) in my library that I want to use the same base class (MyClass.as in my example). I assigned the same base class in each clips property window and then gave each clip a unique class name which doesn't exist so flash says it will create the class automatically.

Now if I create a bunch of A's and B's on the stage via actionscript, how would I send variables to the constructor in MyClass.as without having to creating A.as and B.as to pass the variables along to the base class? if I do: Var newA:MovieClip = new A (argument 1, argument2, etc) It says it expects 0 args since the A & B classes were created automatically by flash.

View 9 Replies

ActionScript 1/2 :: Communicating Between Loaded And Base SWF

Oct 12, 2009

I have a base SWF, and I am loading a another SWF into a movieClip array. I need to communicate from the loaded SWF to the base SWF I tried _root but think this only goes to the root of the loaded movieClip? This is what I tried:
on (release) {
_root.moveContent(2);
}

View 3 Replies

Flex :: Build Error - Runtime-shared-library-path?

Jan 4, 2012

I recently switched a Flex project over to using RSLs. It built fine for quite a while but has recently dug its heels in and is giving me this error:configuration variable 'runtime-shared-library-path' requires a value for 'rsl-url'I went through all the flex XML files I could find and either this value doesn't exist or there are entries available for it. Nowhere did I see a <rs-url></rs-url> with no value.

View 1 Replies

ActionScript 3.0 :: Get And Pass Data From PHP To SWF At Runtime?

Jul 11, 2009

Is there a way to pass data from a PHP script to an SWF at run-time without first writing the data to a file (through PHP) and then making your SWF read that file?

View 5 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 :: Pass A Variable Into A MC Added At Runtime?

Aug 8, 2009

Id like to be able to pass variables into a moviclip added at runtime as so:

var myText:String = ("My Text");
var myMC:MovieClip = new MyMC(myText);
// (MyMC from Library with 'Export for Actionscript enabled)
addChild(myMC);

I know I can just pass the bit in as

myMC.myTextField.text = ("My Text");

but I'd like to be able to pass a bunch of bits in at once, and create multiples...

View 2 Replies

ActionScript 2.0 :: Change Base Of Loaded Movie Urls?

Feb 25, 2010

I have a swf file named "intro.swf" and i have loaded another swf file with this path "En/main.swf" into it. And the file "main.swf" should load many xml and other files from its directory "En" , but when "main.swf" loads in "Into.swf" it can not load any of those xml and other files ,because the related urls of them begines from "Intro.swf" location. can i use any command in "main.swf" to change the base of all paths in this movie to upper diectory ? (for example i want to convert the path of "config.xml" to "En/config.xml" automatically).

View 0 Replies

ActionScript 3.0 :: Preventing Loaded Swf From Calling Base Class?

Apr 13, 2011

Is it possible to restrain a loaded swf from having access to certain base classes, like i don't know, flash.utils.Timer ?

View 5 Replies

Data Integration :: How To Pass In Dynamic URL Path For Property

Oct 8, 2006

Shouldn't it be possible to pass in a dynamic url path for this property? I am successfully loading a variable using loadVars and then attempting to use that variable to populate the xmlConnector.URL property but it does not seem to work. Do you have to hardcode a url for this property?

View 1 Replies

ActionScript 3.0 :: Pass A XML Element Path In As A Parameter Of A Class?

Dec 28, 2010

I am creating a class to handle some audio in an app I am building. This class will need to accept the XML element path as a passed parameter and or a getter.

examples of some XML elements I would like to pass to the the audio handler class to access them.

Dialog.introScreen.text

or

Dialog.secondScreen.main.text

ect.

I pretty sure this is not a string data type and thus cannot be passed as a string (I could be wrong though), if not, what data type would I pass it as?

View 7 Replies

ActionScript 2.0 :: Pass XML File Path To Flash Via HTML URL

Oct 4, 2009

Our art gallery project has a list of several artists.Each artist links to a SWF gallery that will showcase their work.The SWF gallery opens in a popup window.We want to use XML files unique to each artist to call the content for the SWF.This will allow us to have one popup, calling the same SWF for all the artists.This means that the HTML link for each artist needs to pass the XML path for that artist to the SWF as a variable.We are using swobject to embed the SWF in the popup window.

View 9 Replies

ActionScript :: Use FlashVars To Pass A FLV Path From Html A FLVPlayback Instance

May 27, 2009

I'm trying to use FlashVars to pass a FLV path from html a FLVPlayback instance. I get how this is supposed to work, but I can't find any good documentation on the needed ActionScript. The closest thing I could find was a discussion about a script that looked something like this:

[Code]...

View 4 Replies

ActionScript 3.0 :: Pass FlashVars Into Public Class / Assign String As Path To XML?

May 29, 2010

I am trying to pass FlashVars into public class EventDispatcher to set the path to data.xml. I need it because the name and path of the xml file will be dynamically created. I need to use Flashvar in order to access the correct path. I was able to pass Flashvar from html page on timeline this way:

PHP Code:
var Flashvars:String = LoaderInfo(stage.loaderInfo).parameters.xmlfile;
Then, I was able to use it for new UrlRequest;
PHP Code:
var request:URLRequest = new URLRequest(Flashvars);

This method works really good, but this solution only works on timeline. I need to implement this technique in the class. Before I setup a static var for with the path to xml file. I'd like to be able to get FlashVar withing this class and assign this string to 'public static var DATA_XML_URL:String' I have there. This way I can pass Flashvar to the project I already have.

Below is the class where I can implement it:
PHP Code:
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.display.Sprite;
import flash.display.LoaderInfo;
import flash.display.MovieClip;
[Code] ......

View 3 Replies

Flex :: Adding Runtime-library-path To Flex Build Configuration Using Ant Mxmlc Task

Feb 9, 2011

I'm trying to build a flex project, linking it to some RLSs. When setting up the project in Flex Builder, the corresponding "build configuration" (that I got by adding -dump-config to the compiler options) generates (among other things) a tag like this :

<runtime-shared-libraries>
<url>some-lib.swf</url>
<url>some-other-lib.swf</url>

[Code]....

View 2 Replies

Actionscript 3 :: Convert From Base 60 To Base 10?

Jul 29, 2010

I have a method that converts an int to a base60 string (using 0-9, a-z, and A-Z chars), but can't work out how to convert it back again. Here is my method for converting base10 to base60:

public static function toBase60(value:Number):String
{
var targetBase:uint = 60;

[Code]....

Works well. But how do I get the base60 string back into a base10 int?

View 4 Replies

ActionScript 2.0 :: Convert From Base 10 To 16 And Then Base 16 To 36.?

May 17, 2007

Its been a while since i touched flash, which is funny considering i started my web/development career here.Anyway, in PHP there is a nice little function called base_convert (http:url....) which will take any number in any base (e.g. base 10, decimal) and convert it to any base (e.g. base 16, hex).So base_convert (15, 10, 16) will output F, which is convenient.I am wondering, as i cannot seem to find, if there is any similar function in actionscript. I am trying to convert from base 10 to 16 and then base 16 to 36.

View 3 Replies

ActionScript 2.0 :: Swf Is Loaded Into Another Swf At Runtime?

Jul 18, 2006

I have a question about movie clips and levels. I have a small contact form. Everything is working fine. The client wants to add more content so I need to make the whole SWF scrollable. My first instint is to just make the entire swf an MC and then add the ScollPane. My problem is that once I make the various input elements into an MC they stop working. I figure this has something to do with levels. I am afraid to play around with _root too much as this swf is loaded into another swf at runtime.This is just a little chunk pulled out form the code. contact_us is the name of the stage MC.

[AS]
for( var elem in inputs) {
contact_us.inputs[elem].border = true;[code].....

View 2 Replies

ActionScript 2.0 :: Communicat With SWF Loaded At Runtime?

Nov 21, 2010

I've a file named, Load.SWF in which I am loading RFC.SWF on first frame with following code... container_MC.loadMovie("RFC.swf");Simple code. 'container_MC' is a movieClip instance on the stage in Load.SWF. The file RFC.SWF contains 4 frames with a stop() action on 1st Frame. Now I want to create a button in my Load.SWF file to send the RFC's playback to frame 3, but I am unable to do this. I am using the following script on a button in Load.SWF, but its not working... on (press) {
container_MC.RFC.gotoAndStop(3) }

I am working with a AS2 file in Flash CS3.

View 1 Replies

ActionScript 3.0 :: Get Path Of Loaded Images Via XML?

Feb 1, 2010

I having an issue getting the path of an image loaded into my scroll bar. I am using XML.When I click on an image all I get is the instance name. Like instance31 or instance 32 and so on. I can't seem to find away to get the actual image name or trace the path in my click event. Maybe my approach isn't the best or correct. Can someone explain how I can get the information I want

View 11 Replies

Flash - Class In Loaded SWF Cannot Use Base Class In Loading SWF

Sep 17, 2010

I have two SWF files which I shall call container and slave. The slave file contains a movieclip that extends from a class I shall call base. base extends MovieClip and is compiled into an SWC. slave includes this SWC as a runtime library, while container includes it as merged (and does reference it so it should be compiled into the container SWF).

The container loads the slave like so:

bgURLRequest = new URLRequest(slaveUrl);
var context:LoaderContext = new LoaderContext(false, new ApplicationDomain( null ), SecurityDomain.currentDomain);
bgLoader.load(bgURLRequest, context);

When this loading happens, I get the error that class base was not found. I suspect this has something to do with the presence of the ApplicationDomain in there. I'm not sure what it does exactly, since I didn't write this loading code myself (but I do know that it's there for a reason so it can't be simply removed).

View 2 Replies

ActionScript 2.0 :: F8 Use Loaded Text Data On Runtime?

Feb 17, 2009

I have just started with creating Drawing Pad, which can save and reload the image drawn once. I have completed the basic interface which includes drawing and erasing part. I am storing the co-ordinates in a text file. I am using MultiDimensional Array to store X,Y co-ordinates. But now I am facing a problem that how to load these variables into the flash back and using these redraw the image. I tried using 'loadvars', but it didn't helped me as it doesn't return string data. Can somebody help me in this so that I can load co-ordinates from text file and redraw the image.

View 4 Replies

Actionscript 3 :: Calling Function In A Runtime Loaded Swf?

Dec 11, 2010

My problem specifically I am designing a user interface with controls on it. 5 buttons rotate left, rotate right, zoom in, zoom out, and auto rotate. The interface in itself works fine, I can trace out button clicks, toggle the auto rotate button etc...

My program reads an xml file. Loads some images, fills an array with links for each image, and when the image is clicked a loader loads a swf from a URL and displays it on screen. No problem.

Now I originally had the zoom controls user interface in the runtime_loaded.fla library, and the mouse listeners in the same linked document class. The interface works with the movieClip in runtime_loaded.swf when it is in the same code.

[Code]...

View 1 Replies

ActionScript 3.0 :: Relative Path In Externally Loaded SWF?

Oct 14, 2009

I have a flash movie (let's call it B.swf) that loads an XML file which is located in the same directory to provide some data. This flash movie works fine itself. Now, I've made another flash movie, a main movie (let's call it A.swf), which loads different SWF's in turn, including the aforementioned one B.swf (which now would be located along with the XML file in a subdirectory).

To my surprise, I've checked that now I get an error, as the path I specified for the XML file in B.swf is not valid anymore when B.swf is loaded from A.swf. The relative path from which it's searching for the file is the directory where A.swf is located, not the one where B.swf is located, as happened when this movie was executed standalone.

Is there any way to fix this so that I don't have to change the path I specified in the code and I can use B.swf either way externally loaded or standalone?

View 8 Replies

ActionScript 3.0 :: Relative Path Loading In Loaded Swf

Mar 7, 2010

Code:
/
|-main.swf
|-game
|-game.swf
|-assets
|-a.jpg

let's say I have a file structure like above, I have game.swf loads resource by relative path like "assets/a.jpg". It runs fine on its own. But when I try to load game.swf from main.swf (using relative path again "game/game.swf") it tries to find a.jpg from "/assets/a.jpg" instead of "/game/assets/a.jpg"

View 2 Replies







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