ActionScript 2.0 :: Searching XML With Flash (ignore Characters Case)
Jul 9, 2007
I have checked out this tutorial and have created my own version of this but is there any way of ignoring the character case. i.e if i searched for "happy new year" it would display results including "Happy new year"
View 1 Replies
Similar Posts:
Mar 19, 2010
I've created a quiz in flash that reads in questions and answers from an external xml file. E.g (xml).
<question q="allons-nous? = are we going/do we go?"
ans_a="allons-nous?"
right="a">
I have been asked to develop the quiz further so it ignores the case the answer is typed in (which I guess is possible using toLowerCase) and also to ignore any ! or ? symbols the user might type in .I assume the only way to accomplish this is to check the answer against a range of possible answers in the XML eg.
<question q="allons-nous? = are we going/do we go?"
ans_a="allons-nous?"
ans_b="allons-nous"
right="a",right="b">//this lines probably wrong
Does anyone know if there is any way of getting flash to ignore symbols if they are typed in?
View 1 Replies
Dec 1, 2010
I am in the process of making an animation that takes text from an XML document and displays it in a scrollPane. I had this working when I was just using string variables. Now with XML it seems to ignore the new line characters. I have looked all over but nothing is working. Now that I think about it, special cahracters like "%3C" are not working.
[Code]...
View 2 Replies
Apr 25, 2011
Im trying to make a small program that convert characters into others. (it is useful when some program doesn't recognize Cyrillic characters and give back strange symbols as "_˛". The problem im facing is the impossibility to specify 2 characters under "case"
[Code]...
View 2 Replies
Jun 6, 2011
I have some trouble with the conversion applied by BlazeDS to the name of the properties when this name begins with a lower-case letter followed by a capital letter. I have an ActionScript class similar to this:
[Code]...
View 1 Replies
Mar 30, 2009
sharing an old template of his or a nice website where I can find some for free?
View 1 Replies
Sep 8, 2011
how to make flash search for certain entries ( by title or similar things ) of entries that are in an XML file and just pull all the information of that out? I have been trying to get it to work but it keeps on failingthe XML file ( code ) that I use at the moment is:
<?xml version="1.0" encoding="utf-8"?>
<Items>
<Item SKU="10167402" title="22265004210" department="11" quantity="7" counted="0" />
[code].....
View 1 Replies
Jan 20, 2012
I want to search an array to see if it contains a specific string, and then get the index of the result. For example, if I had:
array[0] = "dogs";
array[1] = "cats";
array[2] = "oranges";
I want to be able to search for "oran" and get 2 back.
View 1 Replies
Mar 17, 2011
I have a BitmapData object with transparency (the sourceBitmapData parameter). Every time I use copyPixels() to copy it onto another BitmapData object the transparent pixels replace whatever is beneath them. I would like the copyPixels() function to simply ignore these fully transparent pixels (0x00) and NOT copy themBTW, I've tried setting the alphaMerge to true but that doesn't solve the issue - the whole source object just goes black and ignores ALL transparency.EDIT:
Here are the code snippets;
var b:UIComponent = new UIComponent();
b.graphics.beginFill(color, opacity);
[code].....
View 3 Replies
May 15, 2009
Every time I try to load text from websites onto my flash program, it also includes a lot of white space and the website header/title, which i don't want. here is my actionscript
[code]....
View 4 Replies
Mar 22, 2011
How can I have Flash reading XML ignore white spaces that would be ignored in HTML?
[Code]...
I don't want the spaces or the new lines that show in the text to show in Flash. In HTML there is no new line character between the two lines either.
View 1 Replies
Oct 30, 2011
What I'm trying to do is create a program that, depending on 2 variables, multiplies another variable by a static number. Heres the code I have so far:
[Code]...
View 1 Replies
Dec 10, 2003
I want this on an MC:
[AS]
i = 0;
switch(thing){
case 0:
[code]....
Basically what I'm wondering is, will I lose the value of i in the first switch once I'm out of the switch? Can the second switch read the 1st switch?
View 8 Replies
Oct 29, 2011
Im trying to create a program that, depending on 2 variables, multiplies another variable by a static number. A friend suggested I use case/switch instead of if/else statements,which is what I was using before.
[Code]...
View 1 Replies
Feb 2, 2009
After adding a floating cloud layer on top of the map all the elements below the cloud layer are inaccessible as the cloud layer is the only object getting mouse events.Is there a way to to tell flash to ignore the cloud layer for purposes of interaction?
View 3 Replies
Feb 3, 2010
I've built a UIComponent in AS3. When I drag it onto the stage during authoring time, the ADDED_TO_STAGE event fires.
I have an event handler, but it's really only meant to perform actions at runtime, not when I'm dropping the component onto the stage to design the layout. Is there any way to check to see if the component is "running" in a live SWF?
Basically, I don't want the ADDED_TO_STAGE event handler to do anything at design time.
View 1 Replies
Feb 10, 2010
I have simple combobox component in flash cs4, I try to add and event listener like this
mycombo.addEventListener(Event.ADDED_TO_STAGE, added);
function added(e:Event):void
{
trace("HI");
}
never get called even if I have the component in the stage manually or via AS, but if I add a listener to MouseOver it works, why the ADDED_TO_STAGE event don't work, also I have a problem with the textFormat style if I use
mycombo.setStyle("textFormat", tf);//suppose tf is a TextFormat object
doesn't work too, but if I put that line inside the MouseOver event it work's why??
View 1 Replies
Apr 20, 2011
I'm using flash sockets to build an embedded chat application. everything works great. I want to allow all the sites who embedded this application to connect to my server, except for some sites.
My problem is that the number of sites that I don't want to connect to my server is a very large one( 4-5k). Currently from what I seen all you can do is tell in your policy file the domains that you allow/not allow.
What I'm looking for is a way for flash player to send me the domain where the flash is embedded and I could return an accept/decline response. I know I can send info about the site where the flash is embedded using actionscript, but this can be very easy simulated.
View 1 Replies
Aug 17, 2009
I am having issue with my created flash, it can't handle chinese characters? is there some way i can handle this thru code? or should there be any font or language pack installed
View 3 Replies
Aug 23, 2010
1) Each field in the form only allows 3 characters and no special characters such as @ _ ! . , etc... 2) When the user goes to the next field in the form, the previous field appears blank but the when clicking on that again, the original text appears. 3) When submitting the form, it just keeps saying "in progress" and never shows the confirmation text nor does the email get sent. There is an HTML file included with this form but I am not sure if I need to put that in as I have embedded this form into an SWF file so I don't think I need that code but let me know if I am wrong about this. I am posting both the AS code and PHP code below..
[Code]...
View 2 Replies
May 30, 2010
My problem is that all my accentuated characters are displayed as weird iso characters. Example :© is displayed %E9 I send a string to my php file :
[Code]...
View 4 Replies
Dec 27, 2011
When the list item label is changed, the list doesn't redraw until I hover the mouse over changed item. I've tried invalidate & redraw but they didn't work:
//myList is an instance of mx.controls.List component
myList.getItemAt(0).label = 'New Label';
myList.invalidate();
myList.redraw(false);
How to force the list to redraw in this case?
View 1 Replies
Mar 6, 2012
in flash/actionscript you can provide flashvars to the movie.
in actionscript you can access them like this:
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
then i can check a parameter like this:
if (paramObj["somekey"] == someValue)
{
}
now i want to make this check case-insensitive. so that it matches SomeKey or soMekEY, etc.
View 2 Replies
Jun 23, 2009
is it possible to have a back up image if the flash doesnt load?
The current code is:
<div id="mainBanner"> <div id="so1351">You will need flash to view this element<script type="text/javascript"> var so1351 = new SWFObject("/media/11695/29042009.swf", "flash", "994", "224", "8", "#FFFFFF"); so1351.write("so1351"); </script></div> </div>
View 4 Replies
Jul 13, 2010
I am curious if this is an okay implementation of the Array.filter() method.
[Code]...
I was not able to figure out an implementation of the callback function for the filter() method, where the callback was outside of the getGallery() function. I wonder if there is a way to get the isGallery function outside of the getGallery scope?
View 1 Replies
Apr 29, 2011
Looking into HTML5 video tag, and researching which browsers support which video file types, and my initial thought is things just got harder than just using flash. I am wondering if there is some skeleton code (combined with development approach for videos) that someone has figured out to do the following: If flash is available, use it If not, try html5 video ogg format If that doesn't work, try html5 video h.264 format If that doesn't work, try html5 video webM format Based on what I am seeing, am I correct in thinking that now, in order to accommodate all users on all browsers, a video needs to be published in 4 formats? If so, this HTML5 video thing is an epic fail!
View 2 Replies
Nov 10, 2009
I get a Flex 3 sandbox error #2048 after connecting to a Socket on a Java (1.5) server. The server code is all mine, i.e. not running under Apache. Flash Player 10.0 r32.The sequence is as follows...
1 Java server starts, listens on port 843 for policy file request and on port 45455 for my other requests.
2 Flex client served by Apache (although I get the same result if I run it from the file system), socket connection made on host:45455.
3 Flash Player requests policy file from port 843. This is the standard behaviour with the new security settings looking for a master file. It happens regardless of whether a different policy file has been specified.
4 I serve the following XML from Java through port 843:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" secure="false"/>
</cross-domain-policy>
5 The player writes the following into the debug policy log...
OK: Root-level SWF loaded: http://localhost/bst/BasicSocketTest.swf
OK: Searching for <allow-access-from> in policy files to authorize data loading from resource at xmlsocket://192.168.2.3:45455 by requestor from http://localhost/bst/BasicSocketTest.swf
OK: Policy file accepted: xmlsocket://192.168.2.3:843
OK: Request for resource at xmlsocket://192.168.2.3:45455 by requestor from http://localhost/bst/BasicSocketTest.swf is permitted due to policy file at xmlsocket://192.168.2.3:843
6 I send a text message from the client to the server on port 45455 using writeUTFBytes() and flush() (this is my own home-baked message protocol, and is correctly processed at each end)
REG/REGISTER;simon;Si
7 Java server thread listening on port 45455 responds with
REG:0/REGISTER:SUCCESS;simon;Si
8 The Flex client receives a ProgressEvent and the event listener I bound to the socket gets called. I process the message (write it to a text box on the screen)
9 The Flash player throws a 2048 sandbox error and the socket is disconnected! This is after the message is received and processed successfully. In fact it is about 12 seconds after. Nothing else works through the socket.
I have tried explicitly loading a policy file with a call to Security.loadPolicyFile() in the Flex client, but the reality of the new player security is that it is basically ignored. The steps are that the policy request will not get sent until a socket i/o operation occurs. At that point the player always goes to port 843 first looking for a master policy file. If it finds one, and it is permissive, it goes no further.
I have tried a variety of alternative ways of terminating the policy file and policy file contents, including deliberate errors just to see if the Flash Player is awake.I can see no reason why I would have a 2048 being thrown. I accurately serve a socket policy file on the designated master security port, which the player itself logs as correct. The socket then successfully sends and receives a message from the server the contents of which are available to my code.
P.S. Please don't tell me to use BlazeDS or LCDS or Granite, or something else as a server, I'm looking for a solution to this problem, not a redesign. And please don't ask me to use an XMLSocket instead - I tried that and get exactly the same result. I have chosen my architecture carefully and deliberately and I want a binary socket.
EDIT :In response to James Ward's request in his comment, here is the entire error message:
Error #2048: Security sandbox violation: http://localhost/bst/BasicSocketTest.swf cannot load data from 192.168.2.3:45455.
I have a stripped down test client which has a handler for each socket event and outputs a message to the screen. This is what it shows:
RequestPolicy: 192.168.2.3:843
Create Socket: 192.168.2.3:45455
Connect: [Event type="connect" bubbles=false cancelable=false eventPhase=2]
Sending: REG/REGISTER;simon.palmer@gmail.com;Si
Receiving: REG:0/REGISTER:SUCCESS;simon.palmer@gmail.com;Si/
Close: [Event type="close" bubbles=false cancelable=false eventPhase=2]
Error #2048: Security sandbox violation: http://localhost/bst/BasicSocketTest.swf cannot load data from 192.168.2.3:45455.
The close event is fired immediately after successfully receiving a response from the server, however the Error #2048 does not appear until about 20 seconds later. If I try and send a further message after close, but before the error, the Flash Player throws an invalid socket exception.
View 9 Replies
Oct 15, 2010
sometimes Flash Authoring colors my actionscript inappropriately. for example: i have custom variable that i've named "closeButton". closeButton does not reference any of the official classes yet it always colored blue as an identifier. i'm assuming it's referencing some internal, private variable from some class in the frameworks. is it possible to remove the color for specific identifiers?
View 1 Replies
Oct 25, 2010
I keep getting this message from Flash: "Scene 1, Layer 'A', Frame 1, Line 411136: Incorrect number of arguments. Expected 1." and for the life of me, I can't understand why. I simplified the name and number of the buttons called but otherwise the code is intact. Flash is flagging all of the functions within the switch/case function, telling me that an argument is expected there. Why? I've tried the switch/case functionality with other requests (e.g., trace), but I cannot make it run a function.
Code:
var clicked = MouseEvent.CLICK;
country01_btn.addEventListener(clicked, butClicked);
country02_btn.addEventListener(clicked, butClicked);[code]...............
View 8 Replies
Feb 3, 2011
A quick review of the project, I am importing information from an xml file into an array. From there I have passed the information from the array to a variable.I find it that when I try to match the variable to a string letter, that it is not running through the case switch properly and going straight to the default bit. I have tried numerous solution to check where the problem lies;I have trace the actual position of the array to check if it is the correct letter I am trying to match.Did a length check on the variable that it is only 1, and not containing any spacesWhen I hardcode the letter into the variable, the case works perfectly.Any idea on why this is happening would greatly be apreciated. I have pasted a sample of the code below;
var switchTest = initialSlide_array[1];
switch (switchTest) { //switch case used to check template type
case "A":
[code].....
View 2 Replies