I have a circular graphic that has 7 images on it. It needs to spin and stop on the next/previous image. It should spin through more than the 50deg required to get to the next/prev image so I added 360.
This part works fine. But when I try to add some motion blur type effect during the spin, the spin sometimes stops without completing.
...
I need to disable an onClick action until an animation has stopped. Animations can be started by 4 different buttons - all need to be deactivated.
I use a listener to pass params to the function that will initiate the animation which is why I use an anonymous function in the add listener:
up.addEventListener(MouseEvent.CLICK,
func...
I've implemented the AnythingSlider (http://css-tricks.com/anythingslider-jquery-plugin/) using image and video content (videos use the longtail flv player - licensed version 5).
Problem: When the user plays the video, the slideshow doesn't know this has happened, so the slideshow keeps cycling while the video runs. So you have the sli...
I built this incredibly brilliant scrolling thumbnail image viewer for a client in flash actionscript 3. (Basically it just scrolls up or down depending on the mouse position). It works so so, (I can never get the percentages right so that it shows the top most image) but, that's beside the point. What is REALLY irking me is when I h...
Hello, I tried to search but could not find out anything useful. This is a piece of code for my Greasemonkey script. Basically, I want to have the same effect as Gmail. When the page loads and you have new messages, the title will change repeatedly and make you notice. The problem is it does not work for the first time.
For example: The...
when handling data, i always have to write the following:
var dataSourceRequest:URLRequest = new URLRequest("/path/file.xml");
var dataSourceLoader:URLLoader = new URLLoader(dataSourceRequest);
dataSourceLoader.addEventListener(Event.COMPLETE, handleDataSource);
while i can understand the usefulness of these 2 objects and event listen...
When I run the following script, the event always fires on page load. I am not sure what I am doing wrong here, I create the element, find it in the DOM then attach a listener, but it always fires the event when the page loads and not when the element is clicked.
<script type="text/javascript" language="javascript">
document.write(...
i have 2 sprites on stage. bottomSprite is added to the display list first, followed by topSprite. topSprite partially covers bottomSprite.
i've added an event listener to bottomSprite for MouseEvent.MOUSE_MOVED notifications to simply trace the mouseX and mouseY coordinates. however, the notification doesn't work for the parts of bo...
I am working on a coloring book and have a movieclip (outlines) containing many movieclips that can be changed to whatever color the user has selected. However it seems like some of the movieclips can be clicked anywhere and work great, and others you need to click a certain spot for it to color in.
I have an example here: http://jeffki...
I'm looking for a way to add an EventListener which will automatically removes itself after the first time it fires, but I can't figure a way of doing this the way I want to.
I found this function (here) :
public class EventUtil
{
public static function addOnceEventListener(dispatcher:IEventDispatcher,eventType:String,listener:Func...
Hello, everyone!
Please point me to some tutorials or other explaining examples about how to register and use modification listeners with Java's DOM implementation.
On the web I find only Javascript or Flex examples.
My target is to get to know when a Node was modified.
I tried out several approaches, nothing works. Could it be that ...
Hi guys,
I have attached a event to a text box using addEventListener. It works fine. My problem arouse when i wanted to trigger the event programmatically from another function.
how can i do it?
...
Hi,
I can see how to attach an event to an object that has no parameters and no return value but how to modify the code below to attach a listener that takes parameters and returns a value?
function attachEventListener(target, eventType, functionRef,
capture)
{
if (typeof target.addEventListener != "undefined")
{
...
Hi, I'm trying to do the following:
I have a set of images and select (dropdown) HTML elements, 30 of each one. I'm trying to use AddEventListener on a loop from 1 to 30 so that when I change the value of the select, the image src is updated (and the image changes).
The AddEventListener function is this one:
function AddEventListener(...
I have ItemRenderers that need to listen for events. When they hear an event (and when data changes), they dispatch an event with their current data value.
As item renderers are reused, each of them is going to add its callback in set data(value...)and pass the callback function in the event as well as the current data value.
So, the l...
Hello, I'm new to Flex and am having trouble understanding Events. I think Events are what I want to use for my situation. I have 2 components, addUser.mxml and listUsers.mxml. I access these from a ViewStack in my main application. When I load listUsers.mxml it shows a list of current users in a datagrid via a HTTPService call. When...
Hi,
I'm currently experimenting with custom (level 2 DOM) events and I've now arrived at the problem that addEventListener() will not accept callbacks that return a value -- or at least I'm unfamiliar with the proper approach to this.
Basically what I want is this:
addEventListener("customEvent",
function() {
r...
On Window's load, every DD element inside Quote_App should have an onCLick event appended that triggers the function Lorem, however, Lorem returns the nodeName and Id of the last element in the For statement rather than that of the element that trigged the function. I would want Lorem to return the nodeName and Id of the element that tri...
I use this simple working function to add events:
function AppendEvent(html_element, event_name, event_function)
{
if(html_element)
{
if(html_element.attachEvent) //IE
html_element.attachEvent("on" + event_name, event_function);
else if(html_element.addEventListener) //FF
html_element.addEventListe...
I have an array that returns multidimensional data from an mysql database, when this is collected the createNews function creates the user interface. The problem I am having is the loop is iterating quicker than the UI is being created, is there a way to use event listeners with loops so it only continues after my function has completed ...