Why I can’t get the message after showing a swf file in a html?

Discussion in 'Mac Programming' started by xiaohuli170, Jun 17, 2009.

  1. macrumors newbie

    Joined:
    Jan 13, 2009
    #1
    Using

    * (NSString *)webScriptNameForSelector:(SEL)sel

    {

    if (sel == @selector(JSWriteCocoaAppLog:))
    return @"WriteCocoaAppLog";
    return nil;

    }

    * (BOOL)isSelectorExcludedFromWebScript:(SEL)selector

    {

    if (selector == @selector(JSWriteCocoaAppLog:))
    return NO;

    return YES;

    }

    *

    (void)awakeFromNib { WebScriptObject* m_winScriptObject = [self windowScriptObject];

    if (m_winScriptObject != nil) [m_winScriptObject setValue:self forKey:mad:"cocoaApp"];

    }

    methods I can received message from the javascript. just like cocoaApp.WriteCocoaAppLog("JSCommand"); in console can write the JSCommand. but after showing a swf file , I didn't receive the message from the javascript , I didn't know the reason.
     

Share This Page