Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > BOOK: Beginning ActionScript 2.0
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ActionScript 2.0
This is the forum to discuss the Wrox book Beginning ActionScript 2.0 by Nathan Derksen, Jeff Berg; ISBN: 9780764577680
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ActionScript 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 14th, 2006, 12:13 PM
Registered User
 
Join Date: Dec 2006
Location: Lee, NH, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to flashfreelancer
Default pg 49 Photo Viewer script does not work

What's going on guys? I can't afford these scripting mistakes. This is the second one and I'm on page 49!!!

The "trace" command is undefined all three times. I've triple-checked the code on the .as file. Here is the code:

var photoArray:Object = new Object ();

photoArray["weddingPhoto1"]=newObject();
photoArray["weddingPhoto1"].fileName="weddingPhoto1.jpg";
photoArray["weddingPhoto1"].fileSize=150;
photoArray["weddingPhoto1"].description="Exchanging of the rings.";

photoArray["westIndiesVacation1"]=newObject();
photoArray["westIndiesVacation1"].fileName="vacation1.jpg";
photoArray["westIndiesVacation1"].fileSize=64;
photoArray["westIndiesVacation1"].description="Arriving at the airport in sweltering heat.";

trace(photoArray["weddingPhoto1"].fileName);
trace(photoArray["weddingPhoto1"].fileSize);
trace(photoArray["westIndiesVacation1"].description);
Reply With Quote
  #2 (permalink)  
Old December 15th, 2006, 05:15 PM
Registered User
 
Join Date: Dec 2006
Location: , , USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This appears to be a recurrence of the error you found in the try it out on page 73.

In the book, the syntax is photoArray["weddingPhoto1"]=new Object();

Somehow we lost a space character again after the new keyword. I am looking for where this might have occurred elsewhere.
Reply With Quote
  #3 (permalink)  
Old December 16th, 2006, 02:27 AM
Registered User
 
Join Date: Dec 2006
Location: Lee, NH, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to flashfreelancer
Default

You're right. Thank you. I guess a space is necessary on some lines of code. I thought it wasn't because there was a statement made on page 25 (WHITE SPACE) that stated that white spacing was more a personal preference issue rather than a necessity on some lines of code.

Reply With Quote
  #4 (permalink)  
Old December 16th, 2006, 12:21 PM
Registered User
 
Join Date: Dec 2006
Location: , , USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Right on. You are correct. I hear what you're saying about the white space and our statements about it in chapter 2. I will confer with Nathan about adding a note in errata to clarify the use of minimum white space where required by instructional keywords. Examples of such keywords are var, new, return, delete, as well as class keywords such as get, set, extends, etc.






Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error posting photo to photo album abel714 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 10 February 5th, 2007 03:07 AM
Code to make crystal viewer (10) work with access Charinator Access 0 November 16th, 2006 05:26 AM
Display 'no photo' in a JSP when photo is not pres Inderjeet Pro JSP 0 April 21st, 2006 06:35 AM
why won't this script work Adam H-W Classic ASP Basics 3 October 13th, 2004 08:47 AM



All times are GMT -4. The time now is 08:38 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.