Using Flex SDK 4.14.1.
What event is fired when a component comes into view after scrolling a scroller?
I have a mobile app with a scroller component and it has a lot of items (about 4 screens worth of data), now I was wondering if a particular event was fired when these components came into view (drawn on the screen)?
What I want to do is dispatch an event when we get to a certain point down the 'page', but I cannot see any way to do this. I have tried creationComplete, show and addedToStage but they all seem to fire when the view is created, what I want is a solution something like the List component where items are rendered just before they are drawn on the screen.
Any suggestions greatly welcomed as dispatching these events at the start would both be a total waste of bandwidth, and a drain on resources that are valuable.
Thanks
So, in summary, there isn't one? Ah, ok, well that's fair enough.
I ended up putting a -load more- button in and calling my commands from that, works perfectly.
I am asking Apache to put in an event when an item is rendered on the screen, who the hell wants to load all of their data at start?
Related
Im using VIEWER_RESIZE_EVENT to catch when viewer resize but it raise all the time even it doesnt has any change (take a look attached pic). And when i use that method, objects do not highlight when mouse move over anymore. I solved the problem by different way is catch resize div event, it works perfectly. SoVIEWER_RESIZE_EVENT really has a problem or i misunderstand how to use it?
Appreciated any comments.
The VIEWER_RESIZE_EVENT definitely shouldn't be called all the time. Such a behavior is usually a sign of some problematic JavaScript code where, for example, some piece of code reacts to this event and (accidentally or intentionally) causes some change in the viewer size, causing an infinite loop of resize events.
When you try any of the official sample apps, you'll see that the event is really only triggered when the viewer canvas size actually changes.
Now I'm developing windows phone 8.1 app with WinRT
I'm trying to support swipe-right-to-go-back gesture in my app.
I try to capture the manipulation events on my page. My page's root is a grid and have a ListView inside. I used the UIElement.AddHandler method with "handledEventsToo=true" to add the event handlers. But when I touch the screen, only the ManipulationStarting event is fired, other events seems to be eat by listview.
Could anyone tell me about the manipulation event behavior or other methods to implement this feature? Thanks!!
You won't normally capture events on LisView, beacause it has a ScrollViewer which intercepts them.
There is a way to do it - you will have to disable ScrollViewer and then perfrom some actions when the events are fired and perform scrolling manually. This answer will guide you.
In case someone encounters this page, I spent the better part of a week figuring out why manipulation events were only firing half the time on my UWP charts using the winRT xaml toolkit.
You may need to check that the background is not null on whatever element has the event handler attached. Templated controls are not necessarily hit test visible unless they have one. Otherwise, the input can go right through to the element behind it.
https://msdn.microsoft.com/en-us/windows/uwp/xaml-platform/events-and-routed-events-overview
OK. So first, I will try my best to explain so good. My friend has gotten cursed out on this forum for not explaining, so I will explain. :)
Ok so I have my program built and all. But then it hit me! Wouldn't it be better to add a news feature? One teeny tiny problem? I cant? How would I implement a interactive code into an HTML page.
Like can i connect a button to a URL that will make the program do something. Almost like you can open cydia tweaks with there identifier and url EXAMPLE: http://handleopenurl.com/scheme/cydia And then i can add urls so i can update the program, without updating the files.
Or even just a featured news thing would be nice. But how would i implement this perfectly. I tryed a webrowser, but the page is too big for it. I am good at html, not much at css, i mostly use Adobe Muse http://www.adobe.com/Muse
Last question. Kinda defies the first thing i said about having my program finished.
Is there a way i can add a plus button and make it add more buttons and more labels and all?
This would help with allowing users to customize more then what the program can handle. By The Way, its a winter board Theme Maker. So I have a bunch of icons with there bundle identifiers and I create the folders with VB.net and all that stuff. But i want users to be able to click a plus button to add MORE text boxes and file browsers.
Any ideas? Maybe DIM 1 as NewFileBrowser? But i need to move all the buttons and i need it to be able to be clicked an infinity amount of times. I can do the coding for all of these buttons, but i jest need to know how to create them <1 Move them and the button so that the button goes further down each time, and more boxes will go further down. Much help apreciated. THANKS:)
EDIT:
Are you trying to say that you're wondering how to have a web browser control in a vb.net >app, which displays a web page, and when a button is clicked on the page, your app detects >it and does something? – Thraka
That sums up the top part. I am using windows forms, and it is coded in VB.net
If you get the object you want, like the button, you can hook the event and have it call code in your form.
Find the object using the Browser.Document.GetElementById method.
With that object, add an event handler to the Click event.
See http://msdn.microsoft.com/en-us/library/system.windows.forms.htmlelementeventhandler(v=vs.110).aspx for information about the event handler used
I have a Adobe Air app (AS3, not Flex) that has 2 windows. When I click away from them onto another desktop program, I get an "Deactivate" Event (as you would expect).
When I click on say Window#1 I get an "Activate" Event (as you would expect).
But when I go from Window#1 to Window#2, I get nothing. And I believe this is because the Air application is still the active program, Just a Different Window.
But I have the need to know when I go from 1 window to another.
The horrible solutions I have come up with so far is to have an onEnterFrame and check if the current window is the active window. But I would much prefer to do it a much better way that such a hack.
I have gone though Stage, NativeApplication and Native Window Events and none of them do what I need. Can anyone point me to another Event I may have overlooked?
Listen for window activation events directly on the NativeWindow object. (All display objects dispatch activation/deactivation events, but these are triggered by the application -- or SWF object in the browser -- getting or losing the OS focus.)
I am trying to accomplish an "imagemap" in flash where you click on different areas in the image and when you click on it, a popup (within flash) comes up showing more information about the object that was clicked on. The popup has a close button that can will then close the popup.
My biggest trouble is the way I have my code right now is when you click on a region of the map, it creates a popup on the fly, and then I use addChild(_myPopup) to add it to the display list. The problem with this approach for me, is that the Popup is now a Child of the button I just pressed, but this object organization doesn't really make sense to me. I'd like to have the popup not be a child of the button and it be on it's own layer or a child of the stage directly.
What is a good approach and code architecture for building such an organization of objects? I'm fairly new to AS3 and I've built some small applications but my knowledge is limited.
Thanks
UPDATE
ok looks like calling stage.addChild(myPopup) from inside the button works pretty well. Is this good practice?
Assuming you have a hierarchy that looks something like this:
stage
Main class
Image class
Button
It's good practice to never call upwards in the displaylist, every object only deals with it's children. Events however, are a nice way of communicating upwards. Have the Button dispatch an event, preferrably a custom one, then handle that using a listener in the main class that then deals with creating a popup on top of everything.
An often encountered practise to organize the layers of the visible application is:
stage
main class with all children
popup container
tooltip container
mouse cursor container (apparently not longer necessary since player 10 supports custom cursors)
So you create your popups always in the popup container above the main class. If you would have tooltips, they should go into the tooltip container. This approach guarantees that popups are always visible above the main app and tooltips are always visible on top of everything.