ActionScript 3.0 :: Detect Certain Values In XML
Apr 26, 2011
I'm trying to detect certain values in XML. This is my code:[code]For some reason, the first trace comes out as "21" (which is fine) but the second trace only outputs "1" when I want it so trace "2" and then "1". Why isn't it working?
View 3 Replies
Similar Posts:
Dec 6, 2010
I've gotten these sliders to work but can't get the output values to add up. For instance, depending on the values for slider 1, 2 and 3, I need the total to show up in a separate text box. I keep getting a NaN message in the text box.Here's the code I have so far:
//item 1
sliderOne.width = 600;
sliderOne.value = 0;[code].....
View 3 Replies
May 18, 2010
I need to save email-id in my login form through the cookies. if I use shared object I am able to save but my requirement is need to save in cookies. How can I save? I got sample code from net. Attaching that code `package com {
import flash.external.ExternalInterface;
/**
* The Cookie class provides a simple way to create or access
* cookies in the embedding HTML document of the application.
[Code].....
View 1 Replies
Sep 4, 2011
I need to be able to compare the number of whole days between two dates in ActionScript, is this possible? I'd like to test if one date is 7 days or less after today, and if so is it one day or less (if it's before today this also counts).The workaround I have in place is using the .time part of the date field:
// Get the diffence between the current date and the due date
var dateDiff:Date = new Date();
dateDiff.setTime (dueDate.time - currentDate.time);[code].....
As I say - this is only a workaround, I'd like a permanent solution to allow me to check the number of whole days between 2 dates. Is this possible?
View 1 Replies
Sep 7, 2010
Is there anyway where I can pass the Array values (not the array collection values) to the Bar charts or column charts using flex 3.5...
here is the thing i want:::
I have array values like this,,
array1 = [23, 49, 40, 239, 20, 80, 39,49,120, 24, 31,41];
and i want to show these values on the Yaxis and months on Xaxis....
I have two Qns,
1) how can I pass this array to Bar chart or column chart.
2) how do I need to show months on Xaxis. beacuse I'm asking this regarding, I have kept a filters that even if we want to see some months or a particular months or perticalar span of months... there on Xaxis it need to change the months dynamically depending on the filters..... (for ex, on Xaxis the values should be (Jan, Apr, Jun,Oct) if i select the 3 months period filter....)
I have written a logic to collect the values of those particular months into an array, but not understading how to pass this array to Bar chart,, beacuse there I don't know what Xfield and Yfield to be given....
View 1 Replies
Nov 24, 2009
I have a long list of numbers(Movieclips) aligned horizontally. I have a scroller that span across five number clips the user can drag the scroller to move. I want to dispatch over function inside the number clips whenever the scroller moves over them and likewise out and click event. I dont know how to detect that like if it was move over i could just define a mouse mover event but this trying to detect when a movieclip is over/out other clips.
Attachments:
picture.jpg
(4.2 K)
View 1 Replies
Feb 12, 2010
Here's my current code:
if (Key.isDown(Key.UP)) {
//do stuff
}
What I want to do, is to detect if user presses a button. My code atm just detects if it's pressed down continueusly. Is there a way to detect when user only presses it down, doesn't hold it down?
View 1 Replies
Nov 24, 2009
Just like yo can define Mouse over and out event to find out when the mouse is over/out of certain clip, in this case instead of Mouse I want to check when a Moviclips is over/out another movie clip.
View 3 Replies
Oct 31, 2010
I got this code from Adobe Live Document[code]...
View 2 Replies
Jun 25, 2008
I was wondering whether some Actionscript exists that can detect what URL its SWF is in, and jump to a frame within the SWF accordingly?For instance if menu.swf detects that it is embedded within home.html,it goes to Frame 1. Or if it detects it's embedded within services.html it goes to Frame 2, etc.
View 14 Replies
Aug 17, 2009
I have added a child MC in frame 20 of my file. Within this MC, I have added another child MC. In frame 1, I would like to detect to see if the second MC is on the stage. I have tried using the the stage.contain(secondMC), but I keep getting the error 'Access of undefined property secondMC'. I believe this is because I have declared the secondMC within the firstMC by using var secondMC:MovieClip = new secondMC1().
how I am able to detect my secondMC in frame 1?
View 2 Replies
Nov 24, 2009
Just like yo can define Mouse over and out event to find out when the mouse is over/out of certain clip, in this case instead of Mouse I want to check when a Moviclips is over/out another movie clip.
View 2 Replies
Apr 22, 2009
I want to make a navigation, but this is a flash navigation in a normal website.
naturally its going to include rollovers, but i'd like it to show which page your already on.
is there a way in AS3 to detect URLs?
View 1 Replies
Feb 28, 2010
is that possible and how?
View 1 Replies
Sep 1, 2010
I'm trying to make a card game with flash. The players will be site visitors, not the computer. I searched for detecting ip (and as3 game tutorial) but I saw that flash can't detect ips.
View 4 Replies
Aug 24, 2009
Say you have a banner ad distributed through an ad network.Is there a way using AS3 for the banner to know whether or not it is in an iframe?
View 3 Replies
May 17, 2010
Currently I am using this code to play a selection of .swf files using the keyboard.[code]Now I would like to detect the end of, say, 1.swf to load into a different swf, does anyone know how best to acheive this? I have tried a few tutorials with no success!
View 1 Replies
Aug 9, 2010
I have some trails data that I am adding to an interactive map. The trails were imported from Illustrator and are lines that have been converted to movieclips upon import. I'd like to add effects and some interactivity to the lines upon click and mouse_over. The difficult piece is that Flash treats movie clip like a box making it dificult to click on just the trail you'd like info for. For example, if there are two trails next to one another, clicking on the one you want can be difficult.
Is there a way that I can make it so that only the line part of the MC is the piece that responds to mouse action (rather than the whole box which encompasses its extent)?
View 2 Replies
Oct 1, 2010
i have an flvplayback component on stage, named the instance flvPlayer and added this code to frame 1, so a video loads in it. flvPlayer.source = "clip1.flv";
the videos plays from the local folder perfectly. I need a code that when the video ends, it jumps and stop to frame 1 of scene2.
[Code]...
View 4 Replies
Apr 21, 2011
I need to calculate the latency means time difference between the two user machines the scenario is: 1. App 1 publishes stream 2. App 2 play the stream published by App 1 Now in App 2 I need to show the time difference between the App 2 and App 1 time. Say if current time on App 1 is 10:46:30 and on App 2 it is 10:50:20 then need to display the difference. How to send the time value to App 2 from App 1 as time zones for the two users may be different.
View 1 Replies
Jan 1, 2012
I have an FLV player component, with this component I play several clip. Is there a way to detect, with as3, which is the name of the clip?
View 5 Replies
Dec 17, 2009
I'm creating a map that has points of interest. (POI) When a user mouses over the POI an info bubble pops onto the screen and it loads an swf. I can't detect the size of the swf so that my infobubble will size itself to the size of the swf. When I mouse over my swf file, it disappears. I would love to have the my swf file pop up in a layer on its own instead of being on the stage of my main flex file...
package com.modestmaps {
import flash.display.Graphics;
import flash.display.Loader;
import flash.display.Shape;
import flash.display.Sprite;
import flash.filters.BlurFilter;
[Code] .....
View 3 Replies
Nov 9, 2010
I've been developing a swf with Adobe CS4.My problem is the following:
<a href="#" onclick="jsonp_func();return false" >click</a>
var jsonp_func = function(){
var script = document.createElement('script');
script.type = "text/javascript";
script.src = "http://example.com/api?callback=jsonp_callback";
[Code]...
View 1 Replies
Mar 18, 2011
I need to detect 32-bit or 64-bit OS through Flex.
var osName : String = Capabilities.os;
This only gives Windows XP or Windows 7. I need to detect 64-bit Windows XP.
View 1 Replies
Mar 24, 2011
In the KeyboardEvent object I get on key-down events, is there a way to know if the event is the first key-down, or a repeat when the key is held down? I want to toggle a setting when a key is pressed; I could listen to key-up but I'd prefer the action is taken as soon as the key is pushed... as long as I can stop it toggling back and forth as the key-down repeat events are generated.
View 3 Replies
Apr 12, 2011
I'm using flash uploader and I'd like to be able to find out whether a flash blocker is present (activated) for me to able to let user know that he needs flash.There is a native support in browsers for letting users know they don't have flash installed. But how to deal with this ?I was searching in global Javascript object whether the flashblocker is exposing something, but I can't find anything.
View 1 Replies
Jun 1, 2011
It appears that if one has a mic available, then one can add an event listener for the StatusEvent. However, this only tells you if the mic has been allowed or disallowed.
What I'd really like to do is detect if the static Microphone.names property changes. I would have expected this property to be bindable.
If I right click and select "settings" immediately after plugging in a mic, I can see that flash has updated their list of available microphones. However, there seems to be no way in code for me to receive the same update.
The docs say "Calling Microphone.names requires an extensive examination of the hardware, and it may take several seconds to build the array." So I think polling this every few seconds is not a feasible option.
View 3 Replies
Jul 2, 2011
Is there a script in AS2 that will call a function when the SWF is closed? I found solutions, but they're all in AS3.
View 1 Replies
Mar 25, 2009
I am not able to detect the keyboard event CTRL+V on a swf using AS3 in IE. It seems to trigger the default browser behavior, and im not able to do anything.
View 2 Replies
Jan 16, 2012
I have Scroller and in this scroller I have 3 swfloaders. How I can detect when scroll bar is scrolled on (event, my be)?//editSorry for the little information. In scroller I have Group
code:
<s:Scroller>
<s:Group>
[code].....
View 2 Replies