ActionScript 2.0 :: Custom Size For An Array From An External File?
Dec 8, 2006
I have a problem where I have a flash file that constantly loops. It reads 3 different variables from a txt file and outputs their data. I also have it refreshing the swf so that when I change data in the .txt file it updates it realtime in the swf without having to reload the file. but what I also need is a way to tell it to make an array a certain length to populate this data. And instead of a fixed size as it is right now, to make it X long where X is declared in the .txt file that i am using.here is the code that im currently using:
I have a script that calls for an external swf file. It can import the file no problem but it is always the same size. The problem is that I made the swf file with smaller dimensions and it is still to larger in my window.[code]...
i try to implement a preloader for my site but i have the following problems:once the preloader is finished it opens my external swf but this one appears below the preloader and very little in the window (almost smaller than my preloader size)
Gotta problem with a multidimensional array. It works when included in the actionscript but not when included in an external .as file accessed through #include the actionscript (in the actual flash doc of course)
Code:
#include "as/datafiles.as"
Code:
var elms = new Array(); for (var i = 0; i<=14; i++) { elms.push(new Array()); }
[code]....
brings up 'undefined' when the code is placed in an external ("as/datafiles.as") actionscript file, but works OK in the actionscript.
Gotta problem with a multidimensional array. It works when included in the actionscript but not when included in an external .as file accessed through #includethe actionscript (in the actual flash doc of course)
Gotta problem with a multidimensional array. It works when included in the actionscript but not when included in an external .as file accessed through #include the actionscript (in the actual flash doc of course)
[Code]....
brings up 'undefined' when the code is placed in an external ("as/datafiles.as") actionscript file, but works OK in the actionscript.
I have figured out how to load an external video file - and I can play an imported audio file, but I can't seem to use either method to load an external audio file into an array.
Here is my audio code: var tour_audio:Array = [tour1, tour2]; var my_num:Number= Math.floor(Math.random()*2); var ChosenSound = tour_audio[my_num]; var playing:Sound = new ChosenSound(); playing.play();
Here is my video code: var my_videos:Array=new Array ("link1.mp4", " link2.mp4", " link3.mp4", " link4.mp4"); var randomIndex = Math.floor(Math.random()*my_videos.length); my_player.source = my_videos[randomIndex]; I tried "var tour_audio:Array = ["link1.mp3", "link2.np3"]; - but that did not work.
Now i have one more doubt in Array.. i want to store some values into an Array from a external txt file.. I want to draw a line graph between two variable(X) and (Y) but i want to read that variable values from a external file.. I try use loadVars() class, but in that i have to assign a varable name to each and every value.. but i want to create a generalised class that will store any number of data into an array..
I am loading an external array from a text file like this.
file = new LoadVars(); fileURL = "PhoneBook.txt";
I then trace fileURL.length and I getting a number much greater then my fileURL array length.
The array I am loading into flash looks like this. firstName0=zzzzz&lastName0=zzzzz&phoneNumber0=zzzz zzz firstName1=zzzzz&lastName1=zzzzz&phoneNumber1=zzzz zzz Is there a problem with using myArray.length for an external file?
When I preview my flash file it says that the filesize is 29kb. However when I look at the properties of the outputted swf it's coming in a t 36kb. Which is the correct size? Also what extra information is being added to push it up by 7kb?
When I preview my flash file it says that the filesize is 29kb. However when I look at the properties of the outputted swf it's coming in a t 36kb. Which is the correct size? Also what extra information is being added to push it up by 7kb?
I'm going to be building a site for a photographer and would like to be able to do something like the thumbnail navigation in this example: [URL] I'm assuming it's adding the thumbnails to the Display Object via an array based on an external XML file, and displaying them once their corresponding full-size images are loaded ... Perhaps it's building the nav simply by looking to see how many photos there are in a folder on the server (i.e. no discreet XML added for each shot). Not sure if this idea is even possible -- would like to hear from any of you if in fact it is.
I made a preloader for my single scene movie and although the preloader is about 16k, when placed into frame 1 of the movie and tested, the frame is shown to have about 256k, which is larger than the movie it's loading. I've gone through all the files and made sure that export in frame 1 is not checked and made sure the publish settings also are set to export in frame 1.
when i run get lastIndexof for an array I get returned the the size of the array instead of the position here is the code:[code]but instead of returning the last index of it before the current index, it returns the current index (or jus the array length). help!!! it is my first time using lastIndexOf so I am probably using it incorrectly.ps this does not include some of the function run (i know i am passing a value which it does not look like i am using, but i know that part of the code works)
Something I've always wanted to do was creating a custom component in Flash but havespecific parts of the component size appropriately based on, say, the video size.For go there and watch a video... they use the same component for all sizes of video. What seems to be changing is the video width and height, the progress bar width and the position of any status messages for the video.
I want to create a custom textinput component in flex. The component is made of one background rectangle (spark.primitive.Rect) and one inside rectangle that will contain the text.My problem is that I want my component to be sizable like I want. For example if I want to create one textinput with a size of 200/100 I write :
And I have only the width and height to change if I want to create another textinput with different size.My skin mxml contains two rect but I want to do this:<s:Rect width="{this.width}" height="{this.height}" .....and for the other one (the one that will contain the text)<s:Rect width="{this.width * 0.80}" height="{this.height * 0.80}" .....The problem is that flashbuilder displays an error message of incompatibilty on my two "Rect" lines. And when I launch my app, nothing is displayed.
convert pdf file into byte array.and also i tried in Google also but no results yet.can u prefer how to convert pdf file into byte array and retrieve byte array into pdf file in flex application.
Is there any "mainstream" library used for this purpose? Commonly spread, well maintained, documented etc.I found these (using flash):
Uploadify - not many releases, latest 12/2010, no documentation (!) SWFUpload - latest release 03/2010, documentation fancyupload - looks buggy.
phpfileuploader - looks heavyweight, and looks commercial (?) I cannot read the licence (you can download it but are you allowed to use it forever without paying?) plupload New version of pure javascript (no flash) Valums' ajax upload claims to handle file size limit and progress bar, which is quite suspicious to me: these features require to guess the file size before the upload, which seems impossible in javascript (look also here). Or can it work?
I have developed a video player in adobe flash cs4 and used all vector arts but when I open this fla file in Adobe Flash CS5 and published it, the swf file size more then fla file.
I would like to run a .swf file into an existing flash file, but the dimension size of the .swf file is too big. I am a beginner to flash and not sure of the steps to execute this. Would anyone be willing to walk me through the steps to import the code?
[URL]regarding this tutorial I started my site [URL] to get some trasition effects but im getting somewhat different since the external SWFs take time to load. isn't it better to create "intro and outro" on the same time line instead of loading external SWFs bcos once the movie loaded as a whole will lead to smooth and contineous transitions.
I'm just trying to find the size of a array I created. I know how to find the size of the swf and movieclips with getBytesTotal but that doesn't seem to work for arrays. anyone know of a method to find this or some built in function. I searched google and other search engines but only find the getBytesTotal command for use with MCs.
Incorrect number of arguments. Expected no more than 0.hen I try to:ar countries:Country = new Country(10);ormally this would work in Java or C++, so I'm not sure what's up!?Here is my custom class.
package { public class Country { var cName:String = "noName";