So now I am trying this:
in .fla:
var countF:int=0;
function incCountF(e:Event):void
{
countF++;
}
for ...... {
var newF:MDot = new MDot();
newF.addEventListener("increaseF",incCountF);
addChild(newF);
}
then in the .as I have:
package
{
[Event(name="increaseF")];
public function .......
{
var e:Event = new Event("increaseF");
dispatchEvent(e);
}
}
for some reason I think my listener is not catching it....
________________________________________
From: [email protected]
[[email protected]] On Behalf Of Henrik Andersson
[[email protected]]
Sent: Monday, August 30, 2010 1:43 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Accessing .fla var
Lehr, Theodore skriver:
> In my .fla I have:
>
> var countF:int=0;
>
> then in the library I have a mc with linkage to an .as file
>
> In that .as file, I want to be able to:
>
> countF++;
>
Main timeline
|____>frame 1
|___>variable
|___>instance of symbol
|_>Symbol
|_>assigned class
|_>code to access the variable
DocumentClass(parent).var++
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders