Skip navigation
Currently Being Moderated

Creating swf file from one swf

Aug 30, 2010 5:43 AM

Hi,

 

Can i create a another swf fie when clicking from main swf.

 

i  did this but its giving me an output into another IE browser. i want to  open a new window like main swf and not into IE browser i had this  code,

 

videoBtn.addEventListener(MouseEvent.CLICK,openSwf1 );

 

function openSwf1(event:MouseEvent):void
{
var request:URLRequest=new URLRequest("whateverswf.swf");
navigateToURL(request);
}

 

can anyone help me to do that?

 

Thanks

 
Replies
  • kglad
    62,007 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 30, 2010 6:51 AM   in reply to pinalbhuta

    if you want to load whateverswf.swf, use the loader class.  if you want to open whateverswf.swf in the same browser window as main swf, use:

     


     

    videoBtn.addEventListener(MouseEvent.CLICK,openSwf1 );

     

    function openSwf1(event:MouseEvent):void
    {
    var request:URLRequest=new URLRequest("whateverswf.swf");
    navigateToURL(request,"_self");
    }


     
    |
    Mark as:
  • kglad
    62,007 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 30, 2010 7:36 AM   in reply to pinalbhuta

    he's probably encountering a security issue.  have him upload the files to a server and test or have him change his security settings:

     

    http://www.macromedia.com/support/documentation/en/flashplayer/help/se ttings_manager04.html

     
    |
    Mark as:
  • kglad
    62,007 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 30, 2010 11:18 AM   in reply to pinalbhuta

    click that link and adjust your security settings to trust the swf containing your navigateToURL() function.

     
    |
    Mark as:
  • kglad
    62,007 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 30, 2010 10:14 PM   in reply to pinalbhuta

    upload the files to a server.  then you don't have to deal with the security settings.

     
    |
    Mark as:
  • kglad
    62,007 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 31, 2010 6:42 AM   in reply to pinalbhuta

    yes, as explained previously:  click that link and adjust your security settings to trust the swf containing your navigateToURL() function.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points