dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Flash Movie, Microsoft Visual Basic and Variables?

  1. #1
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127

    Flash Movie, Microsoft Visual Basic and Variables?

    Hi,
    we have been using flash animation running in the flash OCX in applications created in Microsoft Visual Basic for a while.

    We set variables in the movie with VB.
    Can we read the from the movie with VB?

    its kind of urgent, any tips or links to resources greatly appreciated

    Using Flash 8 pro, flash8 ocx, VB6

    mark

  2. #2
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127
    just a bump, no one familiar with using VB and flash together?

  3. #3
    Member
    Join Date
    Mar 2005
    Location
    Study Bristol UK. Live Southampton UK
    Posts
    43

    VB image loading

    Hi Mark,

    It wasn't possible for me to send you a private message so I'm trying to contact you via this thread.

    I was wondering if you could help me with a little something. I am a bit of a actionscript newbie so excuse if this question/task is simple or impossible etc.

    I am trying to find a method to load an external image into a MC by using a variable where the image URL is determined by VB. If you could point me in any helpful direction it would be kindly appreciated.

    Ollie

  4. #4
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127
    Is the movie playing in the OCX inside a VB app?

    if so seems to me you need to set a variable in Flash using VB. Then use that variable as the URL of the image.
    Be aware you can only set a variable on the _root in the movie from VB.

    assuming the name of your flash control in VB is MyFlashMovie

    In VB

    MyFlashMovie.SetVariable "ImageURL" ,"http://www.mysite.com/myimage.jpg"

    Then in flash on a button or wherever you want

    loadMovieNum(_root.ImageURL,"myEmptymc");

    you will need the correct path to your empty mc of course.

    Here is some useful stuff on VB and Flash, its hard to find I know!
    http://www.adobe.com/devnet/flashslideshow/
    also grab the PDF "Macromedia Flash and VB: A Potent Combination" on that intro page

  5. #5
    Junior Member
    Join Date
    Mar 2008
    Posts
    9

    Hi

    Hello,
    I am using this thread because I assume that you manage to pass vars from flash to VB, here is my code in VB :

    ''creating flash component
    Dim percorso As String
    percorso = ("C:\roulette2.swf")
    Dim startupSize = New System.Drawing.Size(1024, 768)
    Dim startupsize2 = New System.Drawing.Size(800, 600)
    flash.BeginInit()
    flash.Location = New Point(0, 0)
    flash.Name = "Testina"
    flash.TabIndex = 0
    Controls.Add(flash)
    flash.Size = startupSize
    flash.EndInit()
    flash.LoadMovie(0, percorso)
    flash.Play()
    FormBorderStyle = Windows.Forms.FormBorderStyle.None
    ClientSize = startupSize

    ''getting the var from flash
    Private Sub Testina_FSCommand(ByVal sender As Object, ByVal e As AxShockwaveFlashObjects._IShockwaveFlashEvents_FSC ommandEvent)
    If (e.command = "flashMessage") Then
    Form1.Label1.Text = (e.args)
    Me.Close()
    End If
    End Sub

    ''sending from flash
    on (press)
    {
    a = /layerbalance;
    fscommand("flashMessage",a);
    }

    But I get nothing, I am using code created flash because I have a problem with the activex component "error make sure activex properly registered", and when I managed to create by drag and drop it worked but now I can't make it work.

    thank you
    Kyriakos

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center