Actionscript 3 :: Using PreventDefault For A View?
Jan 26, 2012
I've created a simple TabbedViewNavigatorApplication. Two of the tabs are going to send text and email, respectively, rather than load a new View. So I need to prevent the default behavior of pushing the new View.
Documentation says a view can cancel a navigation operation by canceling its FlexEvent.REMOVING. However, there apparently is no such Constant for FlexEvent. There is, however, for ViewNavigatorEvent, as described farther down on that first link.
So here's what I've got, but I neither see the trace statements nor am able to stop the navigation:
Trying to prevent the application from shutting down when clicked the X button, it still closing but the AIR process is running in the task manager. What wrong with the code?
I am working with flex's datagrid. I have a DataGridColumn defined as the following, where labelFunction would allow me to display a custom text. I am also using a itemEditEnd handler on the grid to manipulate the entered data for this column. The purpose is to take the user input and split it then store the result in different properties other than "fixedValue". My problem with this approach is that I can't find a way to prevent assignment to the fixedValue property (which doesn't exist).
And using event.preventDefault() in the itemEditEnd handler would stop other events from happening like changing the row from edit mode to the view mode. My question is that if there is other way to achieve the same thing, or a way to just prevent the assignment of the "dataField" data. I am using the dataField to identify the column I am editing. Leaving it null might not be an option.
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'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 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 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.
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).
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.
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.
is it possible to view the whole timeline at once. I can see about 200 frames when the option is set to "tiny" but say I wanted to see 2000 frames all at once is that possible?
ou How can I set the default view of SWF file?? when i compile it in FLASH IDE, the default view would be 100% but when I click the swf file the default view is Show all.. you can see this when you right click the flash player..
i have a webpage created at http:[url]... and i can see the scrolling text on the right but someelse has viewed it and they cannot see the scrolling text does anyone know why.
I have embedded a swf file into a html web page, upload the swf file and index.html into the same folder on the server. But, nothing is being displayed when I go to the URL.
We recently upgraded to CS4 and this morning I had to put a file together for a meeting, in a couple of hours time. When I viewed the uploaded files for the first time it asked me to install Flash Player 10, which I did, but even afterwards I still just got a blank page.At the bottom the page tells me it is transferring data from [url]....? Eventually this stops but nothing happens on screen.
This is the same on Firefox and Safari on my Mac, and IE7 on our office PC.I have checked all of my paths etc in the code to the expressInstall.swf and swfobject_modified.js but they all seem correct...I have the Scripts folder with the 2 above files within the same folder as my index file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html[code]..........
How do I view code in Flash CS4? I am wondering if it's even possible but I am new to Flash so I guess anything is possible, haha. I need to fix my actionscript and this is one of the ways I was told to do it was to look at the code first.
I've had Flash CS4 for a while but never been able to use Actionscript 3 as any images dragged to the stage just disappear -- but of course are there when you preview the movie. I've reset the program, tried changing all around the views and resetting preferences
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 am very new to actionscript3/flashbuilder and I'm trying to do something simple like pass a value from one view to another view. I worked out all my syntax errors, but I am still getting a NULL error (TypeError: Error #1009: Cannot access a property or method of a null object reference) Even though I have the values hard-coded in for testing. I have 2 views, and when I press a button, it is supposed to pass a value to another view which then displays the passed value in a label.
Here are my 2 views: view1: <s:View xmlns:fx="[URL]" xmlns:s="library://ns.adobe.com/flex/spark" title="view1"> <fx:Script> <![CDATA[ var value1:int = 1; [Code] .....
I have a client who wants to launch pdf's in a flash site. I've looked at the now unsupported FlashPaper and it or something like it would probably do the trick.
I've tried loading the FlashPaper swf externally into a MovieClip container on the stage but I can't figure out how to adjust the size of the FlashPaper swf to properly fill container (I know there's instructions on how to do this in AS2 but I'm working in AS3).
If I change the size of the loader before adding it to the stage it just stretches the swf. Does anyone know how to manipulate FlashPaper swfs?I looked at iPaper but I can't see anywhere that it creates swfs that I can load into my MovieClip container.
I'm having a bit of a hard time putting what I want into words, which is probably why programming it has got me a bit stumped.Basically what I want is a nagavatable guestbook where the names of the people who left comments is shown in a list, and clicking on the various names would display their comment in a dynamic text box. This whole thing started as an extention of the XML Guestbook using PHP tutorial.My idea, and the way I've been trying to go at this, is to have the names show as text (not buttons or a movie clip, if I can avoid it) in a text area with a scroll bar to allow for as many entries as possable. Clicking on a name would load the data within the <comment> tag into a dynamic text fieldHere's more or less what my XML file looks like
I've been converting F6 AS1 to AS2 F8. It was more straight forward that I thought. But some things stick out like a rusty nail. Code1: This code displays x/y/z co-ords, as well as presenting a top down view of the 3d space. However the top down code doesn't work.
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..
I'm building a flash presentation and one slide has video. I have a flv component on the stage and the user wants the video to initially appear at a smaller size and then to click on it to launch the movie in fullscreen and to play. The playing is no problem but it doesn't want to launch fullscreen.[code]...
I have uploaded a flv file to my website, and when I click the full screen button the video only scales to a about a fourth of the computer screen instead of the whole screen. Heres the link: [URL].