Model-View-Presenter In Flash MX
Hi all,
Does anyone know of a simple example that uses MVP in OO Actionscript (using listeners).
I can find examples, but they're a little too complex to learn it from.
Thnx
ST
DevShed > Flash Help
Posted on: June 13th, 2004, 03:21 PM
View Complete Forum Thread with Replies
Sponsored Links:
Flash CS3 AS3 - Model-View-Controller Volume Knob
Hello,
I created a very basic volume knob component using the MVC design pattern. I am attaching the files and am hoping that any AS3 OOP gurus out there will critique the code. Any criticism or advice would be awesome! I've just been reading about the MVC pattern out of two books (ActionScript 3.0 Design Patterns, and Advanced ActionScript 3 with Design Patterns).
One specific question is am I using interfaces correctly?
Thanks and feel free to copy the files for your own use, if they can be useful at all.
-Mike
Source files: http://www.miketmoore.com/kirupa_source/volumeKnob1.zip
View Replies !
View Related
Model View Controller
Hi,
I almost understood the Model View Controller architecture, the only thing I still don't understand is how many view classes I need.
My main stage is 700px by 450 px.
At the top there is a windows like menu bar.
If the user choses a menu option on the left side of the stage a submenu is supposed to appear and onthe right the content movies that have submovies inside of them. In MVC every view is supposed to have its own controller. But if a menu option is chosen then who does the menu inform? The MainApplication view? And that one in return the MainApplication Contrroller?
Can controlelrs talk to each other?
So I have one view class for the main stage only? Or do I need one view for every subsection of the homepage (company, contact,etc)?
View Replies !
View Related
Model View Controller(MVC) Architecture
Dear board,
I am looking tutorial and help on designing an OOP site using the
Model View Controller(MVC) architecture. I have an idea of how the architecture works but I
don't know how to apply it to a complete projects with more than one page.
My knowledge is based on Colin Moock's Example of a digital/analog clock.
http://www.macromedia.com/devnet/fla...ontroller.html
I can see how this works for one single section of the homepage(i.e. the clock page).
In the above example there is one single stage that displays the clocks. So there is one
MVC architecture for this. Do I need a MCV architecture for every section of the
homepage/project? I am totaly confues. Would anybody have any experience in this?
View Replies !
View Related
Model View Controller Pattern Help?
I read a lot about the Model View Controller Pattern, but none of the documents explained in enough detail. And I'm still a little confused.
Basically all they did was define "The Model," "The View," and "The Controller." Some had examples but they were very obscure and pointless. So I'm still unsure.
So far the best implementation of the MVC that I can come up with is to instantiate all three parts in the main document class like this:
var model:Model = new Model()
var view:View = new View(model)
var controller:Controller = new Controller(view)
then having a getter property inside the view that allows the controller to reteive the Model.
as in (inside the controller class);
// Assume that the view is received through the constructor of the Controller class as "_view:View"
Now I would access teh model of the View in he contructor of the Controller.
This would give the controller contact with the Model of the View.
My idea so far is that the Model is like a bridge in between the View and Controller, that it's always changing.
Am I getting this right?
It would be nice if someone could give me a proper example of how I should do it.
Thanks,
View Replies !
View Related
Model-View-Controller Design Pattern
I just picked up Advanced ActionScript 3 with Design Patterns, and I'm very interested in the Model-View-Controller pattern. If any of you know what that is, I'd like to talk with you folks about it.
In my latest project I have inadvertently applied the MVC design pattern. My Model class has getters that return data to the caller (which is most often one of my View classes' methods) after validating and formatting it. People who document the MVC pattern typically assume that the data being passed in this way is of some kind of basic type, and that the getter is called infrequently. In my case, the Model class passes BitmapData objects (complex), dozens of times per second (frequent).
This raises an interesting issue. My Model object is unaware and independent of the View and Controller classes. But when the Model passes a reference to some of its data to the other classes, because that data is of type BitmapData, other classes can modify the data that's in the Model. I can prevent this by subclassing BitmapData and overriding its methods and properties, so that only an instance of my Model class can edit it. One could argue that my Model could simply pass a clone of the BitmapData object through the getter, but due to technical constraints I cannot expect that kind of code to run smoothly on most machines.
But is all this protection necessary? Is it the "responsibility" of the Model to prevent other classes from tampering with its data? If I give my Model instance to some other system, shouldn't I be bothered if the other system modifies the Model's data in this way?
View Replies !
View Related
[F8] Logitech Presenter 2.4 GHz And Flash
Hey all,
I am doing my initial reasearch on this topic for one of my clients. Has anyone successfully connected a Logitech Presenter 2.4GHz Wireless with any type of Flash? (browser, swf, exe... etc) I publish on OS X but my client is on XP.
I looked throughout Logitech's site and, of course, there isn't any mention of Mac support but with Flash, I'm guessing it shouldn't really matter. I will probably get access to an XP test laptop in a week or so but, again, I just started looking into this.
If you've reasearched this avenue before, I would love to hear some of the DOs & DON'T bothers.
Thanks all,
-K
View Replies !
View Related
How To Control Flash With Wireless Presenter?
Hi there, did anyone know how to control flash with wireless presenter or a PDA Phone? I have problem with this, i see many presenter are using wireless presenter to control powerpoint slides instead of standing near the pc/laptop to press next button with finger, i'm wondering whether the wireless presenter works with flash too? and i own a pda phone, i can treat it as a powerpoint remote presenter, but it can't work with flash, any help is much appreciated!
View Replies !
View Related
From Adobe Flash To Articulate Presenter?
I created an animation in Adobe Flash that is 120 seconds long, 4.0 FPS, at 29.8s. I have one scene created and about 20 layers.
However, when I export as a movie (.swf file) so that I could import from Articulate Presenter then view it in Articulate Presenter, it plays EXTREMELY fast (the whole 120 second animation in about 30 seconds. I've adjusted the FPS and the S in Adobe Flash several times, then re-exported each time, but nothing seems to work.
Then I tried to 'Publish" my Flash animation instead of export as a movie. However, the same problem still exists.
All I want is for my animation to play at a normal pace while in Articulate Presenter. Any ideas??
Thanks.
View Replies !
View Related
MVC Model: POST And GET HTTPService In One Model
Hi!
What's the best practice for this scenario:
I have an MVC-architecture, and I need my model to handle both POST and GET methods (ie. get AND retrieve data). My Model consits one actionscript class
I know that a class / file can't contain more than one HTTPService instance...
How would you solve this?
//Kenwio
View Replies !
View Related
Compositing Presenter Over Your App...
Everytime I take a look at the macromedia site of day there's often the talking presenter over the app background. Would like to know of any tutors on how to accomplish... Is it after effects, or is there some keyer ability in MX studio to assist ... Plus, what are the importer parameters that work best for speed, quality, best results. Are there server limitations also...
Thanks,
dvpjim
View Replies !
View Related
Powerpoint And Video Of Presenter
Is it possible to use Flash, or any other Adobe software, to merge a powerpoint presentation with video/audio of the speaker who used the ppt presentation? What I'm looking for is a way to present both online (streaming) and on DVD, a window where the viewer can see (and hear) the presenter (speaker) next to a window where the ppt slides change automatically (synchronized).
I've some accross another software, the Softv Presenter (http://www.softv.net/Public/presenter4.asp), which can do what I'm looking for. However, since I already have Adobe's CS3 Web, Design and Production Premium suites, I was hoping that I could use what I already have to accomplish my task.
Tor-Eddie
View Replies !
View Related
Problems With Logitech Cordless 2.4 GHz Presenter
the fact is that next week i've got a very important presentation and all my job made in flash may not be seen ¡f i don't make work this brand new Logitech Cordless 2.4 GHz Presenter which works with powerpoint but not with flash!! (not with .swf, .exe, I'v e tried everything)
please, any idea? thanks a bunch
dani.
View Replies !
View Related
Cant Tell When Merge Drawing Model Vs. Object Drawing Model
I keep drawing shapes on the same layer, overlapping them, and then trying to delete one of the shapes to cut a shape out of the first. This does not work automatically as Help says it does, I have to go to "Modify > Combine Objects > Union" to merge them, THEN I can cut my shape out. When is this supposed to occur "automatically"? How am I supposed to know what mode I'm in?
View Replies !
View Related
Cant Tell When Merge Drawing Model Vs. Object Drawing Model
I keep drawing shapes on the same layer, overlapping them, and then trying to
delete one of the shapes to cut a shape out of the first. This does not work
automatically as Help says it does, I have to go to "Modify > Combine Objects >
Union" to merge them, THEN I can cut my shape out. When is this supposed to
occur "automatically"? How am I supposed to know what mode I'm in?
View Replies !
View Related
Object Drawing Model / Merge Drawing Model
Recently I reinstalled Macromedia Flash 8, but then it was installed with the "Merge Drawing Model" instead of the "Object Drawing Model". How do I change this?
I've tried to read this, but it doesn't say exactly what to do;
http://livedocs.adobe.com/flash/8/ma...=00000486.html
Thanks
-JPAG
View Replies !
View Related
Power Point And Video Of Presenter In Same Window
I posted the below message on the Flash General discussion forum last week, but no answer yet. Maybe someone in this forum can help, or suggest where I can find the answer.
Is it possible to use Flash, or any other Adobe software, to merge a powerpoint presentation with video/audio of the speaker who used the ppt presentation? What I'm looking for is a way to present both online (streaming) and on DVD, a window where the viewer can see (and hear) the presenter (speaker) next to a window where the ppt slides change automatically (synchronized).
I've some accross another software, the Softv Presenter (http://www.softv.net/Public/presenter4.asp), which can do what I'm looking for. However, since I already have Adobe's CS3 Web, Design and Production Premium suites, I was hoping that I could use what I already have to accomplish my task.
Tor-Eddie
View Replies !
View Related
Flash Object Model
hi peeps,
just wondering if there's a chart of the flash object model - i've never come across one.
i used to have one (a big poster) of visual interdev on my wall, and it really helps with visualizing
anybody know if/where there is one?
View Replies !
View Related
Live 360 Flash Model - Is This Possible?
First off I'm looking to see if this can be feasbly done in Flash (Player 7/AS2.0).
I'm sure most of you have seen QuickTime object movies. If not take a look at Apple's virtual iPod.
I know how to do this in QuickTime with VR apps and also how to closely mimic that functionality in Flash. The killer question is, and using that iPod QTVR as an example, can you have that 360 degree functionality but also make the iPod itself fully functional, all in Flash? So no matter what angle you're viewing it at you can still see whatever is happening on screen in action; you can press play/pause and the iPod will repond, etc.
That is the question.
View Replies !
View Related
How Can We Rotate 3d Model In Flash?
Hi friends,
I have created a 3d floor plan using 3ds max , And my client has requested it to rotate the floor plan in flash, where the visitor can control the 3d floor plan withe mouse pointer and rotate in all the direction.
Now i have no idea how to do that? can any one help me out please??
View Replies !
View Related
Rotate .3ds Model In Flash
I want to import a .3ds model to flash and i want to rotate it as the user clicks around with the mouse. Just like you see here but instead of the square that is generated by flash, i want my own model:
HTML Code:
http://www.flashandmath.com/advanced/simple3d/index.html
View Replies !
View Related
How Can We Rotate 3d Model In Flash?
Hi friends,
I have created a 3d floor plan using 3ds max , And my client has requested it to rotate the floor plan in flash, where the visitor can control the 3d floor plan withe mouse pointer and rotate in all the direction.
Now i have no idea how to do that? can any one help me out please??
View Replies !
View Related
Every Week New Ringtone In Flash Model
I made a model in 3d Max. Its sort of a animated mobile phone. It is for a site. The mobile phone has to let the visitor hear every week another ringtone in .mp3 sound. Is there a script where I could send every week another ringtone to the mobile phone in dreamweaver so that I won't have to open that flash file every week and import a new ringtone. It is a littlebit difficult to explain.
I don't know what to do!!
View Replies !
View Related
Virtual Model Flash Apps?
I want to build one of those virtual model apps where you have a model of a person and apply makeup or clothes.
What I'm looking for is a pre-existing human body model that I can modify with AS. In the player, I want the user to be able to set the model's height and weight and have the body change size depending upon the settings.
I was looking at Poser's Flash support, but that seems to just export static models, where I want something that can be tweaked at run time.
Anyone know of any commercial or open source solutions like that?
Dennis
View Replies !
View Related
Model/Fashion Sites With Innovative Flash?
I am trying to find:
1) sites that feature Model portfolios, that are very well designed
2) .flas or examples of innovative flash interaction, that showcases models and fashion. for example: having a model in flash, and showing different outfits, and clicking to change their colors, etc. or perhaps showing the model in a 3d atmosphere where you can rotate her
thanks!
View Replies !
View Related
Overrideing The Flash Security Model For Local Swfs
I'm working on building a kiosk in flash that automatically downloads updated images from a remote server. I've implemented a shim, but I can't get it to work from my local machine to the remote server. I can only get it to work from one remote server to another...
code in the shim:
Code:
System.security.allowDomain("*");
code in the main movie
Code:
loadMovieNum("http://www.thedomain.yo/shim.swf",1);
//I obviously haven't disclosed the real domain.
when I've put the main movie on another remote server it works perfectly, but when testing it locally I get:
Quote:
Error opening URL "http://www.thedomain.yo/shim.swf"
all the swf's are published to version 8
any suggestions?
View Replies !
View Related
Chaos / Fractal Query: Is It Possible To Model The Lorenz Attractor In Flash (5)?
I am writing something for my new (non-commercial) website, which touches upon Chaos Theory. It occurred to me that maybe Flash could be programmed to model a fairly simple example of this, such as the Lorenz Attractor, which uses three variables to produce an inherently unpredictable graph, or the Lorenzian Waterwheel.
A good page depicting both, with example formulas, can be found at:
http://astronomy.swin.edu.au/~pbourke/fractals/lorenz/
Another page with Java Applet illustrating the Attractor can be found at: http://www.cmp.caltech.edu/~mcc/chaos_new/Lorenz.html (I found speed=50 about right)
Not only is the math beyond me, but so to is how to implement it in Flash. But I know there are some real brains here, so haven't given up hope yet...
The least help I'm hoping for is that someone can tell me whether or not it's possible to use Actionscript to model either of those systems [with particular reference to Flash 5].
Medium help would be to give me a pointer to a helpful manual or URL (for simpletons) that I could check out.
Medium+ help would be to give me a clue how.
Maximum help would be - of course - to do the Flash or Actionsript
business for me, if it appears simple enough (to you). At the very least I'd include a credit and a link on what I hope will be a fairly sparky website and not a damp squib, but by all means name your terms...
I am naively hoping the Attractor could be have some sort of user input start values, or that the Wheel could be made into an interactive movie, where the 'water rate' can be dynamically varied.
Comments gladly received!
Thanks.
View Replies !
View Related
Cannot Load Content (mixing Kirupa Tutorial And Flash PhotoViewer Model)
Cannot load content (mixing Kirupa tutorial and Flash PhotoViewer model)
I would like to load a swf file into another one...
like today I read here http://www.kirupa.com/developer/mx/full_site.htm
I would like to load photo viewer Model of Flash MX ... but even if in its preview it works, when I load it like a flash movie... it does not work well...
Can some one explain me where is the error ???
Thanks,
Marco
View Replies !
View Related
Cannot Load Content (mixing Kirupa Tutorial And Flash PhotoViewer Model)
Cannot load content (mixing Kirupa tutorial and Flash PhotoViewer model)
I would like to load a swf file into another one...
like today I read here http://www.kirupa.com/developer/mx/full_site.htm
I would like to load photo viewer Model of Flash MX ... but even if in its preview it works, when I load it like a flash movie... it does not work well...
Can some one explain me where is the error ???
Thanks,
Marco
View Replies !
View Related
3D Model Help
Ok i am making a site for a dental clinic y they asked me to make a 3d model of a mouth and with the mouse to move it so you can see the complete mouth, or with some arrows ( a controller )/.
so i as wondering if someone could help making it. or point to some tutorials..... to make it in flash mx
thanks.
View Replies !
View Related
3d Model Help
Ok i am going to be honest, i am making this site for a dental clinic, but one of the things that they asked me to do was a 3d model of a mouth..... that you can control and move in all directions with your mouse or with some arrows ( make a controller ) so you can see the complete mouth in 3d
but the thing is that i really don't now how to do it..... and i was wondering if someone could help me.... thanks....
View Replies !
View Related
360 3d Model
hello there,
I want to import a 3d model into flash and give him a 360 raise
how I can do that?
and what I should export from the 3d software?
a movie/sequence pictures?
and how should I'm,making the 3d view?
thanks allot
View Replies !
View Related
3d Model Help
Ok i am going to be honest, i am making this site for a dental clinic, but one of the things that they asked me to do was a 3d model of a mouth..... that you can control and move in all directions with your mouse or with some arrows ( make a controller ) so you can see the complete mouth in 3d
but the thing is that i really don't now how to do it..... and i was wondering if someone could help me.... thanks....
View Replies !
View Related
3D Model
I have a 3D MAX model. I need animations of this in FLASH. smooth video, animations. Tried just creating a movie in MAX but on FILE > IMPORT into FLASH the video looks shocking. I need it high quality and sharp.
Ideas ? advise ?
View Replies !
View Related
About The New Event Model...
Okay so you can set up stuff like this:
Code:
_root.Clip.onEnterFrame = function() {
this._x += 5;
}
but if I wanted to change a variable in my clip how can I do it? I tried putting this.Var += 10; but that doesn't want to work and putting Var += 10; creates a variable in the _root timeline. Any ideas?
View Replies !
View Related
3d Model Rotation ?
Hi,
Ok. I will try to explain this as simply as possible.
What I would like to do is create a 3d animation of a model doing a 360 rotation, render out the frames and import them into flash.
Then the plan is to have a horizontal scroller that could control the playback of these frames: Scrolling left would play the frames backwards - "spinning the model left", and scrolling right would play the frames forwards - "spinning the model right".
Im sure this can be done. Does anybody have a simple .fla that I could download just demonstrating a scroller controlling frame-playback?
Any help would be much appreciated.
Thanks
Chris
View Replies !
View Related
Texture To 3D Model
Can a bitmap be used as a surface for a 3D model? Can it be wrapped around? We have a graphic with our vendors logos on it that we want to spin around a "globe". Is this possible?
View Replies !
View Related
EventDispatcher Model
Does anyone have a good system for dispatching events, I saw that in as2 many people used a custom event dispatching class..There is an inbuilt one in as3. I also understand that one may often be extending something else and not easily
Code:
class extends EventDispatcher
so the IEventDispatcher needs implementing which im not sure how to do..
but im interested to know if I need a custom class like people used to write for as2..
thanks
View Replies !
View Related
My First MVC With AS3...trouble With Model
Hi all, been struggling with this, hoping someone can help. I've scratched my previous thread from yesterday and have started anew. One thing I found to be key was the thought process that design patterns are "meant to be guidlines...not rules set in stone." Very helpful advice.
Here's where I'm currently at:
FLA -> Document Class: Doc.as -> only instantiates ViewController.
ViewController instantiates:
1) views.mc_parent, available as an MC in the library
2) views.mc_output, available as an MC in the library
3) data.model
mc_parent has tons of moveiclips embedded in it, each with instance names, all unique, but all linked to the same class (mc_child).
Here's my Event Path:
1) Each mc_child listens for mouse over and dispatches a custom event
2) ViewController receives the custom event...
3) ViewController sets a private var to the name of the moused over item (retreived from evt.target.name)
What needs to happen next - where I'm stuck:
4) ViewController gets some data from the Model, using the retreived "selected" data as "what" data to get.
5) ViewController sets some Textboxes in mc_output to show the retreived data.
The data itself will be a big, named, structured object. Each node of the data object will equal the names of all of the mc_child's. So retreiving data will simply look something like this:
allData["mc_childName1"] = "some data1";
allData["mc_childName2"] = "some data2";
allData["mc_childName3"] = "some data3";
....etc....
selectedChild = "mc_childName2";
selectedData = allData[selectedChild];
Where I'm stuck (HELP!):
a) How do I "get" my custom, smaller piece of data to my view without sending the entire thing?
b) What does the Model look like? Is it two models (allData and selectedData)?
c) If the allData itself changes in some way (i.e. simply pulling some XML every 30 seconds), how will everyone else know - i.e., lets say by making a specific mc_child "blink" when data has been updated for a specific data node.
Obviously really struggling with how the model works in to everything.
View Replies !
View Related
1 Model, Several Views
Hey everyone
I guess this is a question about Design Patterns.
I have a class called Article. In this class I have 3 properties: id, bodyHeading and bodyText.
I have a design where I have to make the articles show in different layouts. Sometimes it's a full width article, sometimes it's has small fonts, and sometimes it only displays the heading.
But I don't want to build extra classes, like SmallArticle, FullArticle and so on, because I need to have a single and unique reference to my Article object.
How can I have one single model class show in different forms in Flash?
View Replies !
View Related
Benefits Of Following An OOP Model
Hi all,
I was curious what people's opinions are like regarding using an OOP model to design Flash applications. Does it truly make the design process easier? When you set out to make an OOP in Flash, do you model out all your objects before you even touch the Actions panel, or do you mess around with the actions panel to get a set of functions you like before putting them into their own objects?
Also, do you have any tips for keeping yourself in the OOP mindset? It was easy enough for me to use the principles of OOP when I was learning Java, but I always seem to totally lose track of OOP in Flash. It's strange, I don't even really think about things in terms of Objects, and trying to do so just feels so alien when the language doesn't force you to.
View Replies !
View Related
Navigating A 3D Model
I have a 3D model, and i can animate it, is there some way to have the object on screen, then press a navigation button and the model rotates in that direction?
I had a few ideas, like for example when you press the button it changes scenes, or keyframes to a new set of animation, but is there an easier and more efficient way?
Thx
View Replies !
View Related
Event Model In AS 2
Hello,
I'm trying to get a detailed understanding of the event model in Flash Actionscript 2.0 (working in Flash 8). My specific problem is that I'm creating nested movie clips and when the parent has (for example) an onRollOver event handler, it's child's onRollOver event handler is being ignored. I have no idea what might cause this. I've done a fair amount of web programming, and all of the other object oriented models I've worked with have had objects that allow for independent event handlers, regardless of position.
If anyone either knows and can explain, or else can point me to a source that explains, how the event model in Flash works in enough detail for me to understand the discrepancy I'm seeing, I'd really appreciate an assist. For further quantification I'll attach some code.
Attach Code
// create basic clip
var mc_Parent:MovieClip = _root.createEmptyMovieClip("mc_Parent",1);
with (mc_Parent) {
_x = 20;
_y = 20;
beginFill(0x0000FF,100);
lineStyle(2,0x000000,100);
moveTo(0,0);
lineTo(200,0);
lineTo(200,200);
lineTo(0,200);
lineTo(0,0);
endFill();
}
mc_Parent.onRollOver = function() {
//this._alpha = 50;
_root.oBroadcaster.broadcastMessage("broadcastEvent1");
};
//mc_Parent.onRollOut = function() {
//this._alpha = 100;
//};
mc_Parent.broadcastEvent2 = function() {
trace("parent");
};
// create child clip
var mc_Child:MovieClip = mc_Parent.createEmptyMovieClip("mc_Child",10);
with (mc_Child) {
_x = 300;
_y = 0;
beginFill(0xFF0000,100);
lineStyle(2,0x000000,100);
moveTo(0,0);
lineTo(100,0);
lineTo(100,100);
lineTo(0,100);
lineTo(0,0);
endFill();
}
mc_Child.onRollOver = function() {
this._alpha = 50;
this._parent._alpha = 100;
_root.oBroadcaster.broadcastMessage("broadcastEvent2");
};
mc_Child.onRollOut = function() {
this._alpha = 100;
};
mc_Child.broadcastEvent1 = function() {
trace("child");
};
var oBroadcaster:Object = new Object();
AsBroadcaster.initialize(oBroadcaster);
oBroadcaster.addListener(mc_Child);
oBroadcaster.addListener(mc_Parent);
View Replies !
View Related
Any One Help Me In My Menu Model
Can anyone help me to create a menu like in the below :
http://www.newezra.com/archive/blueboxdigital/
In this link they have created such a good type of Flexible & attractive Menu for Profile,solutions,process etc.,
If any tutorials or methods/lesson websites are avialable for that ?? ?
cheers
sundaram
View Replies !
View Related
The Mvc Model And Mc Events
I've just started with OOP in AS2 and have gone through moocks book covering the subject. I've come to the point where I want to begin doing my own stuff and have caught myself up on an annoying detail concerning using the mvc design pattern and applying simple movieclip events to instances. For the sake of simplicity I've created a movieclip with a drawn rectangle in the view object. I'm attempting to catch an onPress event with that and send it to the controller object which in turn just traces the event. Here's the code for BarView.as:
import util.*;
import mvcbar.*;
import mvc.*;
class mvcbar.BarView extends AbstractView {
private var crossbar_mc:MovieClip;
public function BarView (m:Observable,
c:Controller,
target:MovieClip,
depth:Number,
w:Number,
h:Number) {
super(m, c);
// Create UI.
makeBar(target, depth, w, h);
}
public function defaultController (model:Observable):Controller {
return new BarController(model);
}
public function makeBar (target:MovieClip,depth:Number,w:Number,h:Number): Void {
crossbar_mc = target.createEmptyMovieClip("crossbar_mc", depth);
// Store a reference to the movieClip.
crossbar_mc = target.crossbar_mc;
/**
* Rectangle drawing code comes here
*
*/
crossbar_mc.onPress = crossbar_mc.addEventListener("onPress", getController());
}
public function update (o:Observable, infoObj:Object):Void {
var info:BarUpdate = BarUpdate(infoObj);
}
}
----------------------------------------------------------
...and there's an onPress function in the BarController object instace waiting to be called, but with no success. Is there a better routine to go about using the mvc model with movieclip events? All I have stumbled upon is attaching components and receiving calls from them.
View Replies !
View Related
Any One Help Me In My Menu Model
Can anyone help me to create a menu like in the below :
http://www.newezra.com/archive/blueboxdigital/
In this link they have created such a good type of Flexible & attractive Menu for Profile,solutions,process etc.,
If any tutorials or methods/lesson websites are avialable for that ?? ?
cheers
sundaram
View Replies !
View Related
|