0
votes

I'm following (or rather not following!) the tutorial found here: http://www.flashuser.net/flash-tricks/tips-tricks-10-using-drag-drop-in-actionscript-3-0.html

I've drawn a shape (its a rectangle). I've then right clicked and selected "Convert to symbol". Its of the Movie Clip type and its name is item1. (I haven't selected "export for actionscript").

My actionscript on the first frame looks like this... simply:

item1.initX = 0;

This gives the error access of undefined property item1.

I have no idea how to remedy this. Downloading the source from the link appears to be exactly the same as my attempt, yet theirs works.

Any idea why this doesn't work. No other tutorials or help anywhere seems to show my issue. I've tried everything I can think of including checking the "export for actionscript" and all sorts. No luck.

What am I doing wrong? I bet its really really simple! :p

Thanks

1

1 Answers

1
votes

You have to instantiate the symbol first. Select your symbol if it's on the stage, go to the Properties panel, and give it an instance name : item1 . Here is what the part you've missed in the tutorial : http://screencast.com/t/kk4ZlVl5

If it's not on the stage, you must select "export for actionscript" and instantiate it in your code:

 mc = new item1();