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 August 24th, 2006, 04:33 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default testing locally: issues with MovieClipLoader class

Just bought the book, and I'm new to ActionScript, so am looking for clarification...

In reference to chapter 8, page 218, "Using The Monolithic Approach", I can't seem to get the code to work unless I pass a URL instead of a local file to this line:
Code:
contentLoader.loadClip.("portfolio.swf", myContent);
When using "http://www.nathanderksen.com/book/trailer.swf" it works fine.

I find lots of conflicting info on the web regarding this. Some people say it will not work with a local file, that you have to have the file on a web server before testing. Others disagree and say only the onLoadProgress class event won't work when testing locally.

I'm just trying to create a preloader as on page 218 to pull in a single swf into my main movie, and want to make sure it is loaded before playing the main movie.

Thanks for any help.
Reply With Quote
  #2 (permalink)  
Old December 15th, 2006, 03:59 PM
Registered User
 
Join Date: Dec 2006
Location: , , USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is a domain issue.

The reason you see conflicting reports and advice is that this issue has changed with each release of Flash. The local security sandbox became more restricted with each release.

In Short, Adobe stopped local .swf files from accessing data on a user's drive unless the user specifically allowed the access. Projector files have their own exceptions and freedom in this regard.

This, as you have found out, can be quite annoying while working on your development machine.

There is a solution. The solution is to add your local project folder to your list of trusted data sources.

Open Flash a SWF in your browser.

Right click on the Flash and Choose Settings.

Now Choose the Advanced Button.

This brings you to a special web page which contains a set of options for customizing your Flash player.

Choose the Global Security Settings option in the left navigation.

Now Choose the Edit Location combo box.

Now Choose Add location... from the menu in the combo box.

Then Choose Browse For Folder.

In the Windows Dialog that opens, find the folder where your swf assets reside that you'd like to load into your swf file and select ok.

That's it. Your SWF should now be able to access the swfs and any assets that reside in that local folder.

Adobe has more information at
http://www.macromedia.com/support/do...4a.html#119065
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 while testing the class tester curiaquita Java Basics 5 February 13th, 2009 01:07 AM
testing locally but using remote connection string JezHarvey BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 August 12th, 2008 07:28 AM
Unable to Test ASPEmail Locally GLSmyth Classic ASP Components 2 March 8th, 2007 04:16 PM
Problem running PHP locally shoreman BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 April 24th, 2005 11:37 AM
search function not working locally Henry 8 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 December 19th, 2004 11:31 AM



All times are GMT -4. The time now is 02:49 AM.


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