Flex :: Loading A Module Fails The First Time Load() Is Called, But Succeeds After?

Jul 19, 2011

I have a Button that when clicked loads a Flex module in my AIR application. However,occasionally the Module fails to load the first time the button is clicked, but it works the second time it's clicked. When I debug it in the debugger the READY event is not fired so the remaining logic is never called.

var moduleInfo:IModuleInfo = ModuleManager.getModule(managedModule.url);
moduleInfo.addEventListener(ModuleEvent.READY, function(event:ModuleEvent):void {
trace("ModuleEvent.READY called.");

[code]....

View 2 Replies


Similar Posts:


ActionScript 2.0 :: XML Loading Fails 1st Time?

Nov 13, 2009

I have a flash file that loads 3 straight XML files, one after other.And in every single code I have the sucess condition, like this:

ActionScript Code:
if (success){
doRightStuff();[code].........

Later, I added a function and an Interval to do the verifying:

ActionScript Code:
goBack = function () {
gotoAndPlay("untilItWork1");[code]..............

Didn't work also. Las try was a completely stupid addition: a variable counter that increased it's value 100 times (doing the XML calling and loading everytime), to check if the problem was some delay issue. 5 minutes later, it didn't work also.The second time I load the f**king page, it works like a charm.

View 1 Replies

Internet Explorer 8 - IE8 With Loading FLASH. SWF Loads And Renders Correctly On Initial Load, But On Any Subsequent Refresh It Fails To Load

Mar 7, 2011

I need some help? Anyone experience this problem before with IE8 FLASH bug? Can not get this to work on all subsequent refresh to the flash. I have a flash piece which simply renders only on the first initial load. After that, if i refresh or visit the page, it does not load correctly. It seems I am having this problem with the swf only on subsequent loading of the page or whenever a refresh happens.

View 1 Replies

ActionScript 2.0 :: SendAndLoad Fails To Load First Time And It Loads When I Call The Reload Function?

Aug 2, 2010

It doesn't load during the first load.

myVars= new LoadVars();
myVars.onLoad = function(works)
{
if(works){

[code].....

I am tryin to hit a servlet to get the data.

View 1 Replies

Flex :: Loading Module With Progress Bar?

Aug 16, 2011

My application has a couple of modules which am loading as thus in my application.

<local:moduleloader url="Module1.swf" id="modulel" />
<local:moduleloader url="Module2.swf" id="module2" />

Then while loading each module I am showing the progress bar. The progress bar shows but does not go away. It remains above the whole frame of the application. The module loader is as follows:(Also note that in Flex 3 the same works, but am using Flex 4 and in Fx 4 it does not)

<mx:ModuleLoader xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"

[code].....

View 2 Replies

Flex :: API - How To Load Class That Is On Another Module

Sep 6, 2010

I'm trying to build my flex modular app, and got the following scenario
Portal (which includes, 2 modules:)
-Mod1 (.swf)
-Mod2 (.swf)

Also, I have Mod1-API (.swc). The Mod1-API, defines interfaces which are implemented on the Mod1 (.swf). Both the Mod1 and Mod2 swfs import the Mod1-API swc. I'm trying to call the API method on the Mod2. On Mod2 I've the interface, since it is shared via the Mod1-API project. What I'm trying to achieve is the real implementation class loading on Mod2, via reflection, using the getDefinitionByName method, but it says its not defined. How from the mod2 load a class that is on the Mod1 project, returning just the interfacce to the mod2 so it can call methods just like an ordinary API method?

View 1 Replies

Android :: Flex - Loading Module On An Air Application?

Dec 13, 2010

I'm building an Air for Android App and I'm having problems loading a flex module. Does anyone know if loading modules is possible???

I built a simple app with just a ModuleLoader in it, which loads a mx:module. The module has only a simple mx:Label with a "Hello World" text.I build a .air with this. Then I build a .apk with the followin adt command.

adt -package -target apk-emulator -storetype pkcs12 -keystore certificate.p12 hello.apk hello.air

The application works just fine when running it on the PC, but when I do it on the apk-emulator it just goes blank and throws error #2032.

View 1 Replies

Actionscript 3 :: Flex: Are Unused Module Project Files Included In The Module Swf's

Jan 11, 2011

Currently optimizing an application at work. There are many files in some of the module projects that are not used by the exported (release build) Module.swf's. Are these unused files included in the swf's?

View 1 Replies

Can Flash Load A Flex Mx:module Created In Flex Builder 4

Feb 16, 2011

I have a Flex module created in Flash Builder 4 as a swf file. I am trying to load and run in within a Flash application. I can get the module loaded but I can not get the flash application to access any module functions. Here is how I load the module in Flash and the error I get. If I change the module to an application type swf then it loads and runs but now I have two applications on top of each other. I would like the loaded module swf to be able to have access the Flash stage object.

ReferenceError: Error #1069: Property application not found on MyModule__mx_core_FlexModuleFactory and there is no default value.
var loader:Loader = new Loader();

[code].....

View 1 Replies

Flex :: Proper Method To Stop Loading A Module Before It Has Completely Loaded?

Jun 17, 2010

I seem to recall that Loader.unload() could once be used to stop loading a swf before it had finished loading. I can no longer find documentation or the blog where I read this. Perhaps it was an unofficial feature. Anyhow, IModuleInfo, returned by ModuleManager.getModule() has an unload() method. If I want to halt loading a Flex Module that is in progress, do I just call iModuleInfo_instance.unload()?

View 1 Replies

Flex :: Garbled Text Using FETStationPanels But Only The First Time It's Called?

Dec 13, 2009

I'm using the FETStationPanels from FlashEff2 with Flex 3. Unfortunately, it is garbling some of the letters.Imagine that I've got three buttons. If any of the buttons are selected a titleWindow opens. Inside the titleWindow is some text pulled from a database that has the FETStationPanels effect applied to it, and an image. The first button that is clicked (it doesn't matter which one) will have garbled text. If I select another button, then the effect is fine and everything displays okay.

The FlashEff2 effect is fired on the creationComplete event of the TitleWindow.

I had a resize effect on the TitleWindow. I removed it, because I thought that that might be the problem. I put in a static height for the TitleWindow, but that didn't work either.I also tried using callLater and setting a timer to delay the appearance of the image until well after the effect had ended, but that didn't work, either.

View 1 Replies

Flex :: Garbled Text Using FETStationPanels, But Only The First Time It's Called?

Nov 19, 2010

Imagine that I've got three buttons. If any of the buttons are selected a titleWindow opens. Inside the titleWindow is some text pulled from a database that has the FETStationPanels effect applied to it, and an image. The first button that is clicked (it doesn't matter which one) will have garbled text. If I select another button, then the effect is fine and everything displays okay.The FlashEff2 effect is fired on the creationComplete event of the TitleWindow.I had a resize effect on the TitleWindow. I removed it, because I thought that that might be the problem. I put in a static height for the TitleWindow, but that didn't work eitherI also tried using callLater and setting a timer to delay the appearance of the image until well after the effect had ended, but that didn't work, either.

View 1 Replies

Javascript :: NetConnect Fails Silently In Flash When Called From SilverLight?

Apr 30, 2009

I'm trying to write a Silverlight control that hosts a Flash camera and microphone (since Silverlight doesn't support these things natively, worse luck). I've written a short little Flex application ("WLocalWebCam.swf") which handles the camera, and exposes two external methods: connect(uri:String, streamName:String), and disconnect(). I can call these successfully through JavaScript as follows (simplified to remove error handling, etc.):

function connectWebCam(webCamID, rtmpUri, streamName) {
var flashCam = getWebCam(webCamID);
flashCam.Connect(rtmpUri, streamName);[code].....

View 1 Replies

ActionScript 2.0 :: Load Movie Action Loading 'drag Bar.swf' Into Mc Called 'content'

Aug 7, 2003

I have a base that contains a load movie action loading "drag_bar.swf" into an mc called "content".drag_bar is a drag menu i created. It works when its opened by itself but doesnt work once it has been loaded into the base file.I know its because the AS in it contains the word "root" but when i changed it to "this", it still didnt work.

View 3 Replies

Flex :: Should UpdateDisplayList Layout And Position Every Time Render Is Called?

Jan 6, 2012

So updateDisplayList is for laying out, positioning and sizing a component's children. It seems a waste to me, however, to have all that code running every time a render is called, even if no changes have been made to the relevant properties or child properties.The way I get around this for performance's sake (working on mobile) is to set a flag inside of my overridden updateDisplayList that lets a big part of my own sizing/positioning code run only the first time.Is this a bad idea/ big mistake? I just can't see the benefit to letting it run every time otherwise if I don't expect anything that affects sizing/positioning to change.

View 1 Replies

AS3 :: Flex - Module No More A Module When Extended?

Jan 25, 2010

I have created a module in Flex like below:

modules/ModuleBase.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml">

[code].....

View 1 Replies

ActionScript 3.0 :: Load An External Swf Called 'signs.swf' Into An Empty Mc Called 'signholder'?

Apr 12, 2010

I want to load an external swf called 'signs.swf' into an empty mc called 'signholder'.

var loadit2 = new Loader();
loadit2.load(new URLRequest("signs.swf"));
signholder.addChild(loadit2);

Everything works. Cool. But, I now want to target something within the signs.swf. How do I do it though? What is the path? Do I have to give the child of signholder an instance name? Everything I try fails.

If I wanted the root timeline of the external swf to gotoAndPlay(2) for example,...would i say...

signholder.loadit2.gotoAndPlay(2) ???
var wow:MovieClip = loadit2.content as MovieClip;
wow.gotoAndPlay(2) ????

View 3 Replies

ActionScript 2.0 :: Xml - Load The First Image And Keep Loading The Rest With One Loading Time

May 21, 2008

i was creating my portfolio using xml gallery script from this site. the thing is that it loads one picture at a the with a preloader between each load. is there a way to load the first image and keep loading the rest so there will be only one loading time? here is my action script:

[Code]....

View 3 Replies

ActionScript 2.0 :: Change The Time For SetInterval Each Time The Function Is Called

Nov 7, 2004

My goal is to change the time for setInterval each time the function is called. Planning to replace myInterval = 5000; with a randomized number. My problem is getting setInterval to recognize the myInterval variable from the function.

[Code]...

View 2 Replies

Flex :: Localization And Resource Modules - Runtime Errors - Unable To Load Resource Module From Portal?

Jan 20, 2011

I've created an application that includes a number of Modules and uses Parsley framework. Ant is used to build the application.Recently I thought of using Resource Bundles and implemented it in the system by creating a locale/en_US folder under the src. I added a portal.properties file with all my strings defined.In my modules, I added the metadata

<fx:Metadata>
[ResourceBundle("portal")]
</fx:Metadata>

In the ant build file, I added the below lines within mxmlc.

<locale>@{locale}</locale>
<source-path path-element="${myapp.flex.app.locale}/{locale}"/>
<include-resource-bundles>portal</include-resource-bundles>

The build works fine and when I deploy the application and open it in my browser, I'm greeted with many errors thrown by the Flash player.But if I dismiss the messages, its working fine. My strings are replaced with the values in the property file, but how do I stop the runtime errors being thrown up?I get the below error.

Error: Unable to load resource module from portal at MethodInfo-637()at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()[code].....

View 1 Replies

ActionScript :: Flex - An Object Returned From A Function Call Changed The Next Time The Same Function Is Called?

Jan 10, 2012

I have an AS3 program that calls a function multiple times. The function must return multiple variables, so I created a class for the function to declare an object containing all of these variables. For example, here's my class:

package
{
public class PER
{
[Code].....

Let's say the calling program calls the function, which returns the variables into data_set1 (where data_set1 depends on input variables arg1, arg2, arg3) using:

var data_set1:PER = function_name(arg1, arg2, arg3);

The calling program does some stuff, then calls the function again, but returns the variables into a new variable name, data_set2:

var data_set2:PER = function_name(arg4, arg5, arg6);

My intention is that data_set1 and data_set2 are different (e.g. not linked together).

My question is, given that arrays are passed by reference, will data_set1 be modified to agree with data_set2 upon the 2nd function call? Why or why not?

View 1 Replies

ActionScript 3.0 :: URL Loader Fails Every Time

Apr 30, 2010

I've tried numerous times to get the URLLoader to work properly, but it never does. I don't know if it's a problem with my code or something wrong elsewhere. AS3 Code (pastebin) It's talking to my PHP ...here... which returns valid XML. No matter what I do, I get nothing but: Error #2032: Stream Error. URL:[URL]

View 2 Replies

ActionScript 3.0 :: IOError #2038 Even Though Upload Succeeds

Dec 1, 2010

I'm using AIR to upload a file to a server. Amazingly, I'm getting an IOError even though the upload succeeds! The server requires authentication, so I handle that first (credentials and URL redacted below), then I upload the file successfully (even though Flash says I didn't):

ActionScript Code:
// Instantiate the file and add listeners
var file:File = new File("C:/file.xml");
file.addEventListener(IOErrorEvent.IO_ERROR, fileUploadFailed);

[code]....

View 1 Replies

Actionscript 3 :: Send Custom Event From One Module To Another Module?

Jan 2, 2012

I have created a modular application. I have two modules, for example Module1 and Module2.I have loaded these modules in my application. I am using Parsley in my application. I have loaded separate different context builder in both modules.

But when I am dispatching event from Module1, I am able to listen that event in that Module1 but I am trying to listen that event in another Module2. I am not able to listen that event in that Module2 through Parsley.

View 2 Replies

ActionScript 3.0 :: AIR Load Module From A Website?

Apr 13, 2009

how to load a module from a website? I am trying to create a AIR application that loads a module from my website.i have to create a crossdomain.xml that "resides at the root directory of the server that is serving the data" . This is my website:[URL] that is actually a sub-domain. And here i have a folder in which i have that module that i am supposed to load in my AIR app. Where should i put that crossdomain.xml? in that folder? or at the root of[URL]or at the root of [URL]. Then, how do i give access to my AIR app to load the module from my website? if i use

Code:
Security.allowDomain(SERVER_ADDRESS);

i get this error SecurityError: Error #3207: Application-sandbox content cannot access this feature.
at flash.system::Security$/allowDomain()

I could use an example ... the code for the AIR app, the module, and where to put that crossdomain.xml file (and what to contain).

View 1 Replies

Professional :: Animation Fails To Fully Play First Time - Second Attempt Fine

Jun 4, 2011

I made a simple 15 second animation. When I play it in the program (not published yet), it plays fine. When i publish it however (I have tried both flash published and HTML published), it plays about 3/4's of the way, and restarts. The second time through (and from then on), it plays fully, just fine. How do I stop this?

View 1 Replies

ActionScript 2.0 :: Load XML Data - Pictures Load Into An Empty Mc Called ImageContainer?

May 3, 2008

The function below belongs to an XML based photoGallery.swf... Its menu is automatically populated from the same XML file as well (thumbnail picture, title, description). The pictures load into an empty mc called imageContainer.In another empty mc called textContainer, I would like to load some text.swf from the xml list as well.How would you include that in the code?

Code:
function loadTmbs () {
var tmbs:XML = new XML ();[code]......

View 2 Replies

ActionScript 3.0 :: Loading AS2-Content In Fails

Dec 7, 2010

I have a SWF-Movie written in AS2(I call it AS2-Bridge), which loads another SWF2-Movie. Now if I run the AS2_Bridge.swf everything works fine.But if I load the as2_bridge into the as3-movie - then the as2_bridge fails to load the other content.[code]

View 3 Replies

ActionScript 1/2 :: Using LoadMovie To Load Swf Fails?

Jan 23, 2010

I''m currently working on a school project, but I'm having issues with getting the flash loaded with loadMovie. I've read on several forums how to use the command, If I use the command, it loads the flash file. But all variables are undefined and the movieclip in which I loaded the swf file also remains empty.

I've tested the situation with a random jpg and this works.

I'm getting kinda desperate, since I've first tried to use scenes without succes..

View 4 Replies

ActionScript 3.0 :: Determine When A SWF Fails To Load?

Oct 7, 2010

I am using an external preloader to load up my main SWF from the same directory that the preloader is loading from. This is my custom class that I used based off of the adobe docs example for using Loader objects.I implemented a maxRetries variable as you can see, but how on earth do I make use of it and where do I perform the retries?Do I detect the Http status code and perform a retry based on whether it was a 200 or 0, or do a I do it in the IOError or what?

Code:
package
{
import flash.events.*;[code]....

View 2 Replies







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