AIR load swf cash problem
hi folks
I am building android app.
I have a problem with loading several .swfs cache. this swf-s have almost same package and class structure/ names.
App stores ActionScript and assets of first loaded swf and when i try to load second swf, anyway it loads first swf.
I used
request.cacheResponse = false;
request.useCache = false;
loader.unload();
loader.unloadAndStop();
loader = null;
but no luck, any solutions, suggestions?
thanks
I solved problem, swfs that I loading in app have same package names and classes, I changed package names for each swf and everything works fine.
Main app stores in cash loaded swf-s AS code, I have't found solution how to clean this cash
Similar Messages
-
As 3 load swf flie problem,help
I have now trapped by a strange problem of loading the swf
file.For some reason I need to use a main swf file to load other
swf file and use the class in it,it's very common.
And now I worte a class blow to explain what problem I met:
package
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class TestClass extends MovieClip
public var sp:Sprite;
public static var count:Array=new Array();
public function TestClass()
sp = new Sprite();
//drawcrr();
this.addEventListener("test",test);
count.push("");
trace("count in circle is:", count.length);
private function test(e:Event):void
drawcrr();
public function drawcrr():void
sp.graphics.beginFill(0);
sp.graphics.drawCircle(0,0,10);
sp.graphics.endFill();
addChild(sp);
Save it as TestClass.as for next use;
Use the class to link to a fla file as the documentClass then
compile as a swf file name as
kk.swf then make a copy name kk1.swf;
Create a new fla file in the same directory then write the
code blow on the mainTimeLine :
var kk:TestClass = new TestClass();
var URL1:URLRequest = new URLRequest("kk1.swf");
var URL2:URLRequest = new URLRequest("kk.swf");
function domain():LoaderContext
var context:LoaderContext = new LoaderContext();
context.applicationDomain = new
ApplicationDomain(ApplicationDomain.currentDomain);
return context;
var L1:Loader = new Loader();
L1.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
L1.load(URL1);
var L2:Loader = new Loader();
L2.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
L2.load(URL2);
//v.text = flash.system.Capabilities.version;
function onComplete(e:Event)
trace(e.target)
then compile this fla file you will find the flash will put
out below:
count in circle is: 1
count in circle is: 2
count in circle is: 3
[object LoaderInfo]
[object LoaderInfo]
and if you notation the line "var kk:TestClass = new
TestClass();" compile it again
the flash will output :
count in circle is: 1
count in circle is: 1
[object LoaderInfo]
[object LoaderInfo]
It's prove that the same class in the different swf was
loaded by a main swf file,the same class in the different swf file
will be treated as the different class so that I can use them
individually but when I put the code:"var kk:TestClass = new
TestClass();" in the main swf file all this will be break down,I
can't use the class in kk.swf and class in kk1.swf individually
the flash make then as the same class because the static
variable "count" was count to 3.
it prove that all those 3 swf file will use the exactly same
class;So, that's the problem,it will make my programme cause error.
Can some one kindly to tell me why this happened?And how can
I solve this problem.Sorry about that.
That problem is:
If I use a shell swf to load some swf file and the shell swf
and the loaded swf file have the same name class,The loaded swf's
class will be ignored.
That will make me can't use the loaded swf file's class which
have same name with the shell swf.
However, this problem can be solved by useing the application
domain.Just give the swf you loaded a new application domain in the
shell swf.
But after that I found a new problem appear in front of mine,
that is:
If I use the different application domain in my shell swf how
could they communicate with each other?
For example:
If my shell swf have a class named TEST,and the loaded swf
also have the same name class those two classes both extends the
class named TESTParent and the TESTParent have a public static
variable to count the instance of the class.If I want use those two
TEST
class individually and at the same time made the static
variable in the TESTParent count work as a same class how can I do? -
Extract graphics from loaded swf / Big problem
Hello,
my English isn't very good, so sorry for mistakes I have swf which consist of many vector graphics.
You can show it right here: http://www.watchtime24.sisco.pl/moje...orowanka_1.swf
If I import the swf to the stage, than I can manipulate this graphics. But this is not enough for me. I need to manipulate from Action Script.
I need to change the colors of this piceses from AS. I tried to use function
getObjectsUnderPoint(new Point(mouseX, mouseY))
but it doesn't work. This function doesn't see shapes, graphics or something else.
Is any solution which can fix my problem ? Has anyone any idea ?Hey Mich,
What you can do is turn eachof the items in your shapes, into a movieClip or sprite or even a bitmap.
like the boy in the drawing.. take all of thsoe and then convert them into a movieClip. Then when you do this give them a name and export them for actionscript. Give this a class Name.
then when you load the swf, you can actually target those files with this line.
Say i converted the BOY into a movieClip.
import flash.system.ApplicationDomain
import flash.utils.geClasstDefinition
var myswfHoldingBoy
var myLoader:URLLoader = new URLLoader()
myLoader.addEventListener(Event.INIT,onInit)
var myURLRequest('path to myswfHoldingBoy')
myLoader.load(myURLRequest)
privaate function onInit(e:Event){
//here is where we will extract the boy for the library of the other swf
var ldrAppdomain= e.target.loaderInfo.applicationDomain
var boyObject:Class= ldrAppdomain.getByDefinition('class name you gave the boy as i said eralier') as Class
// now we have boyObject that will be able to be used as a class
addChild(new boyObject()) // this will addYourBoy movieClip to the stage. but keep a reference to him so that you can then manipulate him. -
HTMLLoader loading local content (SWF files) problem
Hello guys,
I'm just finishing my application but I facing a problem.
I'm currently developing a desktop application using AIR.
I'm using HTMLLoader to load local SWF files when te user tries to access specific content on the application.
I successfully accomplished this, but the loaded SWF also loads other files (assets and xml files with translations) and that is not working.
When a SWF is loaded he just stops on his own loading screen (when loading the XML files).
All this stuff is happening on my CustomNativeWindow:
(my CustomNativeWindow "overlays" the main application)
public function CustomNativeWindow()
var nativeWindowInitOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
nativeWindowInitOptions.systemChrome = NativeWindowSystemChrome.NONE;
nativeWindowInitOptions.renderMode = NativeWindowRenderMode.DIRECT;
nativeWindowInitOptions.resizable = false;
nativeWindowInitOptions.maximizable = false;
nativeWindowInitOptions.minimizable = false;
super(nativeWindowInitOptions);
alwaysInFront = true;
this.activate();
public function setProperties(contentName:String, contentURL:String, posX:Number, posY:Number, stageWidth:Number, stageHeight:Number):void
this.stageHeight = stageHeight;
this.stageWidth = stageWidth;
this.contentURL = contentURL;
this.contentName = contentName;
this.x = posX;
this.y = posY;
this.width = stageWidth;
this.height = stageHeight;
this.title = contentName;
this.addEventListener(Event.RESIZE, onWindowResize);
SWFHTMLLoader();
private function SWFHTMLLoader():void
//REQUEST LOAD URL
var request:URLRequest = new URLRequest(contentURL);
//HTML LOADER SWF
htmlLoader = new HTMLLoader();
htmlLoader.width = stageWidth;
htmlLoader.height = stageHeight;
htmlLoader.addEventListener(Event.COMPLETE, onHtmlLoaderComplete);
htmlLoader.load(request);
stage.addChild(htmlLoader);
private function onHtmlLoaderComplete(e:Event):void
trace("NATIVE WINDOW HTMLLoader complete");
onWindowResize();
private function onWindowResize(e:Event = null):void
if (htmlLoader)
htmlLoader.width = stage.stageWidth;
htmlLoader.height = stage.stageHeight;
Probably something related to security?
How can I fix this?
Is kinda urgente... deadline is coming...
Thank you!Thank you kglad for your fast response...
The reference to the content comes from a XML loaded on the main application.
var xml:XML = <Content en="game" >
<ImageSource>assets/images/gallery/resources/gameone.png</ImageSource>
<ContentSource>content/gameone/gameone.swf</ContentSource>
</Content>;
contentURL = xml.ContentSource;
So contentURL is: content/gameone/gameone.swf
Am I in trouble? -
Loading swf files from an iPhone Air App
Although the faq says its possible ( http://bit.ly/gyxmCo ) I can't seem to load .swf files from my app.
There's no .AS code in the .swf file I'm trying to load.
PNG files load with no problems, swf's fail.
A working example would be appreciated instead of suggestions, I've spent the entire day trying out suggestions
regards,
MartijnBecause I can't see any library assets in an as2.0 file.
I've discovered that the swf fails to load as soon as you make a symbol 'export for actionscript'
probably because it will then create a class. So you can only load SWF's as simple pictures or animations, you cant use it as an asset library with multiple animations/images/sounds in it..
As for you other questions:
it doesnt matter if the file is local or on the web. same results
I created the swf file from a fla in CS4, and I'm compiling my air project that loads the swf with FlashDevelop. -
Load swf file in html based air?
1. The start window opens up a transperant window in an iframe.
2. Then the transperant window loads an external asp file from my server (content.asp) in an iframe.
3. In the content.asp file i try to load an swf file, but nothing is visible?
I use the following code in content.asp to show the swf file:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="300">
<param name="movie" value="flashtest.swf" />
</object>
I have uploaded a testpage with this code to the server and it works fine, but not in the air application!?
What Im I doing wrong?No, nothing with HTML.
I have 2 SWF applications. One is the Gallery, and the second is my Main Page.
My Main Page must integrate the Gallery module in one of its page.
The problem is when I try to integrate it, I think I must give de future loaded SWF some parameters like this :
(My Main SWF loading in HTML)
var so = new SWFObject("WebSite.swf", "flashcontent", "520", "700", "10", "#111111");
so.addParam("allowfullscreen","true");
so.addParam("allowScriptAccess","always");
so.addParam("menu","false");
so.addParam("wmode","opaque");
so.addParam("bgcolor","#000000");
so.setAttribute("id","flash");
so.write("flashcontent");
It was for the Main App. For my Gallery SWF I had to load it like this (in HTML) :
var so = new SWFObject("Gallerie.swf", "gallery", "249", "249", "10", "#111111");
so.addVariable("xml_path","Galerie/config.xml"); // this line is adding the path to the xml file make sure that it's name is xml_path
so.addParam("allowfullscreen","true");
so.write("flashcontent");
So at the beginning I had 2 different projects with an HTML page for each.
Now I wan't to directly integrate the Gallery SWF into the Main SWF. And as you have seen I must give it some parameters such as the "xml_path" and "allowfullscreen". This must be done in ActionScript 3 and I don't know how...
I think I have to use FlashVars but I don't know how. As I said before, I have tried using the loaderinfo.parameters, but it is in read-only...
Do you have an idea of how I can make it work ? -
Hello.
I am having a weird problem when trying to test a movie or publish preview -> flash on mac with Leopard os.
The result is a blank movie with the usuall "movie not loaded" if u right click on it and the output returns the "Error opening URL 'the path of the swf here'.
This has nothing to do with loading external files or something like that. It happens even in blank movies and it gives the same error if I try to open a swf from flash ide.
I can publish the project or export the movie with no problem at all.
I can preview the movie in html. I can run all the swf files in my hard disk, network, usb stick, dvd etc., but when I try to open any of these files from flash ide I got that stupid error.
Its not something that stops me from working in flash ide but its slow to export movie any time I want to test it.
Things that I've tried so far but nothing worked:
Update the flash cs4 to the latest version
Update the flash players
Restored the release flash player as default player (I am using as default the debug player)
Cleared the preferences
Move the flash cs4 folder to another location in hd
Saved the fla document first before testing the movie (in different places with or without spaces in document name or folder)
Give read & write permissions for everyone for flash.app, players and for fla files when saved first before test movie
Unistall and install the application 3-4 times.
Test every as version just in case.
Also I've checked the folders when testing movie and I can see that it creates an swf file, which I can run it outside flash ide (the one that the flash ide player cannot load) with no problem.
The mac os has the default set up as it came. Nothing chnaged in permissions or security settings.
Thanx in advance.In this particular example I am using this code to start the
xml file load:
// now load the XML file that contains the content strings
var sXMLFile:String = "xml/home.xml";
var xmlContent:XML = new XML();
xmlContent.ignoreWhite = true;
xmlContent.onLoad = onXMLLoadComplete;
xmlContent.load( sXMLFile );
But I don’t think the code is the problem here . This
happens on every file I load when I am using a relative path to the
content, regardless of how I load the content (XML object,
loadMovie, MovieClipLoader, etc…) and the same code executes
perfectly on every other machine in the office(Mac and PC).
I’m more concerned with the semi-colons and .swf filename
that Flash is putting into my relative path on the error message.
Is that normal? -
I am exporting a game for IOS in Flash CS6.
I have isolated classes, except a framework for static utilities that do not clash, but I still get this message when exporting for IOS.
AIR for desktop, even with ApplicationDomain.currentDomain works and does not give any error. Same on android.
When I export the same exact project for IOS, it triggers that error randomly in different parts.
All related with a call to a method on superclass, the instantiation of an internal class, or of a Vector typed to a custom internal class.
TypeError: Error #2007: Parameter Possible symbol clash in multiple swfs, abcenv must be non-null.
The line that triggers the error:
return new RouletteChoserItemDev(num, data);
Any help is appreciated.
UPDATE
I have changed the code into:
var item:RouletteChoserItemDev;
var MyClass:Class = RouletteChoserItemDev;
item = new MyClass(num, data);
Now I get this funny error:
Error #1034: Type Coercion failed: cannot convert device.plugins.rouletteLobby::RouletteChoserItemDev@6284bc9 to .
Yes, cannot convert to ".", a dot!*FOUND A SOLUTION*
The way ApplicationDomain.sameDomain works on Android and Desktop, and on IOS, IS DIFFERENT!!!
I probably have to file this under AIR bugs.
Anyway:
- In loaded SWFs, classes which are not already stored in parent SWF CANNOT be instantiated.
I.E.
var c:MyClass = new MyClass(); // Will not work
var c = new MyClass(); // Will not work
var c:MyClass = getDefinitionByName("fullpackage.MyClass"); // Will not work
var c = getDefinitionByName("fullpackage.MyClass"); // WORKS!!!!!
var c:DisplayItem = getDefinitionByName("fullpackage.MyClass"); // WORKS!!!!!
So, it seems that classes stored in local loaded SWF will not be accessible directly. Even though tracing it trace(MyClass) works well, the class cannot be used in code in any place. Variables cannot be typed, and class can only be instantiated with getDefinitionByName();
All this, is true ONLY on IOS, same exact project and settings, will not trigger any error in AIR for Desktop or for Android.
But since obviously we use the same codebase for all devices, this IOS *feature* has to guide the way we code, even though we break a few important OOP best practices.
Hope I spared someone else the 3 days including an entire weekend I had to invest to find this out. -
Hi,
I've an AIR application which is loading an swf file to swfloader. Its working properly when its running from builder. But not showing the swf file after exporting it as an air installer package and run it on desktop.The swf file is stored in src itself.The swf file was generated using flash.
Any help will be appreciated.
Thanks in advance.Hi,
It might be security issue.Air uses application sandbox.
You are trying to load the content from non-application sand box to
application sandbox.
Any one of the following may give solution to this error.
1.using HTMLLoader to load swf files.
2.using loadbytes.
3.creating sandboxbridge.
You can check the loadbytes method in the attachment.
vamshi.
2009/10/5 newflexcoder <[email protected]>
>
Hi,
>
I've an AIR application which is loading an swf file to swfloader.
Its working properly when its running from builder. But not showing the swf
file after exporting it as an air installer package and run it on
desktop.The swf file is stored in src itself.The swf file was generated
using flash.
>
Any help will be appreciated.
>
Thanks in advance.
> -
AIR: Loading external Swf - sandbox violation
Hello Mates ,
I need a help ... an urgent one !!! i tried so hard to figured it out .. but i couldn't .. so I appreciate your help so much ..
I'm developing an Air App using flash ... the app loads an external SWF file dynamically through an xml ... the SWF file has a movieclip that has a listener (ON click )
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest(clickURL));
everything is working fine until i click on this movieclip ... it displays the below message
SecurityError: Error #2121: Security sandbox violation: navigateToURL: http://www.mydomain.com/maskot/avatar.swf cannot access http://www.yahoo.com. This may be worked around by calling Security.allowDomain.
any help !!! because i really have a deadline !
Thank you so much !that's why i added those comments about the swf's domain. for locally loaded swfs, use:
SFMltd wrote:
Hi Kglad, Thanks for the Example.
if i run my class with securityDomain = SecurityDomain.currentDomain; then it throws this error: SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property.
The swf file im trying to load is stored locally so i guess this error makes sense. However if i comment out that line i get the same "cannot access Stage owned by app" error?
See below for class:
package {
import flash.display.MovieClip;
import flash.filesystem.File;
import flash.events.Event;
import flash.net.FileReference;
import flash.events.MouseEvent;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.system.LoaderContext;
import flash.system.ApplicationDomain;
import flash.system.SecurityDomain;
public class assetPreview extends MovieClip {
private var loader:Loader;
private var mainSWF:MovieClip = new MovieClip();
public function assetPreview() {
addEventListener(Event.ADDED_TO_STAGE, initialise);
public function initialise(e:Event):void
removeEventListener(Event.ADDED_TO_STAGE, initialise);
var allowSWF:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain);
// allowSWF.securityDomain = SecurityDomain.currentDomain;
loader = new Loader();
loader.load( new URLRequest(settingsXML.pathToSWF),allowSWF);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, viewPreview);
public function viewPreview(e:Event):void
addChild(mainSWF);
mainSWF.addChild(loader); -
AIR crashes on loading swf with 'Imported for runtime sharing' fonts
Hello everybody,
I have a trouble with an AIR application developped with Flex but the error seems to come from the Flash/AIR, after some searches a staff member (Flex harUI) said me that I could find more help for my trouble here.
I'm developping an AIR application which loads an external swf. This swf contains 'Imported for runtime sharing' fonts from another swf to reduce its size.
When the AIR application has finished to load (see message below) the whole application crashes without giving any error message except the usual "Process terminated unexpectedly" error message.
End Loading: [SWF] C:\Users\dev02\myProject\index.swf - 83,930 bytes after decompression
Error Message:
Process terminated unexpectedly.
Launch command details: "C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\sdks\4.6.0\bin\adl.exe" -runtime "C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\sdks\4.6.0\runtimes\air\win" "C:\Users\dev02\Adobe Flash Builder 4\Languages_Editor\bin-debug\Language_Editor-app.xml" "C:\Users\dev02\Adobe Flash Builder 4\Languages_Editor\bin-debug"
I use Flash Builder 4 (build 272416) with sdk 4.6.
Full discussion here.
I tried to load the external swf with the most basics codes, it works with a Flash web app but not with a Flex/AIR app or a Flash/AIR app.
Thanks for the help !Thanks for the anwser.
In fact, I cannot specify a swc because my main application is an editor of sub-applications where each one has its own library.
The bug remains when sharing a simple MovieClip too.
Maybe, if I explain my project it will be a little more clear.
I'm developping a multi-languages module / application.
For each module, I have an external xml for texts. So in order to add a new language we don't need to recompile, just to change texts in the xml. But, I had to externalize my fonts, (imagine if each swf contains the whole characters set like latin, cyrillic, etc.).
And then, I have my main text editor application above the module, which loads texts xmls and a preview of the page where we need to change the text. (This is where it crashes, during the process of loading the preview).
My editor works great for translating, changing texts, modify images but without the preview, what is really frustrating.
(not so ergonomic, I know...)
I hope it will help you to understand my trouble.
regards -
Strange problem in loading swf created in Flash Builder 4 !
Hi
I am facing a strange issue in all my flash builder projects.
Here is a sample flex 4 project: http://flashvisions.com/demos/flexdemo/
you will see when it loads, it showes the first progressbar as grey and then the next one covering it as per flex4's new preloader mechanism. The example given above is a new flex project, without any code. It shows the first preloader then hangs on that for quiet some time without any indication that anything is happening. Then it shows the second phaze of preloader after some time. This is happening to all my Flash builder projects.
can some one suggest anything ? If possible watch this link to a medium bandwidth, not too high : http://flashvisions.com/demos/flexdemo/And this for 1.5:
"In Flex or Flash, a loaded SWF takes on the FrameRate of the
parent SWF. In flex you can set the framerate value for the main
application with "framerate" attribute in the
<mx:Application> tag."
Tracy -
Problem in loading swf within Flex 1.5
Hi all,
I'm working with a flex project.The logo of that project is a
spinning wheel created with flash tweens. I ve loaded that swf file
into Flex using a Loader component. But despite of whatever
framerate i ve specified, the wheel spins in a constant speed,
which is a little bit slower than the expected speed of the wheel.
Is there any option in flex to increase the framerate, or is there
any other way to do this. Pls.help.And this for 1.5:
"In Flex or Flash, a loaded SWF takes on the FrameRate of the
parent SWF. In flex you can set the framerate value for the main
application with "framerate" attribute in the
<mx:Application> tag."
Tracy -
Is it possible to load SWF files from an SQL database?
Hi all, I am very new to flash (I am primarily a C'# developer!) and I have been asked to investigate the possibility of doing the following;
Create an application that allows swf files to be uploaded and stored inside of a SQL database as binary data (Why a database is a long story!)
Allow this binary data to be extracted via a http request to be dynamically loaded inside of a web page.
Now the first part was easy. I have all of my swf's uploaded and stored inside of the database. I have code that can make a request for the binary and write it to the response, so far so good. Now this is where I am stuck.
I thought I could dynamically load the swf binary data by creating a very basic swf that simply contains a movie clip holder and for now a simple loadMovie statement. My idea being that I can could provide a url for the loadMovie statement that returns the swf binary data. This is where I have ground to a halt.
I can see the call being made from the swf, I can see the data being returned but I cannot get it to render. I remember seeing an article some time agao where someone stated that they had used this method with success but I cannot find now. Has anyone ever done anything like? Is it even possible? Am I missing something simple?
I have tried to return both the raw binary data and also used response.write but to no avail. Can anyone help?You are possibly trying to load AS3 swf into an AS2 Container at least the use of loadMovie() points in that direction. Be sure to use AS3 and target at least Flash 9 in your Loader/Main.swf. Also the AS3 concept of how to load swfs differs a lot from the old concept.
Look into the docu:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Loader.ht ml
But the biggest Problem seems to me -what you mentioned- that Loader needs a (defined) URLRepuest and since your swf files have no "real" URL and you surely don`t want to let the user directly write to your server, a workaround would be to write the BinaryStream with AIR-functionality to a local installlation directory and load it then from there. -
Load SWF file in main SWF with parameters
Hello everybody,
I recently got a new flash Application which is a Photo Gallery.
This App is made of multiple folders (source files), a FLA file, a SWF with its javascript SWFObject and an Html page which instantiate this App with some parameters (size, config file path, ...).
It needs an XML file to find all the Photos it displays, to do it I need to configure my application in the HTML Page and give it the "xml_path" :
var so = new SWFObject("index.swf", "gallery", "249", "249", "10", "#111111");
so.addVariable("xml_path","load/config.xml"); // this line is adding the path to the xml file make sure that it's name is xml_path
so.addParam("allowfullscreen","true");
so.write("flashcontent");
By the way, I have a second application, the WebSite, which have to display the Gallery SWF in its "Gallery" page.
Here is how I do it at the moment (in ActionScript3) :
var swfRequest:URLRequest = new URLRequest("C:/......../Galerie/index.swf");
var swfLoader:Loader = new Loader();
//Charge le SWF Galerie dans le SWF Site
swfLoader.load(swfRequest, context);
container1.addChild(swfLoader);
//Positionne le SWF
swfLoader.x=10;
swfLoader.y=120;
It successfully loads the Gallery application but It shows an error telling me it doesn't find the XML configuration file... In the HTML file I simply had to write the "so.addVariable("xml_path","load/config.xml");" to tell where the XML file is...
So, my question is : How can I integrate my SWF application giving it some parameters like above, in Action Script 3?
Thank you ,
PatrickNo, nothing with HTML.
I have 2 SWF applications. One is the Gallery, and the second is my Main Page.
My Main Page must integrate the Gallery module in one of its page.
The problem is when I try to integrate it, I think I must give de future loaded SWF some parameters like this :
(My Main SWF loading in HTML)
var so = new SWFObject("WebSite.swf", "flashcontent", "520", "700", "10", "#111111");
so.addParam("allowfullscreen","true");
so.addParam("allowScriptAccess","always");
so.addParam("menu","false");
so.addParam("wmode","opaque");
so.addParam("bgcolor","#000000");
so.setAttribute("id","flash");
so.write("flashcontent");
It was for the Main App. For my Gallery SWF I had to load it like this (in HTML) :
var so = new SWFObject("Gallerie.swf", "gallery", "249", "249", "10", "#111111");
so.addVariable("xml_path","Galerie/config.xml"); // this line is adding the path to the xml file make sure that it's name is xml_path
so.addParam("allowfullscreen","true");
so.write("flashcontent");
So at the beginning I had 2 different projects with an HTML page for each.
Now I wan't to directly integrate the Gallery SWF into the Main SWF. And as you have seen I must give it some parameters such as the "xml_path" and "allowfullscreen". This must be done in ActionScript 3 and I don't know how...
I think I have to use FlashVars but I don't know how. As I said before, I have tried using the loaderinfo.parameters, but it is in read-only...
Do you have an idea of how I can make it work ?
Maybe you are looking for
-
Using Calc Manager to update values for Members with Text Data Type
Hi All, In my outline I have a member of text data type. The purpose is to allow users to be able to enter comments. Each line item is created through a business rule and I am prompting the user to enter the key values at the launch of the calc manag
-
I need drivers for my Audigy 2 in a Dell XPS
I have a Dell XPS. I just installed Windows XP Pro SP3 in the computer and I dont have the drivers for the Factory installed Audigy 2 ZS - Dell (OEM) <span class="text">SB0358 sound card. The drivers didn't load when I installed the OS. Dell does not
-
Adressing multiple copies of Movieclips with the same instance name
Is it possible to iterate through MV copies with the same instance name? It would be very useful for my project.
-
How would i find for permissions for certain directory
hello how would i find in my web docs (/home/user/htdocs) all directories named "templates_c" so i can do a chmod on them. they need to be writable by the app, but i think 775 is not enough, i think they might need tto be 777 or atleast o+w i believe
-
Error when execute a planning function on selected line
Hello together, we are using SAP BusinessObjects Analysis 1.4 SP9 (1.4.9.3241, Office 2013) and SAP BW 7.3 SP 11 (SAPKW73011). When executing a planning function on an selected line in the crosstab, the following error appears: The VBA Coding used i