-
1. Re: Error: Error #2078: The name property of a Timeline-placed object cannot be modified.
Andrei1 Mar 19, 2011 7:51 PM (in response to barpos)Looks like you have an object on the timeline with name loadedImg that you defined at authoring.
-
2. Re: Error: Error #2078: The name property of a Timeline-placed object cannot be modified.
barpos Mar 19, 2011 8:05 PM (in response to Andrei1)I swear to God, I don't. I have tried many different names, but to no avail ...
var loadMe:Loader = new Loader();
loadMe.contentLoaderInfo.addEventListener(Event.COMPLETE, loadIsNowcomplete);
loadMe.load(new URLRequest("Snowfighter.jpg"));function loadIsNowcomplete(event:Event):void
{
var abcdefghijklmnopqrstuvwxyz:Bitmap = new Bitmap();
abcdefghijklmnopqrstuvwxyz = event.target.content;
abcdefghijklmnopqrstuvwxyz.name = "MyLoadedImage"; // bugging line
var kontainer:MovieClip = new MovieClip();
kontainer.addChild(abcdefghijklmnopqrstuvwxyz);
addChild(kontainer);
trace("content: " + kontainer.getChildAt(0).name); // instance8
theTween.addTarget(abcdefghijklmnopqrstuvwxyz, 1);
} -
3. Re: Error: Error #2078: The name property of a Timeline-placed object cannot be modified.
barpos Mar 20, 2011 6:44 AM (in response to barpos)Follow-up!
I just created a new AS3 Flash document and copied and pasted the same code. The problem remains even though the new timeline is absolutely empty.
Ron
-
4. Re: Error: Error #2078: The name property of a Timeline-placed object cannot be modified.
FeZEC Mar 20, 2011 11:43 AM (in response to barpos)The problem is that loader adds that information to a loaded image as an instance.
If you wish to change the name.. get the BitmapData from teh bitmap var data:BitmapData= Bitmap(event.target.content).bitmapData
and then var frame:Bitmap=new Bitmap(data); frame.name="name"
-
5. Re: Error: Error #2078: The name property of a Timeline-placed object cannot be modified.
barpos Mar 20, 2011 12:39 PM (in response to FeZEC)Wow! You're good! <s>
var imgData:BitmapData = event.target.content.bitmapData;
var imgObj:Bitmap = new Bitmap(imgData);
imgObj.name = "My Own Loaded Image";
var imgGroup:MovieClip = new MovieClip();
imgGroup.addChild(imgObj);
addChild(imgGroup);
trace("content: " + imgGroup.getChildAt(0)); // object bitmaptrace("content: " + imgGroup.getChildAt(0).name); // My Own Loaded Image
Thanks a bunch ...
Regards,
Ron



