i have an xml which has several nodes, each has an attribute which holds a num (a price of product). Now, after the xml loaded into flash i list out all the product, displaying the names and the price. Under the lis I've got to write out the sum for all the prices. But when I just simply use this method
sumNum += accNum
inside the main cycle, I create the list, it just doesn't work, coz it sees the price tag as a STRING, so it just puts each tag after one another, insted of adding them together.
I am making a simple tool for use around the office that takes up to maybe up to 8 inputs (text, combo box, t/f, etc)What is the best way to make sure that each field has something entered or selected? I am not worried about malicious code.
I managed to make some code that works perfectly which, when the flash game is launched it randomly inserts a picture from the list you give it (word1.png, word2.png etc.)It works fine! But the problem is the place in which it appears, when i start the pictures appear in the top left corner of my flash game, but I want them to appear at preferably the location of a symbol or the x & y coordinates I specify (In actions obviously, i dont want to type these coordinates in game :P).Btw here is the code
var _loader:Loader = new Loader; var _pictureArray:Array = ["word1.png", "word2.png", "word3.png"]; var _whatPicture:Number = Math.floor(Math.random()*3);
I am working on a CD project in flash. I have a main Projector(.exe) file which call other swf files. I compile all these files(.exe and swf) to installable CD which copy all the files on the local hard disk and make a shortcut on the desktop.
Now the problem is that I want to run my .exe file only if CD is in CDROM otherwise it loads another swf(from the local hard disk) which shows the message "please insert the CD and restart the application".
What I want to do is what parseInt and parseFloat does..basically I want to take ANY string and a radix value from 2->36, and then cut the leading part of the string that makes it a value in that radix.Let's call this method "cutValueFrom( str:String, radix:uint ):String".[code]and yes I could technically bang this out in some long ugly loop... but I want it faster then that. parseInt does it speedy like, I'm looking for something comparable, hence my desire for a good RegularExpressio.
I have a loop which duplicates a MC ('news_list')on the stage and places it underneath the most recent clip...
code: for( i = 0; i < total; i++) { var news= news_list.news_item.duplicateMovieClip("news_item" +i, i);[code].........
I have a text box inside the MC which autosizes depending on how much text is inserted from an xml file. This should then obviously increase the height of my 'news_list' movieclip.What I want is for the next instance of the 'news_list' MC to be placed directly underneath the current one,no matter the height of the clip.Currently,I can only get it to position a specified distance below the current instance.The code above is what I've currently got,but I can't quite grasp how to grab the height of the current instance, and then use that in the code to place the next instance below it...
I've inserted my flash movie into an HTML page and uploaded all the necessary files, but it will not display. I've seen other users post their code, so I will here:
I have a multi-column DataGrid that I've populated only three of the seven columns with data. One of the columns are editable. The other three are not editable. What I intend to do is have the user enter data into the editable column. Once the data is entered, The other three empty non-editable columns will populate based on calculations done to the value in the editable column.The problem is that when I enter data into a row of the editable column, the data isn't being reflected as entered until I try to add a new row. Is there any way to get the value being entered into the cell right after it is entered without the user having to enter a new row?
Whenever I use the pen tool, or brush tool, or anything for that matter, I can not view it on Flash Stage. I've noticed that if I set the file to ActionScript 2.0 I can though. This would be fine, except that I need ActionScript 3.0.. I'm a student, and I have a project I need to start...calling Adobe support did not help at all.
P.S. (if this makes a difference) Whenever I test the movie, I can see whatever I put on the stage.
I'm having problem with regards to getting the name of the inserted images inside the movieclip container.
My movieclip container is named "container", it followed this snippet:
[Code]....
Is it possible to get the exact name of the images instead of "instance147" or "instance175"? So that if i have inserted image with the name of apple.png, it will show:
| 1. name:apple.png type:object [object Loader]
By the way, i use FileReference to insert image to the stage.
I am using CKEditor in my website's CMS, which spits out an XML file of CDATA enclosed content to be read by flash. The problem is that CKEditor, when its enterMode is set to <p> tags, creates a line break and a tab in the source which, when read by flash, enters space, even though I have ignoreWhiteSpace set to true. Any way to prevent ckeditor from using this behavior?
EDIT:
I still want to keep any <p> tags entered from within the editor - I just don't want all the extra space / tabs that get added in the actual source. If I use the above method, my actual code will be modified. What I'm getting if I view the source is this:
<p> Donec at erat nec tortor sodales tempus.</p>
(an enter, and either a tab or a bunch of space after first <p> tag, instead of:
<p>Donec at erat nec tortor sodales tempus.</p>
(no spaces or breaks after <p> tag in source and I believe this is affecting the presentation of the XML.
I am working on a CD project in flash. I have a main Projector(.exe) file which call other swf files. I compile all these files(.exe and swf) to installable CD which copy all the files on the local hard disk and make a shortcut on the desktop.
Now the problem is that I want to run my .exe file only if CD is in CDROM otherwise it loads another swf(from the local hard disk) which shows the message "please insert the CD and restart the application".
[AS3] import flash.events.SampleDataEvent; var data:SampleDataEvent = new SampleDataEvent(SampleDataEvent.SAMPLE_DATA); [/AS3]
compile it with Flex 3.6 and run local works, then run in browser, works. compile it with Flex 4.5.1 and run local works, then run in browser, throws exception:
I am a total newbie and just learning from resources available here.. Today i was trying If statements to verify if the password entered in input box named "pass" . I code is as following.. on (release){ if (pass =="acc"){ gotoAndPlay(10); }else{ gotoAndPlay(15); }} Even if I enter the correct password it displays the content in frame 15.
Using Flash CS4, whenver I try to publish anything, I get this message: The file 'toplevel.as', which is required for typechecking ActionScript 2.0, could not be found. Please make sure the directory '$(LocalData)/Classes' is listed in the global classpath of the ActionScript Preferences. $(LocalData)/Classes is listed, and toplevel.as is in C:Program FilesAdobeAdobe Flash CS4CommonFirst RunClasses What is the problem? How do I verify or change the value of $(LocalData)
I am uploading files, jpgs, pngs, gifs, using filereference ... no problems.
my concern is the validity of the files that a user might upload.
for instance, I took a .txt file, changed it's extension to .jpg, and filereference was able to upload it to my server ( furthermore my php script was able to create a copy of it, resize the copy, and save it also ).
I have made my contact form and it works, but I need some kind of script to work with the "email" text field. I need it to only send me mails with real email addresses. Btw. the form is off of this: [URL]
I'm working on a simple non-XML-based slide show where the container MC dynamically loads sequentially numbered files (01.swf, 02.swf, 03.swf, etc). As you may already be gathering, I want to write a little loop that returns true if the file is there, e.g. if there's only files, 01.swf � 07.swf and the loop checks for 08.swf and doesn't find it, it returns false. BTW, in this particular case checking loader MC's _width won't work, so I need an alternative to that.
I am trying to create a form in actiocsript that verifies correct user input before submitting. So far I have the form checking that NewEmail contains characters, an "@" symbol and a "." symbol. However is there code that can check that the layout of the email is correct before submitting i.e. <"sometext"@"sometext"."sometext">
Also I need to insert a seperate name verifier to check that there are no numbers included in a text box. This is my code so far: _global.detailsCheck = function() { if ( _root.NewEmail.length == 0 | _root.NewEmail.length == "" | _root.NewEmail eq "") { // Alerts the user that their password is incorrect _root.Guide2 = "Please Fill All Detail Fields"; [Code] .....
I am working on a CD project in flash. I have a main Projector(.exe) file which call other swf files. I compile all these files(.exe and swf) to installable CD which copy all the files on the local hard disk and make a shortcut on the desktop.Now the problem is that I want to run my .exe file only if CD is in CDROM otherwise it loads another swf(from the local hard disk) which shows the message "please insert the CD and restart the application".
I found this script on the web. What it is trying to do is verify the url so that if the swf is running on another url, the script will either give a message or do an action. Yet I have not got it to work?
Code: protocol=_url.substr(0,_url.indexOf(":")); if (protocol=="file") { // Let's be nice:
I am looking for a flash solution to insert easily into a dreamweaver html page. I need a small audio player with a start and stop button. It should have a white background (no text). To work like the example in [url]......I would like to have a flash plug in that allows me to insert into another webpage and use an FLV file or other audio format.Dreamweaver's player does not look good inserted into any webpage.
I need to insert a Flash movie in a Visual Basic 2008 express form and send parameters to the movie, but am a newbie to VB. The flash movie will plot points sent by VB in a graph.I tried to insert the Shockwave Flash control in the form but cannot find it anywhere. So I inserted the webbrowser control, which I understand can be used to a similar purpose. But how would I send the values of X and Y (coordinates to plot in Flash) to the flash swf?