RE: [Flashcoders] How to embed metadata in SWF files?

2006-07-20 Thread The Helmsman
If you are loading one movie to another use following technique:

Main movie
Main movie variable defined:
Var testVar:String = Hello world;

External movie loaded to level 1:
External movie variable defined:
Var testVar:String = Hello world - external;

Now let's load external movie to level 1:
Trace(_level0.testVar) prints Hello world;
Trace(_root.testVar) prints Hello world - external;
Trace(_level1.testVar) prints Hello world - external;

Then same external movie we'll load to some mc called container_mc which
located on the main movie timeline:
Trace(_level0.testVar) prints Hello world;
Trace(_root.testVar) prints Hello world;
Trace(_root.container_mc.testVar) prints Hello world - external;
Trace(_level0.container_mc.testVar) prints Hello world - external;

Hope it will help you to undestand Flash scope

Igor V. aka The Helmsman

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rifled
Cloaca
Sent: Wednesday, July 19, 2006 5:29 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] How to embed metadata in SWF files?

Are you simply opening the SWF file directly, or loading it into a wrapper
SWF?

If you're loading it directly... it's just

_root.var1
_root.var2
...

If you're loading it into a wrapper, like so:

_root.myClip.loadMovie(path/to/my/movie.swf);

once it loads, you'll be able to access the data with:

_root.myClip.var1
_root.myClip.var2
...

Make sure your movie has loaded.  Use the MovieClipLoader class and assign
an onLoad handler to access the variables.

-rc


On 7/18/06, Jeff Stearns [EMAIL PROTECTED] wrote:

 I don't have any problems getting variable assignments into the SWF 
 file.

 I have problems accessing their values when I'm playing the movie.

 The SWF contains some ActionScript in frame 1 which sets variables 
 like title=My First Movie, year=2006.
 But how can my Flash player access those variables when it loads and 
 plays the movie?  Are they in some oddball namespace like 
 _root.somethingOrOther

 thx, jeff


 On Jul 18, 2006, at 3:11 PM, Rifled Cloaca wrote:

  Or you could create a SWF using MTASC or the Flash IDE, and replace 
  the variables after it is published like this guy does:
 
  http://www.neurofuzzy.net/2005/01/27/swf-recombination/
 
 
  On 7/16/06, Mike Britton [EMAIL PROTECTED] wrote:
 
  I would build a wrapper MovieClip class extension for your 
  compiled SWF, and use LocalConnection to send/receive the values.  
  That is, use LocalConnection in both the compiled swfs and in the 
  wrapper.  The wrapper is the receiver and the compiled clips are 
  the broadcasters.
 
  http://www.osflash.org/localconnection
 
  hth,
 
  Mike
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software Premier Authorized Adobe 
  Consulting and Training http://www.figleaf.com 
  http://training.figleaf.com
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training 
  http://www.figleaf.com http://training.figleaf.com

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training 
 http://www.figleaf.com http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed metadata in SWF files?

2006-07-20 Thread Max

I'm pretty sure Flash 9 has built in metadata capabilities, although
I've never used them and I'm not aware of any way to access them from
Actionscript code. Here's some of the arguments you can use with
mxmlc.

-metadata.contributor name
-metadata.creator name
-metadata.date text
-metadata.description text
-metadata.language code
-metadata.localized-description text lang
-metadata.localized-title title lang
-metadata.publisher name
-metadata.title text

Of course, it's probably Flash 9 only.

On 7/20/06, The Helmsman [EMAIL PROTECTED] wrote:

If you are loading one movie to another use following technique:

Main movie
Main movie variable defined:
Var testVar:String = Hello world;

External movie loaded to level 1:
External movie variable defined:
Var testVar:String = Hello world - external;

Now let's load external movie to level 1:
Trace(_level0.testVar) prints Hello world;
Trace(_root.testVar) prints Hello world - external;
Trace(_level1.testVar) prints Hello world - external;

Then same external movie we'll load to some mc called container_mc which
located on the main movie timeline:
Trace(_level0.testVar) prints Hello world;
Trace(_root.testVar) prints Hello world;
Trace(_root.container_mc.testVar) prints Hello world - external;
Trace(_level0.container_mc.testVar) prints Hello world - external;

Hope it will help you to undestand Flash scope

Igor V. aka The Helmsman

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rifled
Cloaca
Sent: Wednesday, July 19, 2006 5:29 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] How to embed metadata in SWF files?

Are you simply opening the SWF file directly, or loading it into a wrapper
SWF?

If you're loading it directly... it's just

_root.var1
_root.var2
...

If you're loading it into a wrapper, like so:

_root.myClip.loadMovie(path/to/my/movie.swf);

once it loads, you'll be able to access the data with:

_root.myClip.var1
_root.myClip.var2
...

Make sure your movie has loaded.  Use the MovieClipLoader class and assign
an onLoad handler to access the variables.

-rc


On 7/18/06, Jeff Stearns [EMAIL PROTECTED] wrote:

 I don't have any problems getting variable assignments into the SWF
 file.

 I have problems accessing their values when I'm playing the movie.

 The SWF contains some ActionScript in frame 1 which sets variables
 like title=My First Movie, year=2006.
 But how can my Flash player access those variables when it loads and
 plays the movie?  Are they in some oddball namespace like
 _root.somethingOrOther

 thx, jeff


 On Jul 18, 2006, at 3:11 PM, Rifled Cloaca wrote:

  Or you could create a SWF using MTASC or the Flash IDE, and replace
  the variables after it is published like this guy does:
 
  http://www.neurofuzzy.net/2005/01/27/swf-recombination/
 
 
  On 7/16/06, Mike Britton [EMAIL PROTECTED] wrote:
 
  I would build a wrapper MovieClip class extension for your
  compiled SWF, and use LocalConnection to send/receive the values.
  That is, use LocalConnection in both the compiled swfs and in the
  wrapper.  The wrapper is the receiver and the compiled clips are
  the broadcasters.
 
  http://www.osflash.org/localconnection
 
  hth,
 
  Mike
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software Premier Authorized Adobe
  Consulting and Training http://www.figleaf.com
  http://training.figleaf.com
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com http://training.figleaf.com

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http

Re: [Flashcoders] How to embed metadata in SWF files?

2006-07-19 Thread Rifled Cloaca

Are you simply opening the SWF file directly, or loading it into a wrapper
SWF?

If you're loading it directly... it's just

_root.var1
_root.var2
...

If you're loading it into a wrapper, like so:

_root.myClip.loadMovie(path/to/my/movie.swf);

once it loads, you'll be able to access the data with:

_root.myClip.var1
_root.myClip.var2
...

Make sure your movie has loaded.  Use the MovieClipLoader class and assign
an onLoad handler to access the variables.

-rc


On 7/18/06, Jeff Stearns [EMAIL PROTECTED] wrote:


I don't have any problems getting variable assignments into the SWF
file.

I have problems accessing their values when I'm playing the movie.

The SWF contains some ActionScript in frame 1 which sets variables
like title=My First Movie, year=2006.
But how can my Flash player access those variables when it loads and
plays the movie?  Are they in some oddball namespace like
_root.somethingOrOther

thx, jeff


On Jul 18, 2006, at 3:11 PM, Rifled Cloaca wrote:

 Or you could create a SWF using MTASC or the Flash IDE, and replace
 the
 variables after it is published like this guy does:

 http://www.neurofuzzy.net/2005/01/27/swf-recombination/


 On 7/16/06, Mike Britton [EMAIL PROTECTED] wrote:

 I would build a wrapper MovieClip class extension for your compiled
 SWF, and use LocalConnection to send/receive the values.  That is,
 use
 LocalConnection in both the compiled swfs and in the wrapper.  The
 wrapper is the receiver and the compiled clips are the broadcasters.

 http://www.osflash.org/localconnection

 hth,

 Mike
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed metadata in SWF files?

2006-07-18 Thread Rifled Cloaca

Or you could create a SWF using MTASC or the Flash IDE, and replace the
variables after it is published like this guy does:

http://www.neurofuzzy.net/2005/01/27/swf-recombination/


On 7/16/06, Mike Britton [EMAIL PROTECTED] wrote:


I would build a wrapper MovieClip class extension for your compiled
SWF, and use LocalConnection to send/receive the values.  That is, use
LocalConnection in both the compiled swfs and in the wrapper.  The
wrapper is the receiver and the compiled clips are the broadcasters.

http://www.osflash.org/localconnection

hth,

Mike
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed metadata in SWF files?

2006-07-18 Thread Jeff Stearns
I don't have any problems getting variable assignments into the SWF  
file.


I have problems accessing their values when I'm playing the movie.

The SWF contains some ActionScript in frame 1 which sets variables  
like title=My First Movie, year=2006.
But how can my Flash player access those variables when it loads and  
plays the movie?  Are they in some oddball namespace like  
_root.somethingOrOther


thx, jeff


On Jul 18, 2006, at 3:11 PM, Rifled Cloaca wrote:

Or you could create a SWF using MTASC or the Flash IDE, and replace  
the

variables after it is published like this guy does:

http://www.neurofuzzy.net/2005/01/27/swf-recombination/


On 7/16/06, Mike Britton [EMAIL PROTECTED] wrote:


I would build a wrapper MovieClip class extension for your compiled
SWF, and use LocalConnection to send/receive the values.  That is,  
use

LocalConnection in both the compiled swfs and in the wrapper.  The
wrapper is the receiver and the compiled clips are the broadcasters.

http://www.osflash.org/localconnection

hth,

Mike
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed metadata in SWF files?

2006-07-16 Thread Jeff Stearns

Mike et al -

I'm targeting the current Flash player releases on Linux, Windows,  
and Mac, so that would be Flash 7 through 9.


I'm generating the SWF's using a SWF compiler that I wrote, so I have  
total control over the SWF file that I generate.


Hopes this helps,

-jeff


On Jul 15, 2006, at 10:32 PM, Mike Britton wrote:


A couple questions for you Jeff:

1. What version of Flash player are you targeting?
2. How are you generating the swfs?


Mike
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



On Jul 15, 2006, at 10:27 PM, Jeff Stearns wrote:

I hope that you'll take pity on a Flash novice.  I'm an experienced  
programmer, but Flash is very new to me.


I need to generate SWF movie files containing embedded data such as  
title, production year, etc.  The Flash player needs to be able to  
read these values when it starts playing the movie.


I'd really appreciate advice on how best to do this.

I wrote the program which generates the SWF files, so I have  
complete control over their content.  I tried embedding variable  
assignments in the first frame of my SWF files by generating the  
bytecodes to perform variable assignments (ActionPush year,  
ActionPush 2006, ActionSetVariable).  But I can't figure out how to  
access these variables from the Flash player.  Hints?


Or is there a better way to approach this?  All I want is for the  
player to be able to extract a few values from each movie file.


Thanks for your help!  -jeff

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed metadata in SWF files?

2006-07-16 Thread James Deakin

I would sudgest the following.


1. you can simply define variables by creating an AS file the complier
parses. you can declare the vars in there
2. There is an existing open source complier called MTASC  (osflash.org has
lots of info on this)

hope that helps

On 7/16/06, Jeff Stearns [EMAIL PROTECTED] wrote:


Mike et al -

I'm targeting the current Flash player releases on Linux, Windows,
and Mac, so that would be Flash 7 through 9.

I'm generating the SWF's using a SWF compiler that I wrote, so I have
total control over the SWF file that I generate.

Hopes this helps,

-jeff


On Jul 15, 2006, at 10:32 PM, Mike Britton wrote:

 A couple questions for you Jeff:

 1. What version of Flash player are you targeting?
 2. How are you generating the swfs?


 Mike
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com


On Jul 15, 2006, at 10:27 PM, Jeff Stearns wrote:

 I hope that you'll take pity on a Flash novice.  I'm an experienced
 programmer, but Flash is very new to me.

 I need to generate SWF movie files containing embedded data such as
 title, production year, etc.  The Flash player needs to be able to
 read these values when it starts playing the movie.

 I'd really appreciate advice on how best to do this.

 I wrote the program which generates the SWF files, so I have
 complete control over their content.  I tried embedding variable
 assignments in the first frame of my SWF files by generating the
 bytecodes to perform variable assignments (ActionPush year,
 ActionPush 2006, ActionSetVariable).  But I can't figure out how to
 access these variables from the Flash player.  Hints?

 Or is there a better way to approach this?  All I want is for the
 player to be able to extract a few values from each movie file.

 Thanks for your help!  -jeff
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed metadata in SWF files?

2006-07-16 Thread Jeff Stearns
That's basically what I'm doing now.  (I used a different compiler  
instead of MTASC, but the difference seems irrelevant here.)


But how do I read those variables from my UI running in the Flash  
player?  I want to load my movie and then read the variables.  How do  
you folks do that?


thanks!

-jeff

On Jul 16, 2006, at 9:53 AM, James Deakin wrote:


I would sudgest the following.

1. you can simply define variables by creating an AS file the complier
parses. you can declare the vars in there
2. There is an existing open source complier called MTASC   
(osflash.org has

lots of info on this)

hope that helps


On Jul 15, 2006, at 10:27 PM, Jeff Stearns wrote:

 I hope that you'll take pity on a Flash novice.  I'm an experienced
 programmer, but Flash is very new to me.

 I need to generate SWF movie files containing embedded data such as
 title, production year, etc.  The Flash player needs to be able to
 read these values when it starts playing the movie.

 I'd really appreciate advice on how best to do this.

 I wrote the program which generates the SWF files, so I have
 complete control over their content.  I tried embedding variable
 assignments in the first frame of my SWF files by generating the
 bytecodes to perform variable assignments (ActionPush year,
 ActionPush 2006, ActionSetVariable).  But I can't figure out how to
 access these variables from the Flash player.  Hints?

 Or is there a better way to approach this?  All I want is for the
 player to be able to extract a few values from each movie file.

 Thanks for your help!  -jeff

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed metadata in SWF files?

2006-07-16 Thread Mike Britton

I would build a wrapper MovieClip class extension for your compiled
SWF, and use LocalConnection to send/receive the values.  That is, use
LocalConnection in both the compiled swfs and in the wrapper.  The
wrapper is the receiver and the compiled clips are the broadcasters.

http://www.osflash.org/localconnection

hth,

Mike
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed metadata in SWF files?

2006-07-15 Thread Mike Britton

A couple questions for you Jeff:

1. What version of Flash player are you targeting?
2. How are you generating the swfs?


Mike
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com