Error 1120 It shouldn't be this hard. Need some help
Hello all.
I am working with AS3 code that was provided by a company to help embed video into their files. Here is the error I get.
| 1120: Access of undefined property VideoName. |
Here is the code followed by the instructions.
import flash.events.Event;
var _page:Object;
function setBookPage(page:Object):void
{
_page = page;
page.addEventListener("pageOpen", handlePageOpen);
page.addEventListener("pageClose", handlePageClose);
}
function handlePageOpen(e:Event):void
{
VideoName.play(); // to launch video automatically
}
function handlePageClose(e:Event):void
{
VideoName.pause(); // to stop video
}
Click File > Import > Import Video. Import your video’s FLV file to Adobe Flash. After selecting the desired file, select “Load external video with playback component”.
Then you can choose a skin and color for your video.
Enter a file name in Properties/SWF. Note that this name must match the file name used later in the code.
Enter the relative path in the 'Source' field, e.g. just the name of your video file rather than the entire path. This will allow your video to playback properly even if your publication has moved to another location.
At the bottom of the window you can see the timeline. Notice the little black dot on the left side of the timeline. Click on it and press F9.
Copy and paste the following code into the window that appears:
import flash.events.Event;
var _page:Object;
function setBookPage(page:Object):void
{
_page = page;
page.addEventListener("pageOpen", handlePageOpen);
page.addEventListener("pageClose", handlePageClose);
}
function handlePageOpen(e:Event):void
{
VideoName.play(); // to launch video automatically
}
function handlePageClose(e:Event):void
{
VideoName.pause(); // to stop video
}
Close the window.
Click Ctrl+Enter to see a preview. If you edit the project later, save it and click Ctrl+Enter again to update the files.
Any help would be greatly appreciated. I have sent this to the company as well, but no response yet and the deadline is looming.
I am using Flash Professional CS6 to compile the AS.
