My problem is that when I try to pass an object from the navigator.pushView(view, dataobject), I can't figure out how to access the dataobject from actionscript. I can access {dataobject.property} from MXML easily, but I want to set a variable in the new view to the passed dataobjects property.
I have a remoteobject class that handles all interactive with my remote data service. each time a call is made the dataservice checks that the user has a valid session. if they don't it won't run the requested method and it returns a fail. I can capture this fail in the fault handler. What I want to do it if it happens is push the login screen to the user.I have tried the following
var navigator:ViewNavigator; navigator.activeView.navigator.pushView(views.LoginScreen);
But this is not working and fails with Cannot access a property or method of a null object reference. which makes sense. so my question is how can I get a reference to the current running view navigator object and push the view?As requested here is the full remote object class
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.
I have one .mxml file (the Application) with a ViewStack (with 4 views) and a ControlBard, obviously I can change the views with it, but what I want to do is: in view #1 I have an image which I want to convert to a "hyperlink", so when I click it I go to View #2, is this doable? Also I would like to pass somehow some data (like a String) to that View #2 (lets say the it's a user avatar I click so I want to go to the second view which will show me his profile, that's why I need his name/id).
I'm about to have to write a web page/app that will serve the agenda for circa 100 people on a page. One line per person, one column per day with 3 clickable zones in each cell. In HTML, the page is way complex for the browser to load quick and there is no possibility to click on a border between 2 cells to for example split an event that spreads among several cells. So I search an not too overkilling technology to render this kind of view. I begun with a PHP generated HTML page but the number of elements in the page make the mouse move jerky.
Moving to JAVA would give me better performances regarding the reuse of the generator of the view but it will still be an HTML page. So, here is my question: do you think that going forward with JAVA and its graphical capability is the simple solution or is Flash a better option for this part of a Web App? I'm afraid of the code I'll have to write in JAVA to handle the GUI presentation as well as the events generated by the 1000's cells plus borders of the page. In Flash, the graphical part seems simpler even if the actions handling is still huge.
I am wondering how to make a 360º view bubble, like they use for Google Street View, but have no idea how to go at accomplishing this task... i have the string of photos that i attached in photoshop(so that if you connected the left to the right it would be a full 360º view).
I have a PresentationModel AS class that holds all the values used in SomeView.mxml. The entire class for the model is bindable, and the model property in the view is also bindable. However, I am unable to inject the model into the view using the PropertyInjector tag:
- INFO: Data binding will not be able to detect assignments to model MainEventMap.mxml <EventHandlers type="{FlexEvent.INITIALIZE}">[code].....
I am using Flash CS4 AS3.. When I open my browser "Internet Explorer 7" it opens normal. But When I open a link using the following Flash code it opens half in length and half in width. I need to click on "Maximise" button to view in full. How to solve the problem? It is our Intranet link.
in flash, I encounted a source file that is cropped and I cannot move it, is there some sort of cropped view in flash I dont know about? I cannot find anyinformation about it, it has rulers displayed as far as I remember.
Basically you cannot move in the file to edit anything viewpoint wise, everything outside of the movie area is invisible and not there? As if cropped.
Does there exist a Flex view component that you could just pass it a custom object with all public fields/properties that it could reflect over and produce a basic UI view using flex components. Is it possible to use something like the Spark DataGrid with one item laid out vertically. It would only have to support:
apologies if this question doesn't seem very clear, i'm finding it difficult to describe what i mean.can i make object move 'out of view' in a movieclip?for example, in the same waya movieclip can move offstage, i'm trying to find a way to make the content of a movieclip move out of view to the side but within the scope of the movieclip.so if i have a square movieclip size x=100 y=100 with a circle size 10 in the centre, i'm trying to make it so when my circle moves to the left more than the size of the movieclip it starts to move out of view.another example would be if i had a character on a television (the screen being the movieclip
I have a (flex) app that, on the click of a button, resize a div (in javascript) at the bottom of the page and shows your position in google street view in it.
The things is that if I open the browser at 80% of width, click on the button and then maximize the window, the div won't take 100% of width. I have a function that his being called 'onResize' on the body tag of the page, but it doesn't seems to work. Here is the code :
function handleResize() { document.getElementById('streetviewDiv').style.width='100%'; } ... <body onResize="handleResize()">
How can I achieve the auto-resize of the street view? There must be a specific id for that object so that we could get it by javascript, but I haven't found it.
I'm working on a project that the user navigates around by clicking on icons in 3d space.When a user engages one of these icons, the camera should pan and zoom so that the selected icon appears in the center of the screen at its original height and size (this is so when the 2d overlay is created over the icon, that it is the same size as its 3d counterpart.My question is how to calculate the size a rendered object in a 3d view, I should mention that this is using the Alternativa 3D platform.So there's a camera at (x1, y1, z1) with a FOV of f, pointing at an icon at (x2, y2, z2), all being rendered in a view of dimensions w and h.
In a game me and a friend is creating, the levels are stored in MCs.In the level MCs there are several other MCs that the player should be able to interact with.
This means the objects in the levels need a stage reference.I can place all the objects manually and pass the stage ref in the constructor of the object's class, but this is a pain when the levels are going to be pretty big.
Is it possible to make sure that flash always passes a stage ref to the object even though it's not placed there by code?
In a game me and a friend are creating, the levels are stored in MCs. In the level MCs there are several other MCs that the player should be able to interact with.
This means the objects in the levels need a stage reference. I can place all the objects manually and pass the stage ref in the constructor of the object's class, but this is a pain when the levels are going to be pretty big.
Is it possible to make sure that flash always passes a stage ref to the object even though it's not placed there by code?
I have started learning flex 4 and I got myself thinking about how to change views. So I have a question what do people usually use - states or views (ViewStack). The type of web application I am making, can use both, but what do developers use in big projects or maybe they use non of the mentioned before?[code]...Best view architecture in it?
I want to create log file for my flex application. That is the file should contain all the trace prints in it when I run my flex application. How can I configure flex to do this?
We used to write our UnitTests with FlexUnit and we were just testing our model. Now we want to test the view too. Before i run my tests i create an instance of my view and my model to test the stuff. When i try to access the view i get a null pointer exception. If i add the view to the displaylist it somehow works - even if i remove it from the list right after adding.it looks something like this:
var myView: MyView = new myView(); //myView.initialize(); will throw error Application.application.addChild(view);[code]..............
I'm developing a flex mobile app. I've declared a Titlewindow which contains the alert message following the example of "TourdeFlex". And I failed to navigate to a new View after clicking YES button.
<fx:Script> <![CDATA[ protected function some_handler():void {
[code]....
This code can be successfully compiled but it was wrong during runtime:Error #1009: Cannot access a property or method of a null object reference.
How can I refresh view after a certain event? I have a view which contains multiple groups. I want to show or hide some groups. onCreationComplete() or initialize() method works only at the beginning of the view creation.
I would like to list all network shares but have no idea where to even begin my search, I assume that it has something to do with Samba etc., but really some guidance would be very useful.
I will be using Adobe AIR 2.5 - so I assume I have access to that sort of information, though I will be using the PlayBook from BlackBerry to access the network which has a full AIR implementation.
I'm loading an image from an async database in every view of my app. I'm using a view transition in Pop/PushView to change between views.Problem: The image loads after the ViewTransition is complete, instead of before.
And the code:
private function NextView():void { selectStmt = new SQLStatement(); selectStmt.sqlConnection = conn;
Here's the deal:I have an image and a button on my mobile app's homeview. I apply an animation to the image by pressing the button. That works great. PROBLEM:I want to add a view transition that pushes to the next view after the animation completes.CODE:
I need to convert a lot of stuff in my profession - so I'm building a conversion tool for my phone with some of the conversions I use a lot. Now, I want to be able to build this properly. So far, here's my code: