This is a discussion on "Array issues" within the Flash & Multimedia Forum section. This forum, and the thread "Array issues are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Array issues
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Array issues
Im using Flash MX 2004 Pro.
in my HTML i have these two lines: <param name="Maxnum" value="3" > <param name="Dirname" value="imagedir/" > In the actionscript I would like to remove the line that manually sets the array, and replace it with something 'like' this:
thus resulting with the equivilent of : this.pArray = ["imagedir/1.jpg" , "imagedir/2.jpg" , "imagedir/3.jpg]; nomatter how i try this i cannot set the value of the array correctly. Any ideas ? |
|
|
|
|||
|
what are you getting? imagedir/.jpg ? imagedir/ ?
just looking at that I can't really see any reason why it shouldn't work |
|
|||
|
Your code is fine, you just need to declare that pArray is an array object:
pArray = new Array(); before you use it, and your code works fine. You can check your results with trace(pArray); For clarification, you would have been getting "undefined" as the contents of pArray (if you used trace) and not any result at all, which clearly shows that you simply didn't tell flash that pArray was an array. |
![]() |
| Tags |
| array, issues |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with array searching | womble | JavaScript Forum | 2 | Nov 25th, 2007 01:31 |
| Top 4 array to text box | buzcajun | Flash & Multimedia Forum | 10 | Sep 14th, 2006 19:13 |
| Getting an item from an array | monfu | ASP.NET Forum | 0 | Mar 29th, 2006 13:17 |
| Sorting a new array from an existing array | Ozeona | Flash & Multimedia Forum | 2 | Sep 20th, 2005 08:43 |
| array unable to check another array so as to be displayed | Ozeona | Flash & Multimedia Forum | 1 | Aug 5th, 2005 10:26 |