ActionScript 3.0 :: Model View Controller Simple Image Load
Jul 25, 2011Here I want to load an image. The arrangement produces no errors and no results. I'm really trying to get my head around this design pattern.
[Code]...
Here I want to load an image. The arrangement produces no errors and no results. I'm really trying to get my head around this design pattern.
[Code]...
I often see very different implementations of the Model View Controller Pattern, and completely understand that you should adapt and use what fits your needs the best, but I was wondering what would be the advantages/disadvantages/best practice of keeping simple game logic in ether the controller or model? In essence which is the correct way I should be doing this? for this simple example the player receives damage and I have listed three possible ways of dealing with it:
[Code]...
I am preparing a document for a project. The project's backend is developed in Java, frontend is adobe flex.
I am not sure about the correct way of describe the project in Model-View-Controller way.
For Model layer: Using Hibernate Java beans to implement all the business logic and persistence? For View Layer: Using Adobe flex send post or get request to Controller layer, and get respond in XML format. For Controller Layer: Using Java servlet to handle requests from Flex client?
I'm currently using RobotLegs with the Presentation Model pattern to develop a Flex 4 project. I understand that all business logic related to a View resides in the Presentation Model associated with that view, however, I am confused when it comes to View specific logic.For example, I have an indicator that needs to be positioned relatively to list items depending on which list item is selected. Is it acceptable in the Presentation pattern to put the logic that will position the indicator in the View and simply have that logic run in reaction to a selectedIndex property changing in the presentation model?The reason I am considering this is that since the Presentation Model does not have a reference to the view it is difficult to come up with an ideal solution for manipulating view components.
View 1 RepliesI would like to implement the MVC pattern to an existing Flex project.I want to separate out the controllers and models from the views. They currently all live together in large mxml files.My question is, should httpservice requests be in the model or the controller? What sort of advantages/disadvantages would there be to either?
View 3 RepliesI cant load an image from a class.I have main.as which calls Classplayer.as Classplayer calls ClassMisiile.I cant load an image from ClassMissile .I can load the image in Classplayer and dont know why the image in ClassMissile doesnt appear and it is spelt right and in the correct directory.I dont get an error and the functions work but no image.
[code]...
I am trying to find a stand alone flash player/controller to play flash movies on my own computer (windows xp) ideally it would have the usual back stop forward controllers etc and I would if possible be able to change the veiw pane background colour.
View 1 RepliesI have a Collada (.dae) file that I found on Google's 3d Warehouse. Using Away3d, I'm able to load the file and display it on my view using the following code:
var object3d = Collada.parse(FooXML, { material:"white", x:0, y:0, z:0 });
view.scene.addChild(object3d);
The problem is that it's just floating out in space and no matter how I adjust the position via .x, .y, or .z, it never moves from its spot. I'm using Flash cs4 and the latest stable release from Away3d.
I need a simple image gallery to load when you click a button. I've tried shadowbox but have had absolutely zero luck. I'm not sure how to load it from a flash file and I know there is work that has to be done outside of flash like in the root folder. All I need is for a simple image gallery, nothing fancy, to open when I hit a button. how to use shadowbox in lamens terms or knows how to easily script a gallery that would be amazing.
View 2 RepliesI need a simple image gallery to load when you click a button. I've tried shadowbox but have had absolutely zero luck. All I need is for a simple image gallery, nothing fancy, to open when I hit a button.
View 9 RepliesI'm trying to create an asp.net mvc controller method that will return an image generated by a POSTed bytearray. The post is coming from Flash and has the request header: "Content-type", "application/octet-stream" (although this can be changed if needed).[URL]
var header:URLRequestHeader = new URLRequestHeader("Content-type", "application/octet-stream");
var jpgURLRequest:URLRequest = new URLRequest("jpg_encoder_download.php?name=sketch.jpg");
[code].....
I have an external sound controller that plays 10 tracks. The current way I load the sound controller is with LoadMovie and I do it on the last frame of the movie that is my actual website. However, this slows my whole site down significantly, because when I press stop on the sound controller...everything is at the speed I want it to go. What is the best way to go about preventing this slow down?
View 2 RepliesI have an external sound controller that plays 10 tracks. The current way I load the sound controller is with LoadMovie and I do it on the last frame of the movie that is my actual website. However, this slows my whole site down significantly, because when I press stop on the sound controller...everything is at the speed I want it to go.
View 2 RepliesSo I'm not 100% sure if it's possible, but what I'd like to do is take a model that someone has created for a game, say in Blender or something similar, in various formats, and from that create an image to show on a website. Are there any Java libraries around? Java3D maybe? Or even something in Flash? Ideally you'd be able to rotate the model in some embedded flash app, but I'd settle for a plain old image.
View 2 Repliesim very new at papervision3d, i know in order to display a .DAE model i use this
[Code]...
But how can i do in order to use VRML models (.WRL).
I'm coding a image viewer application for tablets using Adobe Flex 4.5. Basically, I have a list with a custom item renderer that renders the images in the list. I have set up the image size to be the width/height of the tablet device in portrait (600x1024). This way, only one image can be seen at one time. The problem is that when the device orients to landscape, this design obviously screws up. My question is how can I get it to change the width/height of my images automatically when the orientation changes such that only one image is shown at a time?This is my list:
<s:List width="600" height="1024"
id="imageList" dataProvider="{data}" itemRenderer="{inlineRenderer}" click="imageList_clickHandler(event)"
verticalScrollPolicy="off" useVirtualLayout="true">
[code]....
This is the item renderer:
<s:Scroller width="600" height="1024">
<s:Group>
<s:Image source="{data.imageurl}" width="600" height="1024"
contentLoader="{FlexGlobals.topLevelApplication.imageCache}"/>
</s:Group> </s:Scroller>
I'm new to FLEX.I've a requirement where i do have to load the data into Class Based Model(VO) from an Employee.xml which has got employeeName,departmentName,address & projectId tags.
View 0 RepliesI'm trying to find out how to make a simple image gallery which changes image upon a mouse click on a button, when a button is pressed I want the image to slide in from the left into the viewable area and then when another image is selected I want the previous image that was viewed to remain in the screen and then the new image slide across over the top to replace the image.
I can get the images to slide across from the left upon a mouse click however I can't change the layer order so if image 6 is viewed and then I click to see image 1, the image will slide into place however it will be below image 6 so therefore not viewable.
I don't have an example of what I'm after but I hope my explanation was good enough, I've seen this been done in javascript but I have to use flash and am unable to replicate the effect I'm after
I'm trying to create a simple image player that tweens from one image to the next every 5 seconds. The data is being pulled from xml.
So far, I have managed to load the image onto the stage, but am now stuck as to how to get it to remove the child showing, the add the next child every 5 seconds.
My Code:
Code:
var tweenTimer:Timer;
var imageLoader:Loader;
var xml:XML;
[cod]...
i am loading image frm xml to flash i want that image in 3d view.
View 0 RepliesIs there a way to load and view a pdf in flash?
A client wants a page with a dynamic pdf gallery. No problem, but can I show pdf files swf documents? Can't find an answer in official docs and googling..
There's this cool site [URL] it has great image views, was wondering, how do they do that scrolling before and after effect? I am not too great at scripting, but would like to learn, seems great for portfolio presentation.
View 1 RepliesI have a text field but I want to put in an image in the text field. It will not let me load it up so I can view the image on flash.
I have it set like this:
[quote]
background.htmlText = "<img src='http://localhost/background.jpg' />";
[/quote]
Every time I view it, it doesn't give me an error or anything but it will not load the image.
i need to load a 360 view photo in my swf file.. im using the following code but i dont know if i need something else as it is not loading at all..
_root.container.loadMovie("terrace-360.mov");
As it is said here: [URL] "If you do a Google search today for "MVVM and Flex", the first post is by somebody who claims that MVVM is not a good fit for Flex. I couldn't disagree more. Out of the box, the Flex framework makes it much easier to implement a Presentation Model than similar MVVM implementations in Silverlight. That is not to say that there aren't good third-party libraries that make it easier in Silverlight, but without any help, it is easier to do in Flex." So MVVM as LOGICAL CONCEPT can be implemented in both but the way it is implemented in Silverlight requires more Plumbing than Flex.
What prevents Silverlight MVVM to be implemented like Flex ? Doesn't Silverlight have same capability in event system to do the same? If yes why does Silverlight do things more complicated what's the advantages then ? Is it about using Class Interfaces which are more strongly typed? What are the disadvantages also ? For example as for implementing MULTIPLE VIEWS for 1 View-Model does Flex implementation make it also more obvious?
Flash will ONLY load when it becomes into view on the screen For example, it won't load a Flashmove that is at the bottom of the page INSTEAD: it will ONLY load when that part of the screen comes into view
- Older Flash, ver 7 and below, this isn't a problem
- Newer Flash, ver 8 and above: problem
Fk says my last login was 3/23/2006! So I'm rather rusty! All I wanted for now is to drag an image and update the view on release. So, I have two frames:
[Code]....
When I play, it starts and stops dragging nicely. But it will not advance the frame. If I try something else like getUrl, that works fine too. gotoandPlay does nothing as well, though. What am I missing? This is Flash MX2004, as2.
There are panorama viewers available in flash that basically just scroll a flat image from side to side like this: [URL]. I was wondering about the possibilities of a flash viewer that would also warp an image so that you could view a 360 image and then be able to look straight up and down also since the image is mapped to the inside of sphere. Here is an example in a java viewer that warps the image: [URL]. I can create a shockwave 3d pano using director but I would like to have a flash viewer. It must be hard or impossible since I have not seen one available yet in flash.
View 2 RepliesI'm all done working on my gallery for my website.I have one last question: Now that I have a working thumb gallery, when I look at my scene there is no main image that pops up until you click on one of the thumbs.Is there a simple action script I can add so that when the person opens or load the page the very first image of my thumbs can pop up automatically?
View 1 RepliesI have a flex 3 application that creates an Image from a canvas which the user draws on. I use the ImageSnapshot class to create the image
var imageSnap:ImageSnapshot=ImageSnapshot.captureImage(myCanvas);
var imageByteArray:ByteArray=imageSnap.data as ByteArray;
I want the user to be able to print or save the image. I can use the following code to print the image but flex does not provide good control over printing across multiple pages
var printJob:FlexPrintJob=new FlexPrintJob();
printJob.start();
printJob.addObject(myCanvas, FlexPrintJobScaleType.SHOW_ALL);
I would like to display the image in a browser window so that the user could print it using the built in browser functionality or right click on the image and save it. Can this be done without requesting server side code to do it?