Jump to content
Search Community

url property of a LoaderMax item

clipclicmusic test
Moderator Tag

Recommended Posts

Hi Jack

 

This is a request for the best solution, rather than a bug or feature request...

Using the info you gave I can get the Loader from the queue, which is great.

If I then want to reload that same swf in another container, I cannot see an eay way to do so. The easiest way I see is to read the url property (which I can see in the trace action, but cannot find a way to access)

How can I read the url value in the loader ?

 

var loader:SWFLoader = clipArtQueue.getLoader(e.currentTarget.name) as SWFLoader;

trace(loader)

 

Thans

 

Jason

Link to comment
Share on other sites

Every LoaderItem (SWFLoader, ImageLoader, XMLLoader, etc.) has a "url" property :)

 

var loader:SWFLoader = clipArtQueue.getLoader(e.currentTarget.name) as SWFLoader;
trace(loader.url);

 

Take a peek at the ASDocs to see all the properties and methods available for each class. Many of them are inherited, so make sure you click the "Show Inherited Public Properties" link above the list of properties/methods.

Link to comment
Share on other sites

Hi Jack

 

Have done tests... and it seems that AVM1 swfs give a generic AVM1.swf url as the url property

e.target.loaderInfo.url

Whereas AVM2 swfs give the correct value (ie their own)

 

BUT... when I use currentTarget, both AVM1 and AVM2 swf report a generic AVM1.swf url

 

I am completely lost here. Seems illogical to me. Is this a glitch. Or am I missing something ????

 

In the (more complex) app I am working on, the AVM1 swf gives the 'root' url, which is even weirder.... but have been unable to reproduce in simplified version.

 

Any ideas ?

 

thanks

 

Jason

Link to comment
Share on other sites

Hi Jack

 

Flat apologies, as the French say... no excuses. Just dimwittedness (and an interesting sense of spelling)

Have seen what you mean and all is well

 

Thnaks for your help

 

Jason

 

PS - as a fairly novice AS3 user, could I encourage people to post examples ? Please ?

Link to comment
Share on other sites

Hey there Jason,

 

This is in regards to your request for examples. They are über helpful when I am trying to wrap my head around something so I totally understand. Pop up a question with your request though. Folks here can be mighty helpful not to mention Jack himself of course. :)

 

Michael

Link to comment
Share on other sites

Hi Michael

 

Thanks for the support :)

 

Jack is rather helpful, isn't he ?

 

I think the problem is the same for everyone - getting your head around AS3 is a BIG, slow deal... but once you 'get it', I get the feeling, all of this seems really obvious.

Give me another year or two, and I might have 'got it'.

 

I am using a LOT of trial and error - tyring to avoid bothering everyone.

 

Another cup of coffee for me

 

Best

 

jason

Link to comment
Share on other sites

Heh I hear you. One other thing that helps a lot, but adds an initial learning curve, is using an IDE that helps you learn. If you're on Windows the really nice http://www.flashdevelop.org/ is very VERY nice. And it's free. If you're on Mac It's a bit different. I'm not sure of any free options.

 

One other thing is getting to understand the AS3 documentation. There are a lot of examples in there.

 

http://www.adobe.com/livedocs/flash/9.0 ... LangRefV3/

 

[edit]

 

Forgot to mention there is a zip reference here:

 

http://help.adobe.com/support/documenta ... angRef.zip

 

and that includes a search through the documentation as well. Very useful.

Link to comment
Share on other sites

Hi Michael

 

Have downloaded FlashDevelop. Thanks for the tip.

I already have all the docs... The thing I (and most other non-coders) have found hardest is getting our heads round AS3 - I skipped AS2 completely... so it was a bit of a shock !

 

If you are interested in dynamically loading fonts and using themm, I posted a work-in-progress in the TransformManager forum

 

best

 

Jason

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...