0 Replies Latest reply on May 8, 2007 4:48 AM by devans123

    VB.net, Flash 8 communication

    devans123
      Help me please,

      please find the vb.net coding I want to assign the value of the selected font to an action script variable to dynamically change the font on a .swf movie.

      //TO LOAD FLASH MOVIE
      Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      Try
      AxShockwaveFlash1.LoadMovie(0, "F:\dynamic_font_load\dynafontload.swf")
      Catch ex As Exception
      MsgBox("exception occured")
      End Try
      End Sub

      // TO SELECT FONT

      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

      Try
      FontDialog1.ShowDialog()
      font_selected = FontDialog1.Font.Name.ToString
      Catch ex As Exception
      MsgBox("exception Occured")
      End Try
      End Sub

      //ACTION SCRIPT CODE TO SET THE FONT ON THE MOVIE
      btn_cf.onRelease = function()
      {

      var myformat:TextFormat = new TextFormat();
      font_sel="Arial"
      myformat.font = font_sel;
      load_font.setTextFormat(myformat);

      }


      Instead of Assigning the font directly to the "font_sel" variable I want to send the name of the font selected using the vb.net program and change the font on the flash movie.

      I am unable to send the value feom vb.net to flash variable so it doesn't want to work

      Is this the correct logic

      please help me
      regards devan