Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-19-2009, 05:45 AM   #1
codec
Registered User
 
Join Date: Feb 2009
Posts: 9
Default importing vs loading swf (referencing)

I'm slightly confused about syntax and references in as3
I wrote an app in as2 which was very easy to reference loaded code from an external swf.

So now I'm getting into as3, and thought it's about time I learn about class files and how to keep the code off the timeline.

But now I have to recompile every fla that imports an updated class. This means republishing about 20 files if I change 1 class.

So I decided maybe I should load code from an swf instead of importing it in a class file. The loaded code in an swf is only compiled 1 time from an otherwise empty fla.

And can be loaded into any swf without having to republish anything but the empty fla.

I'm trying to keep my assets separate from the code. This minimizes coding time and makes upgrades easy. And decreases bandwidth on updates.

I guess my question is this:
Is it possible to access code in a class that is 'imported' in a swf then that swf is loaded into another swf
(the loader contains the interface, the loaded code applies functions to the interface by passing references to assets).

I am wondering because I would rather write classes now that I know the rules and restrictions. If I write on the timeline there are no restrictions.
But if I write classes that are imported into an empty swf, then loaded by the interface I cannot seem to access the class methods after the load is complete.

I hope that sounds clear.

Has anyone got a better solution?
codec is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading AS2/other SWF into Flash CS3 (as3) project - Scaling Issues tmeh ActionScript 3.0 6 12-16-2009 03:55 PM
loading swf in container over other swf unloads previous swf?? Tereba ActionScript 2.0 14 09-23-2008 03:11 PM
SWF loading a SWF with an FLV in it Cocytus ActionScript 3.0 1 09-18-2008 06:19 PM
Loading external swf, then loading data... mike248 Other Flash General Questions 1 05-27-2007 02:11 AM
Loading on-top of existing swf (then unloading previous swf)?? papalazarou78 ActionScript 2.0 6 05-10-2007 11:25 PM


All times are GMT. The time now is 04:08 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.