ActionScript 3.0 :: Combining 2 OOP Design Patterns?
Mar 9, 2012
I have a question on how to combine 2 OOP design patterns. First off, I created a MVC pattern that loads XML into the as3 classes. Now, I want to add another OOP design pattern which is the OBSERVER pattern. How would I call that in the MVC pattern?
To be more clear about this, I created a MVC pattern design of a widget that loads the data from the xml file. I want to input a graph bar observer pattern to the widget. How would i do that?
View 1 Replies
Similar Posts:
Nov 11, 2010
quick opinion question for anybody who cares to sound off. I am doing an implementation of the Command Pattern right now, and thought I might try defining my command structure almost entirely around interfaces. I am running into a problem however with empty interfaces. Let's say I have the following two interfaces:
[Code]...
View 12 Replies
Apr 7, 2011
I had experiences using Mate and Parsley. But for now, I'm using none.For instance, I'm using observer and singleton patterns like following.
RegisterView.mxml implements IRegisterAction interface
function onBtnRegisterClick(){
var action:RegisterAction = new RegisterAction();[code].......
This is my interface IRegisterAction.as
function registerCallback(customer:Customer ):void;
My question is "What additional benefits I will get, if I use a particular framework ?".
View 1 Replies
Jun 2, 2010
I'm going to write an application with the Air/Flex-Framework. I'm looking for Best Practise and general Design Patterns for designing software especially in Air/Flex. I have experience with this framework but never had the pleasure to write a piece of software from scratch.
For instance: I stumbled across lots of software written in Air/Flex with nearly infinity global vars Most of the software I saw was not object-oriented How can I pack the asynchronous method calls nicely?
I'm familiar with general design patterns by gamma. I'm looking more for advise in designing good quality software with Adobe Air/Flex.
View 4 Replies
Jun 22, 2010
Ok I am working on a program that allows you to customize cushions(very similar to say a T-shirt customizer you might find on the web.) . What I have just uses the standard color picker at the moment. I want to use images I have to color the cushions rather than the color picker.
View 2 Replies
Jan 30, 2011
I am interested in building a music visualiser using fractal patterns for my final year project. I have googled quite a lot on it and I know a bit about fractals, however I was wondering what software would be used to 'animate' the graphics. I know Java has a drawing API (AWT and Swing) - but probably no the best for the animation factor - on the other hand there is also Flash that has new capabilities within as3 to produce such an effect but if this app was to traverse into mobile development, Flash wouldn't be a great choice.
View 1 Replies
Jun 30, 2009
I'm making a website which consists of an intro and the main page. For all intensive purposes, let's just call em intro.fla and main.fla.I would like to combine the two somehow
1) Turn the entire intro.fla into a movieclip and place it at the beginning of main.fla PROBLEM: main.fla is substantially larger, and will bump up the load time for the intro.
2) Run the intro, and have it load the main page with a UILoader.PROBLEM: The intro doesn't Unload, causing problems with the main page. How can I unload the intro.swf from it's self?
3) Somehow combine both .fla's before I convert to a .swf. I think that I could eventually figure out how to make it work properly, but I'd rather someone tell me what the preferred method is and why.
View 1 Replies
Jun 4, 2010
I have three different fla/swf files, and I wish to compile them into one fla/swf for easy viewing.The problem is that they each have a different frame rate.
View 2 Replies
Jun 8, 2009
So here's what I want to do: I have a button, and I'm adding an Event Listener to that button to call a function. Now I want the event to be triggers when someone mouses out of the button AND someone is mousing out in the direction up.
-carbotech_button.addEventListener(MouseEvent.MOUSE_OUT, callLink); <--- does the job for Mouse Out
-carbotech_button.addEventListener(MouseEvent.MOUSE_UP, callLink); <---- does the job for when the mouse is moving up
So I need to make it so that both of these end up true in order for function callLink to be called. Is that possible, and if so, what would the syntax be?
View 2 Replies
Jan 5, 2011
I tried to combine two of Tony's great tuts.URL...I'm not sure what I did wrong so if you guys could have a crack at these and try to combine these.
View 2 Replies
Sep 13, 2009
Using AS3 code, is it possible to combine 2 graphics or more into one?
Example : combining a rectangle and a triangle to make a nice arrow?
View 5 Replies
Sep 8, 2011
i have a few onEnterFrame functions like 6 to 7 which I want to combine them into a single function. But it doesn't work after adding the function.
View 4 Replies
Apr 11, 2012
I have tried on google with no luck so before I spend anymore time on this would like to know if it's possible.I have 50ish very small 1 - 2 second swf files each one is like one slide. I would like to combine them all together into one flash file.Is this possible, as a note I don't have the original source files I have just been provided with the swf files.
View 3 Replies
Nov 5, 2009
1) I started off with one FLA that was scripted so the mouse controlled panning (horizontal and vertical). That works fine by itself. (image_panning_as3.fla)
2) I also have another FLA that was scripted so when you click the buttons a popup window will come in and play any SWF content. (test.fla)
I have tried to combine these files multiples ways. Putting #2 into a movieclip and #1 outside the movieclip. Tried to rewrite everything together with no luck. I am trying to do is combine the AS3 into one FLA (except for the main.as) or basically get the AS3 in #1 to go into #2 and have everything work (Pan around screen with mouse and buttons still activate popup).
View 1 Replies
Apr 13, 2009
I created several SWF files, now i want them to interact with each other So there is main SWF file lets call it: main.swf then within that file(main.swf) I would like to create buttons which will be calling other swf files for instance by pressing one button one.swf will be open by pressing other button two.swf will be open and so on. Then I would like to create buttons within one.swf and two.swf which will allowed to go back to main.swf.
View 3 Replies
Jan 8, 2011
i have the following code:
seatContainer.getChildAt(order.seats[i])
i want to add a child to this but it doesnt allow me, i can only add an eventListener to this.
how i can add a child to this without using an eventListener?
View 1 Replies
Oct 13, 2009
I am very new to AS and I'm just starting to grasp the essentials of how things are working... but I haven't got to the point to where I can write my own from scratch, so I kind of have to "Frankenstein" different examples into a working project. I found a great XML slideshow demo that I want to overlay with a masking effect, but I'm having some difficulty combining the techniques.
At the bottom is my original slideshow code. If there's anyone that can modify my code or at least guide me to what I need to do to make it work,
[Code]...
View 0 Replies
Apr 25, 2010
combine the following from Senoculars classes:
Transform.as - transform handles to rotate an mc
DashedLine.as - to draw a dashed line
ProgressiveDrawing.as - to move an mc from a - b
(Links at bottom)
I am basically trying to drag a mc onto stage. Rotate it using rotation handles, move it to another position and rotate it again. Then press play to watch it move from a - b, with a dashed line, and rotating from a - b.
Has anyone done this before or know of examples?
Senocular has combined DashedLine and ProgressiveDrawing in this example: [URL] and its been really great but now I am stuck trying to make the mc rotate. I have made my own crappy rotation handles but thought it may be better to use the transform (and convert somehow to as2) and store each rotation.
[URL]
View 0 Replies
Aug 12, 2005
I have two movies. The first one has a button that, when clicked on, loads the second movie using loadMovieNum. I'm want to be able to jump to a specific frame (i.e. 177) in the second movie when I click the button in the first movie. I'm using the script below to load the second movie: But it don't really work.
[Code]....
View 2 Replies
Oct 21, 2005
I've successfully loaded my xml and created three arrays to hold the news article date, title and text, using the following code:
HTML Code:
var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
[code]....
How do I firstly get my arrays into a textfield with the format date,<br> title,<br> story, and secondly how do I deal with that horrible datestamp to make a recognisable uk date?
View 1 Replies
Sep 30, 2006
How do i store the information from two seperate arrays in to a new array?
View 2 Replies
Jul 30, 2008
I just want to combine two objects and their properties together.
For instance if I have...
Code:
var appleObj:Object = new Object();
appleObj.type = "apple";
var orangeObj:Object = new Object();
[Code].....
View 5 Replies
Mar 14, 2009
I know there is a way to do what I am about to ask I just can't remember how.
The problem: combining onRelease or onRollOut in a single function.
It goes something like this:
button.onRelease , button.onRollOut = function() {
// do whatever
}
View 2 Replies
Mar 14, 2010
1. I'm wondering if there is a way to use the loader to load in a series of pictures from disk rather than URL. If so what is the code for this?2. Is there a way to combine variables to create one single variable. Again if so how can I do this?I have included the code I am working on to give some clarity on what I'm trying to do.
Code:
var h:String = "http://img163.imageshack.us/img163/5961/pngjoust";
var p:String = ".png"
[code]......
View 1 Replies
Oct 28, 2010
So, I need to make a slideshow that displays an arrow button on either side that can allow a user to navigate between four different swf files. The only specification is that the swf slide out as the new one appears. Could I do this in AS, or would I need some type of plugin?
I'm pretty sure I can make an empty movieclip and just load the SWF into it, but could I make the previous swf slide out as the new one appeared by doing that?
View 2 Replies
Jan 11, 2012
combining 2 XML files and loading them.
View 2 Replies
Mar 27, 2004
how to cimbine the prototype with onEnterFrame. I'd like to fade in some objects like this:
[AS]
mc._alpha = 0
onEnterFrame = function () {
if (mc._alpha<101) {
[Code]....
or can it be done without onEnterframe with an interval or something like that?
View 1 Replies
Oct 11, 2010
How to link one tween to another? I need to make a multiple tween because the movement of the object is not in one line.
Simply, this code wont do
Code:
var tween_bus_x1:Tween
var tween_bus_y1:Tween
var tween_bus_x2:Tween
var tween_bus_y2:Tween
tween_bus_x1 = new Tween(bus, "x", None.easeNone, 302.2, 304.6, 200, false);
tween_bus_y1 = new Tween(bus, "y", None.easeNone, 1.6, 62.6, 200, false);
tween_bus_x2 = new Tween(bus, "x", None.easeNone, 304.6, 316.4, 200, false);
tween_bus_y2 = new Tween(bus, "y", None.easeNone, 62.6, 103.6, 200, false);
It only display the second movement. How to trick this?
View 2 Replies
Apr 14, 2011
I'm trying to display a score in CS4 using AS2.0. The score is out of 14, so the display should read "1/14", "2/14" etc. I've got some code that scores correctly, but would like the text box to incorporate the "/14" which is static text. If I sit a static text box next to the dynamic text box, it doesn't align properly. I've anti-aliased the text (Bitstream Vera Sans Bold), but the alignment is still not reliable, even checking type spacing, correct Y position on page etc. The code I have currently is:
var score:Number = 0;
function addScore() {
score++;
scoreBoard.variable = score;
}
I thought by altering the last line to
scoreBoard.variable = score + "/14";
but this doesn't work, the "/14" does not display.I've also tried scoreBoard.text = score + "/14"; In this instance, the "/14" is not displayed when the score is zero, then displays "1/14" when the score is 1, but then displays "a/14" when the score increases.
View 5 Replies
Feb 3, 2010
I have a XML banner slide show component that displays images and can also display .swf files. Each image displays for 3 seconds. It works like a charm with the images. But if I put a .swf file in the XML the .swf file will only display for 3 seconds as well. Which I understand why. The problem is if I want my .swf file to have a .flv that plays for 30 seconds it will only show for 3 seconds.
QUESTION:how to pull the length from a .swf file that contains a flv file so I can use that duration time to replace the 3 seconds variable? I just need the duration time of the .swf file. I know what else to do to replace the variables.
View 15 Replies