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


Similar Posts:


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

Flex :: Dispatch Custom Event From One Module To Another : Error #1034: Type Coercion Failed?

Mar 23, 2011

I am trying to dispatch a custom event from one flex module to another.The code which dispatch the event is as below Application.application.Destination.child.dispatchEvent(
new AlgoEvent(AlgoEvent.GETFROMPARENT_LOCAL_EVENT));

here AlgoEvent is a custom event.on the other side the module which catches and handles the event has this code:

public function sendParametersToChild(e:AlgoEvent):void
{[ code]...

but when the statement Application.application.Destination.child.dispatchEvent(new AlgoEvent(AlgoEvent.GETFROMPARENT_LOCAL_EVENT)); is executed the debugger give the following run time exception:

TypeError: Error #1034: Type Coercion failed: cannot convert resources.events:: AlgoEvent@4182239 to resources.events.AlgoEvent.at flash.events::EventDispatcher/dispatchEventFunction()[code]...........

View 7 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 :: Flex Send Data To Module?

Jan 27, 2009

im calling a module in my flex app, but i need to send it a variable and have no idea how this is done (both sending the variable and then the module retrieving it)...basically, the module generates a tree which gathers data from a PHP-generated XML...so I need the data that is sent to the module to be sent to the PHP file to show the details depending on which page the user is on.

Code:
<mx:ModuleLoader url="lists.swf" width="30%" height="100%" />

just a thought, if I were to add "?id=3" to the SWF, would that work and how would I retrieve that value in the module to use?

View 1 Replies

Flex :: Mxml - Converting A Custom Component To A Module?

Sep 25, 2009

How to take an existing custom component in Flex and convert it into a module? EDIT: What should be done in the mxml where this custom component is used? Should it be replaced with a to load the module? If yes, how to deal with code that uses instances of the components?

View 2 Replies

Actionscript 3 :: Event Listener To Keyboard Event Not Listening In A Module?

Jul 8, 2011

I am doing this inside a module containing viewstacks and their childs.Calling onInit() on creationComplete of module.When I am inside one of the childs of a viewstack of this module and press Enter, it doesnt not invoke the listener function at all (bp inside this does not get hit).

private function onInit():void{
this.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
}[code]..........

View 2 Replies

ActionScript 3.0 :: A Custom Filter Or Module - Such As URLScan - Restricts Access To The File

Feb 18, 2010

My btns do not work, I think becuase I added this: import flash.display.Sprite; import flash.net.navigateToURL; import flash.net.URLRequest; import flash.net.URLVariables; to my time line code in an attempt to get four btns to funtion out correctly with a navigateToURL "_self". Now the IIS browser reads "custom filter or module, such as URLScan, restricts access to the file".

View 2 Replies

Flex :: Dispatch Event From Application To Module?

Mar 29, 2010

Is there a way how modules can listen to parent application event? My current solution that works is:

private function directoryRemoteObject_saveCompany_resultHandler(e:ResultEvent):void
{
this.directoryModuleLoader.child.dispatchEvent(new CompanyEvent(CompanyEvent.COMPANY_SAVED, e.result as int));
}

this means that I need to dispatch event for every module.

View 2 Replies

AS3 :: Flex - Unload Module Event Handling?

Mar 25, 2011

I am developing an AIR app. In the main app I have a module loader 'mainModuleLoader'. I am creating modules as separate mxml files using the <mx:Module> tag. And I am loading such a module in mainModuleLoader dynamically using actionscript. Everything works fine.For the module which I am creating as mxml files, I would like to know how to add an unload event handler. So that, whenever I call mainModuleLoader.unload(), the unload event hander is triggered from inside the module.mxml. I have tried the following without any success.

<mx:Module creatingComplete="init()" unload="unloadHandler()"/>
<mx:Module creatingComplete="init()" remove="unloadHandler()"/>

The problem with the second statement above is that it triggers the unloadHandler even if some child is removed inside the module. I have also tried to add the following in the action script.

private function init()
{
this.addEventListener(ModuleEvent.UNLOAD, unloadHandler);

[code].....

View 1 Replies

Actionscript 3 :: Unload Module Event Handling In Flex

Oct 13, 2010

I am developing an AIR app. In the main app I have a module loader 'mainModuleLoader'. I am creating modules as separate mxml files using the <mx:Module> tag. And I am loading such a module in mainModuleLoader dynamically using actionscript. Everything works fine.For the module which I am creating as mxml files, I would like to know how to add an unload event handler. So that, whenever I call mainModuleLoader.unload(), the unload event hander is triggered from inside the module.mxml. I have tried the following without any success.[code]The problem with the second statement above is that it triggers the unloadHandler even if some child is removed inside the module.I have also tried to add the following in the action script.[code]But, it doesn't trigger on unloading the module. Kindly let me know if I am going wrong somewhere or if there is any other method to attach the event handlers.

View 2 Replies

Flex :: Removing Event Listeners Before Closing A Module?

Aug 18, 2011

I add an instance of this module to the dispay list and then remove it.Will the event listener attached to foo create a leak?A simplified module:

<s:Module creationComplete="init()">
<fx:Script>
protected var foo:Bar = new Bar();

[code].....

View 2 Replies

ActionScript 3.0 :: Put Together All The SWF Module Onto A Single SWF?

Aug 16, 2009

I had been working on an application.I have developed swf's (around 5) of all the modules of the application. Now I want to make the main SWF, that would display all the other SWF modules at a pre-decided position on the screen. put together all the SWF module onto a single SWF?

View 8 Replies

ActionScript 1/2 :: Callback For Xml-rpc Module

Feb 12, 2010

I am integrating a flash module with Drupal using XMLRPC module. I am currently calling a node.save on Drupal(which creates a page in drupal), using Actionscript 2.0. On a flash button click, I am currently calling the node.save function. But ideally, I would like the function to be called first and only after the success of node.save, forward to the confirmation url. Right now, I am being forwarded to the page even without node.save being completed. I then have to refresh the page in order to see the results.

[Code]...

View 3 Replies

Swf Will Not Play From Joomla 1.5 Module

Jul 10, 2009

I'm building a website in Joomla 1.5 content management system. I can make my swf files play if hard coded into a web page or from Dreamweaver etc.

I am trying to play my swf files from a Joomla module, either a custom html module or from an extension I have downloaded (Flash Module) that is specifically made to play Flash in a module.

No flash files work from within a module.

View 6 Replies

Flash :: Can't Add Module As DisplayObject

Jun 5, 2011

I'm trying to load a module and add it to a mx:box object called "mod". [code]...

View 1 Replies

ActionScript 3.0 :: Embeding A Flex Module?

Aug 28, 2009

i cant find info on this anywhere on google, even adobe's description doesnt work. basically i have figured out how to embed and access the children of a swf built in flash (YAY!!!), but theres another problem now.

a flex module complied to flash behaves differently, and embedding it doesnt seem to work, at all.

however this application pretty much depends on the modules being loaded with the main application so embedding the module is vital. i've tried countless techniques and so far the only thing i know woks so far is:

[code]...

View 1 Replies

ActionScript 3.0 :: Creating A Quiz For A2 Module

Mar 3, 2010

I have made a start on my quiz, in order to complete the criterions I have to create a project (a quiz in my case) which uses a variety of methods and tools e.g. drag and drop features, user text input and numeric input etc.I had planned on creating 4 topics and 4 questions in each. Having searched the forum it appears that the common consensus for creating a quiz is to set up your questions in a XML file however I have no idea how to use this or what it is. Moreover from my research I found I appear to be doing things slightly different to other people who are doing or did a quiz. This difference is how the answers are input; I will be user input text fields along, multiply choice buttons etc. I also am placing my questions in different places for different sections and I am also required to use video.This may still be able to be done however I only have 29 days to complete the task and the way I'm planning will be quicker as I understand how it works at least. The first problem I am having is how to code for the input text. I plan on allowing for the user to input a word and then to compare that word against the correct answer. This also brings me onto my second problem. Once a section of questions has been completed I plan on taking the user to a screen which displays how many answers they got correct. This would involve tracking their answers and comparing them to a set of correct answers however I have no idea how to do this. (from what i have learnt recently the use of an array maybe?).

The final problem I am having at the moment is setting up a 'barrier of sorts' In my first question i have set up a mask which applies only to the image I have also placed on the stage. The mask is applied to a circle which can be dragged around displaying small sections of the picture at a time. I wish to stop the circle leaving the picture as it falls under the background once it as left the area of the image. This results it in disappearing. I have no idea how to solve this and I could not find information on it. The solution I think would be to stop the masked circle leaving the area of the picture OR to reset it back to original position if it is released outside the images area.My quiz is far from complete at the moment and I have not yet even finished the frames for each of the questions however these problems are fundamental to the quiz's success and so I felt I needed to confront them now.I can upload what I have done so far and send the link in a pm so you can see what I mean (if it is not already clear)

View 14 Replies

ActionScript 3.0 :: Setting Module X And Y Coordinates

Mar 12, 2010

I'm pretty baffled by the lack of information I've found about this and even more baffled that it doesn't look like there's support for this functionality.

I'm building a custom module loader and I want to send x, y, width, height coordinates for each module I'm loading so I can dynamically place modules where I want them.

I have my moduleReadyHandler as such but when I set the x, y coords the modules placement is unaffected

Code:
private function moduleReadyHandler(event:ModuleEvent):void
{
child = module.factory.create() as DisplayObject;

[Code]....

View 1 Replies

Media Server :: GEO Lock In C++ Or AS Module?

Jul 14, 2009

I would like to create geo locking module which would react per-file/stream. This means that one particular file which will be streamed via FMS can be geolocked to one country (e.g. Lost can be viewed only by USA viewers (IPs)).Flash video player connects with nc.connect() and plays file with ns.play() method. Geolocking would happend on ns.play() since some files/live streams are locked to some countries (not everything is geolocked and once they are, are not geolocked to same countries so everything happend on per file basis).
 
Can this module be done in Actionscript or is it necessary to use C++ module?

View 2 Replies

Flex :: Module Development Workflow?

Oct 6, 2009

I have just started looking into using Modules in Flex and would like to know how you all go about developing them.I understand how to use them (load, unload, application domains, shared classes, etc.), but I'm wondering what a good workflow is in creating them and using them in multiple applications.If I were building reusable application components (text editor, image cropper, compass, whatever), and I wanted to reuse them in many different applications, it seems like I would:

1) Create an Application specifically for one of those modules

2) Create a Module inside that Application

3) Develop the Module by itself, make it work right

4) Link shared libraries to it somehow (like library projects I would use between all of the modules)

5) ... then I'm unclear what's next.I now have lets say 10 Module/Applications, and I want to start mashing them together into usable applications.What's the best way to do this?I would like to not have to copy-paste code and swfs, using something like git submodules if an equivalent is possible.

View 1 Replies

Flex :: Different Uses Of Component And Module In Application?

Jun 9, 2010

purpose of component and module of flex app

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

Flex :: Getting All Info From An Object/module?

Jan 6, 2011

I'm wondering if there's any reasonable way to get a reference to an object in Flex, and look through everything in every sub object (every property and everything). That is, I want to know if I can completely map all of the data within an object, from another object. I'm aware that this wouldn't work for private (or protected) members, but for anything public, it should be possible, correct?

View 1 Replies

Passing Param To Flex Module Via Url?

Feb 5, 2011

Im using a few modules repeatedly in a Flex app and varying the conditions by passing in params via the 'loaderInfo.url' var. This works fine for the first iteration of a given module but subsequent attempts will always see the same params as the first creation regardless of what is actually used.

[Code]...

When I view the param in the 'CreationComplete' handler (eg 'trace( this.loaderInfo.url );') its the same every time (for a given module) regardless of what is actually passed in via the ?param=string. What am I doing wrong?

View 2 Replies

Flex :: Invoke F3 Module From F2 Application?

Feb 13, 2011

I have an application built on Flex 2. I am writing a new application (module based) in Flex 3. Will these be able to co-exist? Can I invoke Flex 3 module from Flex 2 application?

View 1 Replies

Flex :: 4 - Pass Data To The Module

Apr 18, 2011

I have a Flex 4 application that loads a module. Everything works fine except that I cant create and object or cast an object to a type of my module. At run time it throws an error. I'm not sure if there is an issue with modules, Flex4, and spark? I've tried many different ways to set/cast these objects, but nothing seems to work.

[Code]....

View 1 Replies

Flex :: How To Popup TitleWindow In Module

Jun 22, 2011

I want to open TitleWindow in flex Module.

My Main page is Application Page and I want to open Module page from Main Page. In Module page there is TitleWindow control. I want to popup title window in Module Page.

View 1 Replies

Flex :: Communication Between Module And Application?

Jul 21, 2011

Ok, modules in Flex are popular but I have no idea why documentation and examples on the different uses of Flex modules can be so scarce.Anyway, for this question, I will take the classic Employee/Department example. I have a main.mxml that contains an mx:TabNavigator. Each tab is loaded by an s:ModuleLoader.Tables: Employees {empID,empName,deptID}, Deparments {deptID,deptName}The Tab Navigator contains only one tab (for our example) called Employee. I have an Employee.mxml module. In that module, I have a datagrid that is populated with Employee details. I use the getEmployees($deptID) function. This function, as you may guess, returns me an array of Employees who work in a particular department.

Outside the TabNavigator, I have a departmentDropDownList that is populated with departments.deptName.My objective is to load the Employee module when I select a particular department from the DropDownList. I have a changeHandler for the DropDownList that can give me the deptID.

protected function departmentDropDownList_changeHandler(event:IndexChangeEvent):void
{
MyDeptID=departmentDropDownList.selectedItem.deptID;

[code].....

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







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