Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Arrays Help Required..



Hi All..I have one serious problem..I created an array MyArr where MyArr[0]=01-01-06 MyArr[1]=1.pkg MyArr[2]=2.pkg MyArr[3]=3.pkg MyArr[4]=4.pkgNow I must check whether a particular element is present in the array or not..!So I wrote a if loop saying if(contains("1.pkg",MyArr)==1) display saying yes it is there..or else display saying no..But my code is creating me problems..Can anyone explain me by writing an action script code ??ThanksNirmal.



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 12-21-2006, 03:33 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Help Required For Calculator Actionscript Using Arrays
Hi, i'm a newbie in actionscript and started not just long ago. Does anyone knows how to create a flash calculator using arrays? any clues anyone? Thanks

Actionscript Pro Required: Syntax Help Required For Button To Initiate Easing
Hi guys I was wondering if any of you actionscript daddio’s could give me 2 minutes of your time and help me write the appropriate syntax to make the below example work on a button release rather than on the MC mouse down state that it currently uses.

http://www.fluid.com/experiments/timecode/mx_time.html

If you click on the geek panel drop down menu, you will see that it generates the appropriate code for the on onMouseDown,, however I want to call the easing from a button.

If someone could give me an example of the correct syntax using the “easeInquad” function that would be brilliant.

Arrays In A Text File To Arrays In Flash
What i am wanting to do is get an array list from an external file and put it into flash arrays, the code i tryed to use was this:


PHP Code:



            for (i=1; i<33; i++) {
                
                if(id=="undefined" || id=="NaN"){
                    
                } else {
            
                id[i] = id(i)

                               }

                         } 




But that dosent work obviously.

I know ive got the
PHP Code:



id[i] 




bit right, but i dont know how to do the bit from the text file.

in the file it goes like this:


PHP Code:



id1=432&id2=324 ect 




So basically what i am trying to ask is how to in a look do variables using the i (id plus the i at the end). Anyone got any ideas?

Sorting Arrays...2-Dimensional Arrays
How would I go about sorting two dimensional arrays using the sort() function. What I'd like to do is organize the arrays inside of an array by a certain variable...

i.e:

array1 = new Array("Name", "State1", "Cost");
array2 = new Array("OtherName", "AnotherState", "OtherCost");
array3 = new Array("DifferentName", "YetAnother", "AndAnother");
allarrays = new Array(array1, array2, array3);

Now, let's say I want to sort the arrays in allarrays by their state variable. In other words, I want to sort them so allarrays would look something like this (if sorted by state):

allarrays:
array2,
array1,
array3

Any suggestions or past experiences with this sort of sorting? Would I use the Sort() fuction? or would I have to make my own sort function? Thanks in advance for any help you can provide.

Arrays: Cleaning Up Empty Arrays
Hi,
So, I have an array generator, and its not worth explaining the details, but long story short, I end up with an array in which some of the slots are "undefined". How can I go through and remove just those slots? Eg this this my Array

myArray[1] = "red"
myArray[2] = "blue"
myArray[3] = undefined
myArray[4] = "pink"
myArray[5] = "undefined

and what I want to end up with is:

myArray[1] = "red"
myArray[2] = "blue"
myArray[3] = "pink"

thx!

-Z

Arrays/Arrays/Arrays/and Functioning.
Can someone please , tell me how to shorten that Rescale function to just do all the movies in one shot ? and also to add an array for the delay which is the ( o.2, 0.4,0.6 ) so i need to shorten all this to do something like this


Code:
rescale = function(){
this.scaleTo(100,2,"easeOutElastic",this.speed);
this.alphaTo(100,2,"linear",this.speed);
}
//... the next line is inserted within the duplicate movie loop
eval("item"+a).speed = 0.2*a


Instead of all this..

Code:
// Callback Function for lacos to tell when to rescale/alpha back to 100 percent
reScale = function(){
//How can I shorten this by just making an array and doing this in One shot ? is the only problem
item0.scaleTo(100,2,"easeoutElastic",0.2);
item0.alphaTo(100,2,"linear",0.2);
item1.scaleTo(100,2,"easeoutElastic",0.4);
item1.alphaTo(100,2,"linear",0.4);
item2.scaleTo(100,2,"easeoutElastic",0.6);
item2.alphaTo(100,2,"linear",0.6);
item3.scaleTo(100,2,"easeoutElastic",0.8);
item3.alphaTo(100,2,"linear",0.8);
item4.scaleTo(100,2,"easeoutElastic",1);
item4.alphaTo(100,2,"linear",1);
item5.scaleTo(100,2,"easeoutElastic",1.2);
item5.alphaTo(100,2,"linear",1.2);
item6.scaleTo(100,2,"easeoutElastic",1.4);
item6.alphaTo(100,2,"linear",1.4);
item7.scaleTo(100,2,"easeoutElastic",1.6);
item7.alphaTo(100,2,"linear",1.6);
item8.scaleTo(100,2,"easeoutElastic",1.8);
item8.alphaTo(100,2,"linear",1.8);
item9.scaleTo(100,2,"easeoutElastic",2);
item9.alphaTo(100,2,"linear",2);
item10.scaleTo(100,2,"easeoutElastic",2.2);
item10.alphaTo(100,2,"linear",2.2);
item11.scaleTo(100,2,"easeoutElastic",2.4);
item11.alphaTo(100,2,"linear",2.4);
item12.scaleTo(100,2,"easeoutElastic",2.6);
item12.alphaTo(100,2,"linear",2.6);

};

//Duplicate method puts all movieclips on stage at 0 alpha so the user doesnt see the placement
for (a=0; a<titles.length; a++) {
duplicateMovieClip("item", "item"+a, a+1);
//eval("item"+a).alphaTo(0,0,null);
eval("item"+a).item_txt.text = titles[a];
eval("item"+a).tween("_x", [posX[a]], 4, "easeoutElastic");
eval("item"+a).tween("_y", [posY[a]], 4, "easeoutElastic", 0.1);
//Callback function is set here
eval("item"+a).scaleTo(0,0.2,"easeoutElastic",0.1,reScale);
item._visible = false;
}

Required Immediate Help
Hi there,

This is Vicky from India. I'm a Flash Multimedia Developer by Profession. But Still Confused about Flash techniques using in Websites. I'm three questions which I hope you people will try to solve and help me : --

1) I'm new in Web Designing field, I wanna know what are those techniques(points) I should remember while pubwork online (e.g. How to publish heavy animation, sound and interactive) or kindly suggest me any link that I can go and check myself.

2) What I needto do If I want to know about people visiting my website (e.g. Their name , email address and any suggestion they wanna give). Is simply puting a guestbook online will work or I need to do learn some programming language apert from Flash Scripting.

3) The Most important question is, I have read a lot of information about career in 2d interactive games in Flash. A Flash gamer also having a very big value as that of any big 3D gamer. Is that true?, If it is then why there is no a single recruitment/job i've seen of Flash gamer in any of the job search websites.

Kindly help me regarding my questions...

FLASHER OF INDIA -- VICKYMUSTDIE

Help Required, Pls
i have given this action code to a button

on (release) {
_root.cb == 21;
gotoAndPlay("Scene 2", 100);
}

i want it to go to frame hundred, which it does, and assign the variable cb the value of 22. i dont know if it does this or not cos i dunno how to check that.

later on on frame hundred i have this action code:

if(_root.cb==21){
_root.gotoAndStop("Scene 3", 1)
}else if(_root.cb==22){
_root.gotoAndStop("Scene 4", 1)
}

i have more buttons like the one shown above, and each gives the variable cb a different value. i want frame hundred to make the movie jump to the correct scene and frame according to what value the variable cb has.

also as i am new to actionscript, i dunno if i have to declare the variable cb with the var fucntion. if so where do i do it. i am not sure why i put in the _root bit before the name cb, i jus did this becos someone told me to do so....

Little Help Required
Flash MX

I have created several symbols which can be dragged and dropped.
I need them to be dragged to a specific place on the page but not all the symbols go to the same place.
This is for a school website and the users should be allowed to drag them to the wrong place and told how many they have got wrong at the end and given option to retry then after the 3rd try told the answer.

Please help!!!

Help Required.......
OK, I know very little about Flash at all but have something specific that I want.
I would appreciate it if anyone knows of any tutorials etc that explain how to do what I am after :

I would like a flash movie that will load in images from a folder via XML.

The images should appear in the center of the scene (like a pile of photos just thrown on the floor) with a 5 pixel white/grey border added and randomly move outwards into evenly spaced rows. (approx 3 rows of 6 columns)

On clicking on one of the images I want to zoom in 100% to show the full image. If clicked again, return to say 15% zoom allowing all the images to be seen again.

How easy/hard will it be to do this?

I should add I have found a free one that does this but unfortunately it rotates the images slightly. While I love the effect it has a downside of distorting the images which I really dont want. The images need to be displayed perfectly. This is more noticeable on vertical and horizontal lines.

If i could have the same as this with the images either not distorted or not rotated it would be ideal! To see what i mean : http://www.beachbuggybandits.com/shp/postcardviewer.swf

Xml Help Required
hi there, i currently have the following xml document, which displays thumbnails of images next to each other, like this:

1 2 3 4 etc...

could anyone show me how to change the look of these thumbnails so that it looks like this:

1
2
3
4

heres the xml actionscript:

myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;
spacing = 38;
for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes[i];
this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
this.thumbHolder._x = i*spacing;
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_i mage", 0);
this.thumbLoader.loadMovie(this.picHolder.attribut es.thmb);
this.thumbHolder.title = this.picHolder.attributes.title;
this.thumbHolder.text = this.picHolder.attributes.text;
this.thumbHolder.main = this.picHolder.attributes.main;
this.thumbHolder.onRelease = function() {
loader.loadMovie(this.main);
title_txt.text = this.title;
text_txt.text = this.text;
};
}
};
myPhoto.load("xml/xmlprint.xml");

Help Required Lol
Hey,

I have some simple action script (shown below). I want to be able to make the word Kontrolit bold and make the word it red, how would I go about doing this?

Many thanks,
Paul


Code:
var str:String = "This movie will show you how easy it is to update your website content in real time with Kontrolit. Lets pretend this is the home page of your site and we would like to alter some of the content.";

var sInt = setInterval(writeIt,1);
var count:Number = 0;

function writeIt() {
if(count == 0) {
s.start(0,1000);
}
theText.text = str.substring(0,count);
count += 5;
if(count > str.length) {
clearInterval(sInt);
s.stop();
}
}

Help Required :)
Hey guys,

I was just messing about with few things. Then got a bit carried away with something, and now I'm miserably stuck, lol. I have a small computer screen in my flash file, and what I want to be able to do is have images loading on the screen. But I want to be able to feed the images in from a source, not that actual flash file. Get me?

Yea woo, any help would be great!

Cheers,
Paul

Help Required
hi there,

Can anybody tell me how can i do the same effect (flower maksing or something else) like on this website.

www.discoverygardens.ae

Prompt reply will be appriciated.

thanks

A Little Help Required
Hi, this is my first post here (ahhh, runaway you all cry) and I hope you can be of some assistance, then someday I may be able to return the favour!

So onto my little problem:

I've been programming a hideous rip off of the MiniClip game Secret of Maya (http://www.miniclip.com/secretofmaya.htm)

If you haven't played the game, you have 49 tiles with pictures on them, you need to move the tiles about to make groups of 3+ for them to dissapear.

I have so far managed to get 49 empty movie clips with 1 of 5 tiles loaded into them. Each of the tiles has a few states; stationary (1st frame), flashing (to show you have clicked on the tile) movemets up down left and right and finally a dissapear animation.

My problem is that when a tile is moved into a postition that creates three tiles in a row the tile that had been moved doesn't dissapear but the other two do (ie it doesn't play the animation even though all functions are called correctly)

relevent code below (if you need more info or code please contact me!!!) oh yeah and this is the first time I have coded in actionscrip to I apologise if my methods appear random)

Thanks in advance
Aid_Dealer.

function LoadTiles(){ // called by main last frame of animation switches tiles
// between Emptyx and EmptyY
var LoadTile;

FindEmpty(BMark1,BMark2);

with (EmptyX){

LoadTile = TileArray[TMark2 -1];
attachMovie(LoadTile ,LoadTile,0);
TMark[BMark1] = TMark2;

}

with (EmptyY){

LoadTile = TileArray[TMark1 - 1];
attachMovie(LoadTile ,LoadTile,0);
TMark[BMark2] = TMark1;

}

CalculateRMark();
}

function CalculateRMark(){

var row;

BMark1 = -1;
for (i=0;i<=6;i ++){

for (row=0;row<=6;row ++){
BMark1 = BMark1 + 1
RMark[row] = TMark[BMark1];
BMark[row] = BMark1;
}
CalculateRemove();
}
}

function CalculateRemove(){

for (i = 0;i <= 6;i ++){

if ((RMark[i] == RMark[i+1]) and (RMark[i+1] == RMark[i+2]) and (i<=4)){

if ((RMark[i+2] == RMark[i+3]) and (i <= 3)){

if ((RMark[i+3] == RMark[i+4]) and (i <= 2)){

if ((RMark[i+4] == RMark[i+5]) and (i <= 1)){

if ((RMark[i+5] == RMark[i+6]) and (i <= 0)){
//BMark1 = BMark[i];
//PlayMovDissapear();
//BMark2 = BMark[i+1];


}
//BMark1 = BMark[i];
//trace(BMark1)
//PlayMovDissapear();
}
}
}
BMark1 = BMark[i];
trace(BMark1);
PlayMovDissapear();
BMark1 = BMark[i+1];
trace(BMark1);
PlayMovDissapear();
BMark1 = BMark[i+2];
trace(BMark1);
PlayMovDissapear();

}
}
}

function PlayMovDissapear(){

FindEmpty(BMark1,BMark2);
FindTile(EmptyX,EmptyY,TMark1,TMark2);
//trace(TileX);
with (TileX){
gotoAndPlay(155);
trace (TileX);
}

}

Nav Bar Help Required
Can someone have a look at this fla, As you will see its just a nav bar that
fades out the other options as they are selected, but there is a bug that will not fade out the other buttons
any suggestions please

http://users.bigpond.com/netwitz/top.fla (176KB)

Help Required
As a newcomer to flash and at the age of 42 I am having touble with a few things.. I was following thread from this site and am stuck with a certain aspect of the tutorial.

I was trying to follow the following tutorial

http://www.actionscripts.org/tutori...ing/index.shtml

and did well until I got to the part about coding the buttons. I imported 2 images to the work area as instructed but couldn't figure out how to apply the code to the buttons as the tutorial advised. Is there a specific command that allows me to apply the code to the images that I brought into the work area. I tried to click on each image but the properties of these only allows me to edit the image.

I am using flash mx 2004 pro ....

can anybody help please

AIR Help Required.
Hello guys!
I have embarked on my first AIR application.
So now I am trying to resize the main window. I have used the stage.nativeWindow.startResize(NativeWindowResize. BOTTOM_RIGHT); and it resizes beautifully. But this is not what I want. First of all I want the Stage to Expand..but not the elements. Meaning you know when you create a flash app, they ask you to choose the background color..i want that part to expand but my text, images and such should remain the same size. Any solution for that?

Also, I saw this
http://livedocs.adobe.com/labs/air/1...event:resizing
go to the bottom where they talk about resizing. Does this mean I can do stuff while its being resized such as calculate the middle of the stage and such? if i can can i know how do i add the event to listen to that? cos currently i am using

function resizeWindow(e:MouseEvent):void {
stage.nativeWindow.startResize(NativeWindowResize. BOTTOM_RIGHT);
stage.addEventListener(NativeWindowBoundsEvent.RES IZING,resizing);
hellooo.text = "STAGE "+String(stage.height);
}
function resizing(e:NativeWindowBoundsEvent):void {
hellooo.text = String(stage.height);
bg.x=stage.height/2;
bg.y=stage.width/2;
}

but i am not getting any value in my "hellooo.text" textfield and neither is my bg centralising as i resize..

Any help?

Thanks
Murtaza

XML Help Required
Hi there,

I'm trying to create a flash file that displays two sets of information from an XML feed - the parent and the child.

The feed is in six parts and I have buttons to go back and forth. However, although the parent moves as required, the child stays on the first page. Code below. Any help would be appreciated as its driving me made.

(you may recognise some of the code!)

PopulateLists = function (bob) {
first_txt.text = last_txt.text=gpa_txt.text="";
for (j = 0; j<bob.length; j++) {
participant = bob[j].attributes;
first_txt.text += participant.name+"
";
last_txt.text += participant.best+"
";
gpa_txt.text += participant.bookie+"
";
}
}
function loadXML(loaded) {
if (loaded) {
xmlData = this.firstChild.firstChild;
participant_array = xmlData.childNodes;
PopulateLists(participant_array);
xmlNode = this.firstChild;
description = [];
time = [];
link = [];
total = xmlNode.childNodes.length;
totalNum = 0;
for (i=0; i<total; i++) {
description[i] = xmlNode.childNodes[i].attributes.course;
time[i] = xmlNode.childNodes[i].attributes.name;
link[i] = xmlNode.childNodes[i].attributes.map;
}
firstImage();
} else {
content = "file not loaded!";
}
}
participant_array;
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("adracing_next6.xml");
// ///////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
// ///////////////////////////////////
p = 0;
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
desc_txt.text = description[p];
time_txt.text = time[p];
link_txt.Button = link[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
desc_txt.text = description[p];
time_txt.text = time[p];
link_txt.Button = link[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
desc_txt.text = description[0];
time_txt.text = time[0];
link_txt.Button = link[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}

Help Required
I'm about to start a big gaming portal, where the features can be seen here: http://ngg.no-ip.org/features.php

It's still in devellopment, don't try to register.

I thought that a good main page and admin panel could be done in flash.

What I would need is a nice design, and a page done completely in flash (menu and header of the page) and the middle content will be used for the different pages. One nice thing would be to have 5 different menu on the left with their own items, with a + sign to expand/unexpand the menu.

I'm staff on a big irc network, gamesurge, dedicated to gaming, so as soon as i get the website to work, i'll get a lot of users in no time.

I'll also add the name / url of the choice of the user who helps me with this in the sponsors list.

Looking for: help me to do it, or a link to a nice design in flash that i could use freely.

Everything on my site will be free.

Help Required For Me Not To Get Mad, Lol
Hey,
Over the Christmas break, I thought I could design all these web designs. I found out quickly, how naive I was.
I was hoping someone could help me out in the steps to make a site.
For example,
www.hp.com (Its not flash, but how would I start)
---------------------------------------------------------
1. I went into macromedia and designed the outlines for it.
2. Then I went to adobe Photoshop and made the colors
3. I imported the colors into macromedia,
4. Then I did something wrong cause it doesnt look right.

Whats the steps in this site, Thanks

www.default.com
http://www.munkmotion.com/
and those two

if someone could mentor me, with questions I have. I would be forever gratful.

Thanks

Hope everyone had the best X-mas and a better New Year

Arrays Referencing Other Arrays?
Picture this... I declare two arrays:

array1= new Array();
array2 = new Array();

Then I went through some data and added values to "array1". For this example, let's say it has 20 values. (length = 20)

I want array2 to be a "backup" of this data, so I did this:

array2 = array1;

I would expect array2 to simply be a copy of the contents of array1. But, whenever I .pop() a value off of array1, array2 ALSO loses that same value! How is this possible? Is array2 only a "reference" to array1??

Only Arrays Or Arrays And Objects
Hi

I've been told not to do this with an array...


PHP Code:



var travelbooks:Array = new Array();
travelbooks.push({titel: "Madrid", release: 2004, pages: 248});
travelbooks.push({titel: "Barcelona", release: 2003, pages: 224});
travelbooks.push({titel: "Tenerife", release: 2002, pages: 124});
travelbooks.push({titel: "Malaga", release: 2005, pages: 172});

for (var i=0; i < travelbooks.length; i++) {
     trace(travelbooks[i].release + " - " + travelbooks[i].titel);





... but to do this...


PHP Code:



var travelbooks:Array = new Array();

var book_1:Object = {titel: "Madrid", release: 2004, pages: 248};
var book_2:Object = {titel: "Barcelona", release: 2003, pages: 224};
var book_3:Object = {titel: "Tenerife", release: 2002, pages: 124};
var book_4:Object = {titel: "Malaga", release: 2005, pages: 172};

travelbooks.push(book_1, book_2, book_3, book_4);
trace(book_1.titel);
trace(travelbooks);
trace(book_releases);

function book_releases():void {
    for (var i:Number = 0; i < travelbooks.length; i++) {
        trace(travelbooks[i].release + " - " + travelbooks[i].titel);
    }





Could you tell me why i'm not supposed to use the first example? And why example 2 doesn't work?

Thank you
Ferran

Creating Arrays From Arrays?
I'm not sure this is possible but...

I'm trying to create a series of arrays from one main array.

My main array [main_elements] contains four items - interactive, motion, print and illustration. This main_elements array is dynamically created from an xml file.

I'm wanting to create a set of arrays based on the content within this initial 'main_elements' array.

So i would end up with an interactive array, motion array , print array and an illustration array.

currently i'm at this stage with it...although i've tried every other combination i can think of to get it working.


ActionScript Code:
for(q=0; q<work_elements; q++){
 
    main_elements[q] = xmlDoc_xml.firstChild.childNodes[1].childNodes[q].nodeName
    //this is the actual categories of work - the areas - interactive,motion,print,illustration
   
    var Vname = work_elements_ARRAY[q]
    //i need to create an array based on the names in the work elements area
    //ie i need an interactive array - motion array etc
    Vname = new Array
                   
    trace("Vname-- "+interactive.length)
    //this trace should pick up the newly created interactive array but it doesn't exsits...???
    }//end of second for
 


I would then fill these arrays with the work items.

As you can guess its a menu system of the simplest kind i'm trying to build.

Is there a better way to be doing this or is it a case of correct syntax / approach??

# Of Arrays - Length Of Arrays
Is a length of 540 to long for an array?
If so what a good limit to cap it at?

What # arrays of max limit are to many for a flash movie?
10?
100?
1000?

I'm just curious as i need to track the _x and _y of a dragable MC for as long as possible - 3 to 4 minutes if i can squeeze that. It needs to have smooth motion when it's played back, so the cord's need to be stored about 3 times a second. I was just wondering if anybody has an idea of how much data is too much?


All comments are welcome. Thx

Arrays In Arrays Trouble
does AS3 have capability to do multidimensional arrays? My computer won't let me download it because I have edu version. 2D arrays would make this a lot easier. Here's the class:

Code:

class com.samainsworth.math.matrix {
   
   var arr:Array;
   var r:Number;
   var c:Number;
   
   public function matrix(r:Number, c:Number) {
      this.arr = new Array(c);
      for(var i in this.arr) {
         this.arr[i] = new Array(r);
      }
      
      this.r = r;
      this.c = c;
   }
   
   public function getPos(r:Number, c:Number) {
      return this.arr[c][r];
   }
   
   public function fillPos(val, r:Number, c:Number):Boolean {
      if(r <= this.r && c <= this.c) {
         this.arr[c][r] = val;
         return true;
      }
      else {
         return false;
      }
   }
}

here's the code in the movie:

Code:

import com.samainsworth.math.matrix;

var m:matrix = new matrix(2, 2);

trace(m.fillPos(1, 0, 0));
m.arr[0][0] = 1;

trace(m.getPos(0, 0));

and last but not least here's error:

Code:

true
undefined


I'm trying to work on 3D which requires a lot of matrices work even though flash doesn't support 3D you can fake it with a lot of math - http://www.kirupa.com/developer/actions ... onCube.swf

Required Fields
I am looking to make certain fields required on a flash form, any tips on how I go about doing this would be helpful.

Urgent Help Required
I have been asked to create a flash game fairly similar to this: http://www.fetch.lycos.co.uk/
The game needs to have floating ballons which explode to reveal a prize icon when clicked on. The combination of prizes for every game needs to be called from a database. The game also needs to register which icons have been revealed as "fetch" does.
I have 5 icons to be used so I figured I would create 6 balloon movie clips (one empty balloon is required) and hopefully it is possible to get the database to specify which movieclips to load. further than that I am completely stuck!
We need to a) Connect to a database, b) Call a stored procedure, and c) accept parameters
Does anyone have any idea how to do this?

Help Required Again......actionscript
ok
problem

i want to allow the user to exit the cd-rom from the exit button ...back to normal setting of their pc? is this to do with unloading movies ? anybody out there who can point me to good source files/ tutorials please help

also i want the swfs to fill the pc screen ( i do not know the correct wording for this projection maybe?) anyone out there can let me know

thanks again to all who have helped so far......
please help again if youse can !

J

URGENT HELP REQUIRED
A HTML page is split into 2 frames. In each frame is an SWF. SWF 1 is 50k, SWF 2 is 120K. Is it possible to get both SWF's to load/start at exactly the same time, instead of 1 starting before 2.


Please help..........

PRELOADER HELP REQUIRED
Hi guys, any chance someone can help me? Please help a maiden in distress. I've got this preloader its basic, if (_root._framesloaded == _root._totalframes) {
gotoAndStop (45);
}
then it loops if the frames haven't loaded. I want to apply a percentage bar to show how its streaming/downloading, the reason being, that the graphics are rather heavy and people lose their patience and try to refresh because nothings happening. But I'm getting terribly confused is there anyone that knows a simple script that I can apply. I've looked at the tutorial but they just use the loadBytes, and I prefer to use the above script.
If anyone can help I'll be really grateful.
Cheers guys.
Crusty.

Asfunction Help Required.
Wonder if anybody can help me please:

I have been playing with Flash and XML and have got to the stage where I have displayed an HTML formatted list (dynamically loaded from an external XML file)......

I now want to be able to click on individual items within this list and display further details.

The only way I can think of doing this is to use the asfunction syntax as follows:

<A HREF="asfunction:functionName, parameter1 | parameter2">click here</A>

Clicking on the 'click here' text will then call the function functionName:

function functionName (parameters){
var bothParameters = parameters.split("|");
trace(parameter1[0]);
trace(parameter2[1]);
}

which in this case would trace the two parameters i.e. parameter1 and parameter2.

However, the problem I have and which there may not be a solution is that I want the parameters to be variables based on where the user clicks i.e. if it is a numbered list the parameters could be these numbers. Although I have created these variables with Actionscript they are not getting called by the function.....the function always calls the parameter text which is input within the HREF tags.

Is is the case that using asfunction within HREF tags that variables cannot be used?

If so is there anyway round this?

Don't expect much response to this as I suspect it's a bit of a bugger to solve but am ever hopeful!!

Thanks

Sean



The following is a segment of code I have been using:

function getDates(month,year){
dateStr = "";
//trace(month + year); //Check it's picking up the variables

for(i=0;i<=zepTourDates.firstChild.childNodes.leng th;i++){
//following if statements used to convert month values from Jan,Feb
//etc into figures i.e. 1,2,3 so as to be compatible with the
//next if statement which pulls it's values directly from the XML doc
//which were entered as 1,2,3......perhaps should have made standard
//entries for both however this is good practice!!
if(month == "Jan") {
month = "1";
}else if (month == "Feb"){
month = "2";
}else if (month == "Mar"){
month = "3";
}else if (month == "Apr"){
month = "4";
}else if (month == "May"){
month = "5";
}else if (month == "Jun"){
month = "6";
}else if (month == "Jul"){
month = "7";
}else if (month == "Aug"){
month = "8";
}else if (month == "Sep"){
month = "9";
}else if (month == "Oct"){
month = "10";
}else if (month == "Nov"){
month = "11";
}else if (month == "Dec"){
month = "12";
}else if (month == "All"){
month = "All";
}




if(zepTourDates.firstChild.childNodes[i].firstChild.firstChild.nextSibling.firstChild.node Value == month && zepTourDates.firstChild.childNodes[i].firstChild.firstChild.firstChild.nodeValue == year){

sDay = zepTourDates.firstChild.childNodes[i].firstChild.firstChild.nextSibling.nextSibling.fir stChild.nodeValue;
sMonth = zepTourDates.firstChild.childNodes[i].firstChild.firstChild.nextSibling.firstChild.node Value;
sYear = zepTourDates.firstChild.childNodes[i].firstChild.firstChild.firstChild.nodeValue;
trace(sDay + sMonth + sYear);
//may not be able to pass variables to the HREF 'asfunction....' method...the book says it
//is always a string!? If I can't pass variables which seems the case then I can't
//achieve what I want this way!!


dateStr +="<font color='#ff0000'><A HREF='asfunction:callSetlist,sDay | sMonth | sYear'>" + zepTourDates.firstChild.childNodes[i].firstChild.firstChild.nextSibling.nextSibling.fir stChild.nodeValue + " ";//<day>5</day>
monthNumber = zepTourDates.firstChild.childNodes[i].firstChild.firstChild.nextSibling.firstChild.node Value;//<month>1</month>
convertMonth(monthNumber);//converts xml month data into Jan, Feb etc
//convertMonth(zepTourDates.firstChild.childNodes[i].firstChild.firstChild.nextSibling.firstChild.node Value);
dateStr += zepTourDates.firstChild.childNodes[i].firstChild.firstChild.firstChild.nodeValue + "</font></A>";//<year>1969</year>




dateStr += " "
dateStr += zepTourDates.firstChild.childNodes[i].firstChild.nextSibling.firstChild.firstChild.node Value + ", ";//venue
dateStr += zepTourDates.firstChild.childNodes[i].firstChild.nextSibling.firstChild.nextSibling.fir stChild.nodeValue + ", ";//City
dateStr += zepTourDates.firstChild.childNodes[i].firstChild.nextSibling.firstChild.nextSibling.nex tSibling.firstChild.nodeValue + ", ";//state
dateStr += zepTourDates.firstChild.childNodes[i].firstChild.nextSibling.firstChild.nextSibling.nex tSibling.nextSibling.firstChild.nodeValue + "<br />";//country
mainScreen = dateStr;
}else if (month == "All" && zepTourDates.firstChild.childNodes[i].firstChild.firstChild.firstChild.nodeValue == year){
dateStr +="<font color='#ff0000'>" + zepTourDates.firstChild.childNodes[i].firstChild.firstChild.nextSibling.nextSibling.fir stChild.nodeValue + " ";//<day>5</day>
monthNumber = zepTourDates.firstChild.childNodes[i].firstChild.firstChild.nextSibling.firstChild.node Value;//<month>1</month>
convertMonth(monthNumber);//converts xml month data into Jan, Feb etc
//convertMonth(zepTourDates.firstChild.childNodes[i].firstChild.firstChild.nextSibling.firstChild.node Value);
dateStr += zepTourDates.firstChild.childNodes[i].firstChild.firstChild.firstChild.nodeValue + "</font>";//<year>1969</year>
dateStr += " "
dateStr += zepTourDates.firstChild.childNodes[i].firstChild.nextSibling.firstChild.firstChild.node Value + ", ";//venue
dateStr += zepTourDates.firstChild.childNodes[i].firstChild.nextSibling.firstChild.nextSibling.fir stChild.nodeValue + ", ";//City
dateStr += zepTourDates.firstChild.childNodes[i].firstChild.nextSibling.firstChild.nextSibling.nex tSibling.firstChild.nodeValue + ", ";//state
dateStr += zepTourDates.firstChild.childNodes[i].firstChild.nextSibling.firstChild.nextSibling.nex tSibling.nextSibling.firstChild.nodeValue + "<br />";//country

mainScreen = dateStr;

//although above code looks complicated due to length of strings required to access
//down into the hierachy of the XML doc all that is happening is that a check using an
//if statement is made based on the year and month selected by the user...
//the above if statment checks the year and month selected against the XML doc and
//only displays this info.....if the user selects ALL then and if else clause has
//been included to allow for month to be equal to all and then displaying all
//of the relevant year's dates/.

}
}
}

function callSetlist(sDate){
var sDetails = sDate.split("|");
trace(sDetails[0] + sDetails[1] + sDetails[2]);
}
//this function only displays the string sDay sMonth sYear
//despite an early trace proving that sDay sMonth sYear variables where being populated....

Urgent - Help Required
Hiy All

To start i have flash 5

I am working on a presentaion for a company/content proveider to show to the likes of MSN.

We have a basic flat 2d logo that is maily text (using web-safe colors) that needs to have an animated entrance into the presentation (i.e. something more cooler than having it fade onto the screen) but i dont seem to have any ideas.

Most of those in the galleries, tutorials and movies section only apply to 3d, non-flat or mettalic looking logos.

Can anybody please point me in the right direction?

Thx - JerzeyMob

Urgent Help Required
I have a move clip which is 212 x 211, within that movie clip i want random placed, speed and sized arrows to move from top right to bottom left.

The reason its in a movie clip is due to the fact that i need to place it in a certain position in my movie

Help...

Really urgent

Thanx

VERY URGENT HELP REQUIRED
Hi hi

This is actually a dreamweaver question...=p

How does one make the background of a page NOT tile...?

What codes do I have to add in?

Urgent Help Required
Hi

I want to have a Scrollable text in the middle of the movie in which i can scroll the text without disturbing the other components of my movie i don't have flash MX i want to do it in the flash 5 bu using script if somebody implemented such a thing then do help me i need as i have to work on it and it is really urgent for me.

Required Effect
Quite simply I'm looking for a way of creating a effect which symbolises a moving particle through air/fluid and leaves a trail behind it as it moves along a timeline which will be either curved or straight.... the trail needs to fade as the particle moves round... ANY IDEAS ANYONE... Oh and I ain't a flash Guru so try keep it simple

Script Required...
I need for a movie to play its scenes straight through. Each scene is made up of 1 movie clip -- a 1 framed movie clip that is on the stage. (by double clicking on the graphic, it goes into editing mode where I can see all of the frames that make up the movie clip).

What sort of ActionScript should I add in order to make it play, because, as is, it is only playing the first scene's MC? It doesn't know to make the transition...the 1 framed MCs are confusing it!

Any advice, please? I tried out a few things, including loadMovie which only made the first scene play in the background of my second scene.

Thanking you in advance,

Christine

Actionscript Help Required.
Hi,
I am having problems with actionscript. I am trying to create a 360 degree panaroma. I am using this tutorial provided.
http://www.flashkit.com/tutorials/Sp...h-51/index.php

As this tutorial is written for a previous version (i am using MX),
Set property is defined as below.
,
Set Property ("/movie2", X Position) = GetProperty("/movie1", _x) + 3557
Set Property ("/movie2", Y Position) = GetProperty("/movie1", _y)

I have changed this to match actionscript specifications.
setProperty("/movie2", X Position, getProperty("/movie1", _x+2809));
setProperty("/movie2", Y Position, getProperty("/movie1", _y));

Unfortunatly, I still get this output script error
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: ')' or ',' expected
setProperty("/movie2", X Position, getProperty("/movie1", _x+2809));

All of the set property commands throughout the script return errors. Is there a problem? I have tried placing ')' or ',' as the problem suggests but cannot find a solution. Please help me if you can.
Thanks a lot
KBFM

Urgent Help Required
Hello all

Anyone have any idea where i can get my hands on a Standalone Flash Player above ver 6.0. I have ver 6.00 and none of the new features like mp3 load work in it.

any help appreciated.

*****help Required With Buttons*****
when i make a button and then try and add an action to it, like gotoandplay a frame number, only the gotoandplay part of the code appears and not the onrealease bit whihc means that it automatically goes to that frame number. pls could someone tell me how to osrt this problem out?? thanks.

Scrollpane Help Required
i need to make a scrollpane which has text, and images together (ie in same scrollpane) as its contents. how can i do this?

Urgent Help Required
I need to add a copyright and registration trademark symbol in the dynamic text field that i have creted.....as these are symbols its difficult for me to incorporate in the dynamic text field. i tried downloading a font whch has these symbols and used html tags to show up...it did work well....the only issue being the font needs to be installed on the individuals users machine....and if the user odes not have it.....will not be able to c it.....

Is therea away i can resolve this issue....?? can i laod images in dynamic text feild ?

I need this problem to be resolved on urgent basis.....can anyone please help em out with this !!!!

Cheers!

Urgent Help Required
im loading in a external swf to my main flash movie...

in the swf that im loading there is a text field with a scroller which slides up and down

now when i scroll, the text box is scrolling up and not just the text
this is making it go all over my movie...

i dont want to use a mask cos it will mess up my font

HELP HELP HELP

Urgent Help Required
Hi...

This will sound probably the most silly question ever.........

but...

I've been asked to design a site for someone, this will be the first site i would have designed for someone else other than myself....

what i'm wondering is.......Do I make the client buy a lump of webspace from a hosting company, and just design the site for them...or.......Is it normal for designers to just buy a new domain name for the client, and host the site through my own hosting package for my own site...???

What do people normally do here...?

I dont have s 'server', I just have something like 2gb of webspace, but only 40000mb bandwidth.........

Would it be 'normal' to get the client to buy some webspace from a hosting company first...?

Please help............

Urgent Help Required -
Hi Guys

Im come back after a long time; anyways i need help urgently, Im building a Income expense Management System. And i jus started off by building the main navigation dunamically, first of all i created the dynamic MC's and in them i put a Dynamic Text Field but now the best part is that its not displaying the Text in those field and remind u all of this is in a another MC which is lying on the Root named layout

layout>DynMc>DynTxtFld>text name
Please help me i have to get this going in a day or so


//Generation of the Main Navigation Menu

//array creation for storing names, positions, width and Height that will go in the navigation menu
menu = new Array([5],[5]);


//Menu ItemX PositionY PositionWidthHeight
menuitem [0][0] = "home"; menuitem [0][1] = -304; menuitem [0][2] = -211; menuitem [0][3] = 34.2; menuitem [0][4] = 16.1;
menuitem [1][0] = "Transactions"; menuitem [1][1] = -254; menuitem [1][2] = -211; menuitem [1][3] = 66.2; menuitem [1][4] = 16.1;
menuitem [2][0] = "Reports";menuitem [2][1] = -171; menuitem [2][2] = -211; menuitem [2][3] = 42.2; menuitem [2][4] = 16.1;
menuitem [3][0] = "Help";menuitem [3][1] = -111; menuitem [3][2] = -211; menuitem [3][3] = 27.2; menuitem [3][4] = 16.1;
menuitem [4][0] = "Exit"; menuitem [4][1] = 284; menuitem [4][2] = -211; menuitem [4][3] = 23.2; menuitem [4][4] = 16.1;

//trace("menuitem" + r);
//Building a standard Format for the Text of the Menu Items
menuitemformat = new TextFormat ();
menuitemformat.color = 0xFFFFFF;
//Adding a Loop; to Place menu items on stage
for(r=0; r<=4; r++){
// Creating empty MovieClips for all menu items
layout.createEmptyMovieClip(menuitem[r][0], r);
// Position each Menu item on stage
layout.menuitem[r][0]._x = menuitem[r][1];
layout.menuitem[r][0]._y = menuitem[r][2];
// Add a Dynamic Text Fields to each MovieClip
layout.menuitem[r][0].createTextField("menuitem" + r, menuitem[r][1], menuitem[r][2], menuitem[r][3], menuitem[r][4]);
// trace("menuitem" + r);
// Making a variable to store Text Field Names
textfieldname = "menuitem" + r;
// Adding Text to the Dynamic Text Field
layout.menuitem[r][0].textfieldname.text = menuitem[r][0];
// Setting Text Format of Text Field
layout.menuitem[r][0].textfieldname.text.setTextFormat (menuitemformat);
}

****help With Scenes Required****
i have made a movie clip with 4 scenes. but because one of the scenes has a lot of images, the whole movie take s a long time to load. i want to remove this scene and save it as a separate movie clip. how do i do this?

Quick Help Required
Hey guys, i downloaded flash mx 2004 on saturday, and have only been doing actionscript for 3 days. after following a couple tutorials i think im getting the hang of this scripting. Ive made my own text based game with like 10 rooms and like 5 items with actions with them.. but thats not important right now i just want to brag lol =)

I dont have a problem with something ive done, that is because I don't really know where to start! Here is what I want to do:

on mouseclick
alpha=100

okay so that should make an object invisible when i click on it, right? I don't know where to put the indents or the brackets or anything like that. All the script ive seen so far has been all fancy, but the thing above does not look very fancy. Can someone just tell me how to do the brackets and whatever else i need to do to make it work?

Urgent Help Required
hi folks

ive created a swf which consists of a scroller made from
flash mx component,

the problem im having is that i need to load that swf into an empty movie clip which is in the main movie, but when the swf loads in the scroller doesnt work.... although if its loaded onto the main timeline it does work

i need it to work when its loaded into the movie clip


ive included some files for you to have a look

Copyright © 2005-08 www.BigResource.com, All rights reserved