Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to run a function from a scripted MC

New Here ,
Jan 25, 2013 Jan 25, 2013

I haven't used AS1 in a while and I do not know why my code isn't working and I don't knnow how to fix it, I have been playing around with it and trying to figure out how to get to a function or run a function which is on the main timline from an mc or even just skip to that code (since its the last frame of my MC) the MC includes nothing but actionscript to gather information to save/create a .txt file.

Basically how can I run a function on the main timeline from where I am now?

if (_root.ssFileSave != "?") {

_root.filename = _root.ssFileSave;

_root.onsaver();

onsaver is the function I am trying to run and I have tried all sorts to get it working properly :S

win 7 cs5 as1 (+using SWF studio which I am using to create and save file(s))

TOPICS
ActionScript
342
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 25, 2013 Jan 25, 2013
LATEST

if onsaver is defined on the _root timeline AND it has been defined when that code executes (use trace functions to confirm), then

_root.onsaver();  // is correct coding

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines