Cairngorm In Flash CS3 (NOT Flex)
Hi,I've been reading up on the Cairngorm architecture that Adobe recommends as best practice for devevloping RIA's in Flex. http://labs.adobe.com/wiki/index.php/CairngormI recently purchased Flash CS3 and want to find a way to implement Cairngorm in my upcomming RIAs that will be built in Flash instead of Flex. I've created my own version of Cairngorm that uses almost all of the features and classes described in the Cairngorm architecture. The biggest challenge for developing a Cairngorm architecture in Flash is that the architecturerelies heavily on Flex data binding to update the view when there are changes in the model. As far as I can find, there are no such capabilities built into AS3. This leaves me with a few not-so-desirable options. I could write my own data binding classes, or try to migrate the data binding classes from Flex. Neither of these options seem very desirable to me.For now, my quick soluton: each view class that can respond to changes in the model implements an "IBinded" interface that contains one function called modelUpdated. These classes register with a 'bind list' when they are instantiated, and any command that causes a change in the model also calls a function cycles through each registered view class, calling the 'modelUpdated' function to signify that the model has updated. This is a reasonable solution for a very simple application with very little model data, but as the application increases in complexity, it does not scale, because there is no way for a view class that is binded to an object in the model to know whether or not that object has changed - instead, EVERY view class that responds to changes in the model must check the current value of whatever objects they bind to and see if there has been an update. Obviously, a better solution is necessary. My question - does anyone have any ideas? Is there a way to use Flex's data binding in Flash? Perhaps there a better solution than data binding altogether?
KirupaForum > Flash > ActionScript 3.0
Posted on: 04-25-2007, 03:34 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Cairngorm In Flash CS3 (NOT Flex)
Hi,
I've been reading up on the Cairngorm architecture that Adobe recommends as best practice for devevloping RIA's in Flex.
http://labs.adobe.com/wiki/index.php/Cairngorm
I recently purchased Flash CS3 and want to find a way to implement Cairngorm in my upcomming RIAs that will be built in Flash instead of Flex. I've created my own version of Cairngorm that uses almost all of the features and classes described in the Cairngorm architecture.
The biggest challenge for developing a Cairngorm architecture in Flash is that the architecturerelies heavily on Flex data binding to update the view when there are changes in the model. As far as I can find, there are no such capabilities built into AS3. This leaves me with a few not-so-desirable options. I could write my own data binding classes, or try to migrate the data binding classes from Flex. Neither of these options seem very desirable to me.
For now, my quick soluton: each view class that can respond to changes in the model implements an "IBinded" interface that contains one function called modelUpdated. These classes register with a 'bind list' when they are instantiated, and any command that causes a change in the model also calls a function cycles through each registered view class, calling the 'modelUpdated' function to signify that the model has updated. This is a reasonable solution for a very simple application with very little model data, but as the application increases in complexity, it does not scale, because there is no way for a view class that is binded to an object in the model to know whether or not that object has changed - instead, EVERY view class that responds to changes in the model must check the current value of whatever objects they bind to and see if there has been an update.
Obviously, a better solution is necessary. My question - does anyone have any ideas? Is there a way to use Flex's data binding in Flash? Perhaps there a better solution than data binding altogether?
Cairngorm In Flash CS3 (NOT Flex)
Hi,
I've been reading up on the Cairngorm architecture that Adobe recommends as best practice for devevloping RIA's in Flex.
http://labs.adobe.com/wiki/index.php/Cairngorm
I recently purchased Flash CS3 and want to find a way to implement Cairngorm in my upcomming RIAs that will be built in Flash instead of Flex. I've created my own version of Cairngorm that uses almost all of the features and classes described in the Cairngorm architecture.
The biggest challenge for developing a Cairngorm architecture in Flash is that the architecturerelies heavily on Flex data binding to update the view when there are changes in the model. As far as I can find, there are no such capabilities built into AS3. This leaves me with a few not-so-desirable options. I could write my own data binding classes, or try to migrate the data binding classes from Flex. Neither of these options seem very desirable to me.
For now, my quick soluton: each view class that can respond to changes in the model implements an "IBinded" interface that contains one function called modelUpdated. These classes register with a 'bind list' when they are instantiated, and any command that causes a change in the model also calls a function cycles through each registered view class, calling the 'modelUpdated' function to signify that the model has updated. This is a reasonable solution for a very simple application with very little model data, but as the application increases in complexity, it does not scale, because there is no way for a view class that is binded to an object in the model to know whether or not that object has changed - instead, EVERY view class that responds to changes in the model must check the current value of whatever objects they bind to and see if there has been an update.
Obviously, a better solution is necessary. My question - does anyone have any ideas? Is there a way to use Flex's data binding in Flash? Perhaps there a better solution than data binding altogether?
Flex Application: Cairngorm Or Ariaware
I didnt know where to post this but I think this should be ok. Im developing a flex applicaton (which i think most of you know what flex is by now). My question is which design method is easy and better to use. cairngorm or Ariaware framework. Both of them are a bit similar except from the viewhelper included in cairngorm and more. Please give your opinions and why.
Cairngorm For A Flash CS4 Guy
Hey guys,
I've recently been recruited to a new project. I'm replacing a Flex dev who started to use Cairngorm, but got booted from the team. The other members of the team are from more traditional web-dev backgrounds and haven't worked with the Flash player before. (One guy is trying to pickup Flex/Cairngorm to keep the project moving forward). So far as I can tell, the project is still early-enough where we could start over in Flash without losing too much work.
I've written about my background in more detail below. In short, I'm well-versed in object-oriented AS3 targeting Flash CS4. I haven't worked with Flex before, and as the Flash guy on the team, I need to provide leadership to decide whether or not we keep Flex/Cairngorm, or move completely to Flash. We're building a media-management app that consumes a RESTful web service and has a very thoroughly-designed UI, currently in Illustrator.
I'd love to hear any recommendations as to how best structure this. It looks like I'll be building the UI and the guy who's been deciphering what we have so far will be handling the web service calls.
My background:
I'm a one-man web app shop. I do some work with Python/Django, but spend most of my time creating object-oriented projects in Flash CS4. I generally work alone, doing both design and development. I've got a vague familiarity with Flex, but I've never really explored MXML or the mx package. I'm not an engineer by training - I'm a creative and a businessman with an intuition for programming. I have a general understanding of design patterns like MVC (mostly from the couple of apps I've built in Django), but my Flash work is usually an event-driven collection of a few dozen classes. As far as code architecture, I'm good about subclassing, using events, and marking the inner-workings of my classes private/protected. I don't usually worry about design patterns beyond that.
Please advise. Thanks.
Flex Reconnect Flex To Debugger Flash Player
I upgraded my OS (OSX) and Flex seems to have lost its connection to the the Debugger version of my Flash Player. I don't see an easy way to re-establish the connection. I've already directed the OS to open all .swfs in the debugger version of the player.
Cairngorm Microarchitecture
What does this mean "The Cairngorm Microarchitecture is a lightweight yet prescriptive framework"? What does prescriptive framework mean?
[Flex] Creating A Flash SWF And Using It In My Flex Project?
Hi there,
I recently got the demo for txeff and i was messing around with it. Quite cool, id consider a purchase but over 100 notes for some text effects is a scandal in my own meaningless opinion.
Anyways it had me wondering about something else. For example lets take a new Flash CS3 file containg a dynamic textField instance called "tF".
Is it possible to embed the SWF into a Flex project and dynamically populate the textFields propery?
Code:
[Embed(source="/assets/textFieldThing.swf")]
public var EmbeddedTextFieldThing:Class;
var myNewTextField:Sprite = new EmbeddedTextFieldThing() as Sprite;
//PS. Just wondered, can this be also done as Sprite(new EmbeddedTextFieldThing())? and what way is correct?
myNextTextField.tF.text = "I am trying to display this text in the embedded SWF".
addChild(myNewTextField);
This dont seem to work, it was worth a try though. Can anyone else give me some knowledge if this is possible or not. I find myself often using the API in flex when i could save alot of time in Flash IDE.
Cheers
[FLASH+FLEX] Call A Method In A Flex Swf From As3
Hello
here it is:
i have a flex file with methods inside and some as3 swf
The idea is to load the flex file in as3 swf, and when flex file is loaded, call a method from the flex file
here is the code process
Code:
var _loader:Loader = new Loader();
var flexAppli:URLRequest = new URLRequest("flexfile.swf");
_loader.contentLoaderInfo.addEventListener(Event.INIT, onLoadInit);
_loader.load(flexAppli);
and
Code:
private function onLoadInit(event:Event):void
{
var loader:Loader = Loader(event.target.loader);
var newSprite:MovieClip = new MovieClip();
newSprite.name = "LeFlexCharge";
newSprite.addChild(loader.content);
addChild(newSprite);
setChildIndex(newSprite, 0);
// here the method call
newSprite.mymethod(); //dont work
}
The problem is : when calling the mymethod from flex file, it does not work
So i did a trace on all elements in as3 file and i get an object like this
_MyFlexAppli_mx_managers_SystemManager
First question : What's this ?
Second Question : How to call my method ?
Thx for yr help
tofu
Actionscript/Flex 3 - Seeking Tutorial That Connects Flex With Various Architectures
I am looking for a step-by-step detailed tutorial that will show me how to connect the following technologies with my Flex Application (from installation to actual usage to understanding what each part does). My flex application needs to be able to save data from a datagrid in the database and retrieve it. All suggestions and examples are welcome.Thanks
# Presentation Layer
* Flex 3
# Remoting and web messaging technology Layer
* BlazeDS
# Business Layer
* Spring
# Data Access (Object-Relational Mapping)
* Hibernate
# Data Storage
* MySQL
# Application Server
* JBoss
# Build
* Ant or Maven
Flex Displaying Labels/Text Vertically In Flex 3
Hi All,
I have a chart in Flex 3 and am currently displaying the axis names using <mx:Label! I want to display the vertical axis name vertically, that is
p
r
i
c
e
instead of
price
I was wondering if anyone knew how I might be able to do this? Any help really would be greatly appreciated!
Thanks,
Derm
Flex Drop Alternate Labels From A Flex Bar Chart
Hi,
I have a bar graph in flex. i need to show labels on the x axis only after a definite intervals. actually this is to avoid overlapping of labels. for eg. if it is the 12 months shown on x axis, i need to show Jan April July etc. instead of Jan,Feb,March,April etc.
Any help would be appreciated.
Thanks
Ananya.
Flex Flex 3 Update 2 ( AS3 ) And Visual Basic 2008
Hello i am newbie for your forum . A lot of thanks for welcome.
I would to know about Flex and Visual Basic 2008 ( 9 Version with SP 1 ) because it is different with "fscommand" or "externedinterface.call"
I know that adding with shockwave in Visual Basic 2008 like old version of using object.
http://www.kirupa.com/developer/mx/flashvb.htm
But it is old version! I am using Visual Studio 2008 Pro with Service Pack 1 ...
I want to create swc with externedinterface or fscommand like MDM Zinc 3.x or Rapid applications...
Can you say me when your simple example for code?
I want to know:
- How do i exit an Application from Visual Basic 2008 while i click with externedinterface by Flex-Application.
Edit:
Flex Builder 3: Code:
Code:
<?xml version="1.0" encoding="utf-8"?><mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"><mx:Script>
<![CDATA[
publicfunction myAppexit():void
{
fscommand("vb_exit", "");
}
]]>
</mx:Script>
<mx:Button label="Exit" click="myAppexit()" left="10" top="10"/>
</mx:Application>
Visual Basic 2008: Code:
Code:
Public
Class Form1PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
AxShockwaveFlash1.Movie = "C:Dokumente und EinstellungenSnakeMediaEigene DateienVisual Studio 2008ProjectsWindowsApplication1WindowsApplication1myApp.swf"
EndSub
PublicSub AxShockwaveFlash1_FSCommand(ByVal command As System.String) Handles AxShockwaveFlash1.FSCommand
Application.Exit()
EndSub
End Class
2 Errors were outputs.. i can not try.. Please answer me for help!!
Thank you.
Best regards, SnakeMedia
Develop FLEX Applications, Without Purchasing FLEX Server
BIG news today, Mike Chambers has announced that the next version of flexbuilder (codenamed zorn which will be an eclipse plugin) will be able to compile mxml and Actionscript files into swfs, without having the flex server. There will still be things that you need flex server for (enterprise level features, no word on what these are just yet) but you wont need it for most of your flex swfs. This is a HUGE deal btw.
You can see the post here: http://weblogs.macromedia.com/mesh/a...zorn_requi.cfm
make sure you read through the comments, esp. my question and his answer.
Flex Flex Tile List Component
How to make the Flex Tile list component scroll the content continously like in Scribd ? The tile list does not scroll continuously, but it abruptly jumps and fits the content place holders in the viewable area.
Flex Dynamic DataGrid Creation In Flex 3
Hi All
Can anyone please suggest me a way to create a data grid dynamically in Flex 3.(I actually was want to create it thru Action Script.)
The data would come from the XML and the rows of the grid are also not going to be fixed. It will be dependent on the number of nodes in the XML.
The data grid will have 3 columns 1 containing a text field, and the rest 2 will contain small icons, all created dynamically.
It would be gr8 if some code related to that can be provided.
Thanks for any help that can be provided.
Vicky
Flex RawChildren Ruins Layout In Flex 3
Hey all!
I've been playing around with Flex lately, and having come from a pure AS3 background, I couldn't help but create some simple effects in there for fun. That's when I hit a snag. Now, with Flex, I'd have to use the UIComponents' rawChildren object in order to add widgets of DisplayObject types... fair enough. Problem is when I do that, the components stop obeying layout rules, transitions stop working, etc.
The best way to really demonstrate this problem is to see the project itself. Here's a link to the project source:
http://www.thurinusworks.com/public/problem_src.zip
In there I created a Panel component that has view states and transitions, and an Application that holds that Panel and houses a bit of actionscript to create a sparkly mouse toy effect. If you commented out all the script for the mouse toy, you'll see that the Panel centers on the Application as you resize the window, and clicking the 'Register' link would display a nice elastic transition effect between view states. When the mouse toy is active, the Panel position stops working correctly, and clicking on the 'Register' link would simply display the view state with no transition. It happens intermittently, but seems to guarantee happening after the first SWF launch, so if you don't see it happening, relaunch the SWF and it should screw up.
I don't know what's causing it to break like this. It's either my error or a serious bug in Flex, and I dearly hope it's the former... If it is, what must I do to fix it? If it isn't, is there a work-around?
Thanks for *any* help you can provide!
Best regards,
Jay
Flex Filling Non-Flex Objects In A Repeat
Filling non-Flex objects in a Repeat
Hi guys,
For our current project were trying to put as much as possible of the display list structure into mxml. Because that's more readable.
This of course also includes using Repeat's for dynamical parts.
But, we build some parts in Flash. Just little peaces for skinning.
(We publish those as swc and use them in Flex)
We can't of course just use this in flex, but we have the DisplayObjectWrapper from Mr. Grant to fix that.
But despite of this wrapper I can't change the properties of non-Flex components within a Repeat, in mxml.
A simple example:
HTML Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:text="flash.text.*"
xmlns:ui="com.gskinner.ui.*">
<mx:Script>
<![CDATA[
[Bindable]
public var texts:Array = ["a","b","c"]
]]>
</mx:Script>
<mx:Repeater id="r" dataProvider="{texts}">
<ui:DisplayObjectWrapper>
<text:TextField text="{r.currentItem}" />
</ui:DisplayObjectWrapper>
</mx:Repeater>
</mx:Canvas>
This gives the (compile) error:
"Unable to generate initialization code within Repeater, due to id or data binding on a component that is not a visual child."
I went searching but couldn't find much. Only that you can get this error if you use the DataGridColumn in a certain way in a Repeat.
Anyone any idea how to get this working?
Thnx
Flex How To Connect Flex App (View) To Controller
I have a Flex app with a centralized event controller. What's the best way to connect the app to the controller? Right now the View instantiates an instance of the Controller but the controller isn't aware of the view.
Flex How To Change The SWF I Have Loaded In Flex During Runtime.
Guys
I have a Flex application in which i have a SWF loader which loads a swf from an external Actionscript project.
I want that SWF file (from External AS project) to be modified when the user does some operation on the main Flex Application.... I mean i have to create some other objects on that SWF file.
Please help guys...
thanx in advance..
FLEX Rocks [would Like A Flex Forum]
This awsam new technology will deffinitely change the web programming!
So I think it deserves it's own forum.. ;-)
Flex Example Applications: http://www.adobe.com/devnet/flex/ind...?tab:samples=1
I did a little testing - and I am amazed with every single thing that I discover!
Integration of your custom Actionscript 3 classes is great (link: my background test).
Running A Flex App Outside Flex Builder
Hi all,
I've been working on a flex widget for a number of weeks and have just completed development and testing and want to upload the swf to a server! If I run the swf from flex builder it connects to the server fine and runs through the entire operation!
However if I try and run the swf from anyother location (I've only tried off a folder in my c drive and my desktop) I get an error connecting to the server?
Does anyone have any ideas why this is happening or more likely what I'm doing wrong? I'm copying the swf from the bin folder in flex builder and then pasting it to a seperate location and trying to run it! It runs fine by double clicking on it in the bin folder but won't run anywhere else??
Any help would be greatly appreciated!!
Thanks in advance,
Derm
Flex Flex Button Question
Very basic question for the flex people.
How do you get rid of that very annoying blue rect round a button when you roll over it ?
I've tried about every style property in the Flex doc.
Flex I Need A Window Class In Flex
Hi ! I'm trying to make an application with windows. I want to load buttons, text, pictures, etc in each window. and i want to let the user move the window, close it ... maybe resize it and maximize/minimize it ... And the most important: It must have scrollBars. Because my content might be larger than the Window.
Now ... i am using Flex and it has some nice classes but i didn't found anything like what i was thinking about. For example the mx.containers.TitleWindow is a nice window that has a close button and i can easily add Children to it, it has that scrollBar ... But i can't move it, i can't resize it ...
Do you know any class? Or should i make a new one that extends the TitleWindow? and add the things i want ?
Flex 2nd Flex RIA - QuickView Portfolio
I'm in the process of learning Flex and MXML. I decided to make a mini site to show off my work. All created in Flex Framework. CHec out more here. Give me your opinions, Thanks
http://blog.kreativeking.com/2009/01...lio-mini-site/
Free Flex 2 SDK Or Flex Builder 2
Am i correct in thinking you can only go so far with the Free Flex 2 SDK? And if you want to build something serious and efficiently you need buy stuff i.e Flex Builder?
I don't want to sound stingy and am quite prepared to pay for authoring tools. But don't want to buy things I don't need.
Flash Or Flex?
Is it possible to create Rich Internet Applications simply using Flash? I am thinking of delving into Flex but I don't think my apps would be nearly as complicated as their examples. As such, would Flash MX or MX Pro suffice?
Using A Flash SWC In A Flex App
Say I have a bitMap in my Flash library and I export it in a swc file. How would I reference the bitmap to get it to display in my Flex app.
I'm having trouble creating a shared library that can be used by Flash, Flex AS, and Flex.
In theory, providing Flex can access all items in a Flash swc file, can i just write a controller Class that you can pass arguments defining what kind of app the swc was being used in and it in turn would provide the different methods based on what app you are using?
Does that make sense?
Flex And Flash
I am trying the Flex trial and enjoying it so far. The code editor is superior to flash. Obviously I still love flash for the time-line editing and vector tools, so if this works out I plan on using both.
I have but one issue with flex (other than its built on eclipse
My issue: I make an object in Flash and put it on the stage, and give it an instance name. When I go back to Flex, I will do this.object.instanceName, and because the object has not been created via code Flex can't find the instance and will throw an error. For a lot of objects, this can get really distracting. Once executed in flash, it works fine, but when Flex keeps displaying many errors it can get pretty annoying.
I know an option is to make all your objects in Flex, but for really flashy websites this will take forever.
Is there any way to get around this? Maybe turn this off somehow?
Thanks,
NB
Is Flex AS3 Different Than Flash AS3?
Hi,
I've never installed or used Flex but I always assumed it used the same AS3 as Flash. However, I'm currently trying to help troubleshoot an AS3 project and a class is trying to import mx.core.SpriteAsset. I searched my entire system for SpriteAsset.as file but to no avail, and Googling it only found Flex-related articles.
So are there features of AS3 that are proprietery only to Flex? Will I be dead in the water trying to troubleshoot this project without Flex installed? Would I have access to all the Flex classes by installing the Flex SDK? Are there any other differences I should be on the lookout for?
Sorry, I'm quite confused here. Thanks for any help!
SEO And Flash/Flex
Hello all!
I was wondering if implementation of DDL(Dynamic Deep Linking see this site's links) makes search engines index sub-pages in flash. And I'm curios about some libraries/API's that enhance content indexing in Adobe Flash/Flex RIA's.
Thanks!
Edited: 09/12/2007 at 10:19:48 AM by ariel_ro
SEO And Flash/Flex
Hello all!
I was wondering if implementation of DDL(Dynamic Deep Linking see this site's links) makes search engines index sub-pages in flash. And I'm curios about some libraries/API's that enhance content indexing in Adobe Flash/Flex RIA's.
Thanks!
Flex To Flash -- Flash To Flex
I created a SWC in Flex. linked to it in Flash and my classes don't show up.
there's no error. nothing is visible. WTF?
How Do I Use A Flex Swc In Flash CS3?
My engineering team has used Flex to create a nice little swc for me to use inside of Flash CS3, but now I'm having trouble finding any documentation on how to actually import it. Placing it in the Components folder doesn't work, as it's not recognized by the Components window (either as an AS2 or AS3 swc). Is it even possible to use swcs from Flex in Flash? Thank you very much for the help.
-- Jeremy
Flash To Flex
Can someone please translate this Flash code into Flex code. I would be so thankful. I want to save text out a richtextbox id rte to a server. Then get the text back from the server and into the richtextbox. This is the Flash code:
var textValue = "";
function saveIt(eventObj:Object){
textValue = "textValue=";
textValue += rte.text;
_root.loadVariables("save.php","POST");
}
function getIt(){
_root.loadVariables("text/text.txt","POST");
var display:Array = textValue.split("=");
rte.text = display[1];
}
saveButton.addEventListener("click",saveIt);
getButton.addEventListener("click",getIt);
<mx:Button id="saveButton" x="97" y="231" label="Save"/>
<mx:Button id="getButton" x="97" y="275" label="Open"/>
Thanks,
JL
I Like Flash Better Than Flex
I like Flash Better than Flex . flex just complicate things ... more over i think all the uses around the world who are use to flash are going to stick with flash
Tell me what you think.
Flex And Flash, Flash And Flex
I've been going through the ActionScript 3 cookbook from O'Reily and the fist 30 some odd scripts are made in Flex builder 2.
I'm trying to convert some of the classes I've made into flash compatiple ones and am running into nothing but problems.
Here is the class code:
Code:
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
public class SimpleDrawingApp extends Sprite
{
private var _sprite:Sprite;
public function SimpleDrawingApp()
{
_sprite = new Sprite();
addChild(_sprite);
_sprite.graphics.beginFill(0xffffff);
_sprite.graphics.drawRect(0,0,400,400);
_sprite.graphics.endFill();
_sprite.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
_sprite.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
}
private function onMouseDown(event:MouseEvent):void{
_sprite.graphics.lineStyle(5,0,1);
_sprite.graphics.moveTo(mouseX,mouseY);
_sprite.addEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
}
private function onMouseUp(event:MouseEvent):void{
_sprite.removeEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
}
private function onMouseMove(event:MouseEvent):void{
_sprite.graphics.lineTo(mouseX,mouseY);
}
}
}
Here is the FLA code:
Code:
var drawingApp:SimpleDrawingApp = new SimpleDrawingApp;
and this is the error I get:
Warning: 1090: Migration issue: The onMouseDown event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'mouseDown', callback_handler).
Flex To Flash And Some More...
Good afternoon fellow flashers!
I've got this rather annoying problem that I hope someone can help me with.
I've slightly modified a flex script from Andre Michele to run in flash. I just removed some parts from the original flex script related to the flex document information. No biggie. It runs fine. Hurrah!
The problem occurs when I try to load this particular swf (B.swf) into
A.swf. Then, surprisingly the compiler start complaining:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Main$iinit()
It has been suggested to me that this error stems from the fact that the object has not been added to the display list. But I believe I have tried to do so after the swf has been loaded, with no luck.
Well heres the timeline script that generates the error (A.swf) :
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
import flash.net;
var ldr:Loader = new Loader();
var urlReq:URLRequest = new URLRequest("B.swf");
ldr.load(urlReq);
ldr.contentLoaderInfo.addEventListener(Event.COMPL ETE, loaded);
function loaded(event:Event):void
{
trace("LOADED")
addChild(ldr);
// also tried : addchild(ldr.content)
}
I've verified that the above script loads any other AS 3.0 based swf
But not this one.
Below is the script from B.swf in a simplified form :
// MAIN.AS
package
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.*;
import flash.filters.BlurFilter;
import flash.geom.Matrix;
import flash.geom.Point;
public class Main extends Sprite
{
private var output: BitmapData;
public function Main()
{
output = new BitmapData( 100, 100, true, 0 );
stage.addChild( new Bitmap( output ) );
stage.addEventListener( MouseEvent.MOUSE_DOWN, createExplosion );
stage.addEventListener( Event.ENTER_FRAME, render );
}
private function createExplosion( event: Event ): void
{
trace("createExplosion") ;
}
private function render( event: Event ): void
{
trace("render")
}
}
}
Well , that's it. I surely hope that someone can lead me to a solution to this problem.
Using Flash, Flex, AS2 And AS3 Together
Hi all,
We are currently developing an author environment for a flash GIS mapping application.
The author environment is developed in flex, so it uses flash 9, actionscript 3.
It would be nice to load the author environment on top of/floating above the flash application. Is this possible? As the GIS flash application only uses flash 8, AS 2.
As far as I know, it is not possible to load the flex application, strait away from the flash 7, as2 application (scenario 2) so we think of a as 3, flash 9 container clip (scenario 1) which then opens the flash map application and flex author.
Scenario 3 would also be an option. GIS application compiled to FL9, AS2 which opens the author.
The most ideal situation would be the GIS flash application on the root. (because of javascript API)
Which scenario is the best? If you have any other creative idea, please let me know.
See the attached jpeg scenery sketches for more clarity.
With best regards,
Steven van Rij
Flex Better Than Flash...BUT
Flex is a very powerfull tool; it imports things you use automatically and has a autocomplete function as you type and when you type "." AND when you hit ctrl + space; you dont need a fla just a main .as script
however when i debug it to see the trace messages(only way in flash) I get
[SWF] C:Documents and SettingsDiscipolDesktop est
esourcespictures grass1.swf - 2.648 bytes after decompression
.........a thounsand times this
[SWF] C:Documents and SettingsDiscipolDesktop estin
esourcespictu resgrass1.swf - 2.648 bytes after decompression
just floods the console output.... hot to disable these (or disable all such outputs and leave only my traces)
Flex Vs. Flash CS3
what's the difference between using Flex or Flash CS3 to develop AS3 projects?
Flash To Flex?
Are there any books or websites that have a good way of learning MXML and Flex if you are coming from Flash bacground??
Flash/Flex CMS?
Hello all,
I am new to flex and have started a product interest. I would like to create a flex cms system like this:http://clickbooq.com/gallery.html . I want to have a flex admin as well as a flex front end. What do I need to know(languages, data bases?). If you could help me out that would be great. thank you.
-ss
Flex And Flash
Hello
I've recently started learning flash/action script - my aim is to be able to create 'fancy'/animated/clean flash websites and I'm wondering if I should go for flex or flash (actionscript 3).
Can I do the same things with flex as with flash (it seems more familiar to me because I'm a programmer)? What are the pros and cons?
Many thanks in advance!
|