CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2010
    Posts
    3

    I need help with a .swf link.

    All right, so I'm using Visual Studio 2010 and I'm trying to make a program where I would have a textbox where the user would type, then a "Go" button. In the textbox, the user would type a number, lets go with 1 for an example. A user would type 1 in the textbox, then it would automatically add the 1 to the end of this .swf link: "http://www.xatech.com/web_gear/chat/chat.swf?id="; after they enter the 1 in the textbox and press the "Go" button, it would add the 1 to the end of that link, then that link would open a new shockwaveflash form with the link being the Movie. Is this possible?

  2. #2
    Join Date
    Jan 2002
    Posts
    195

    Re: I need help with a .swf link.

    In the button click event create an instance of the new form and give the webbrowsercontrol on it the navegatew command "http://www.xatech.com/web_gear/chat/chat.wsf?id=" + str(TextBox1.Text)

  3. #3
    Join Date
    Dec 2010
    Posts
    3

    Re: I need help with a .swf link.

    Quote Originally Posted by Erik Wiggins View Post
    In the button click event create an instance of the new form and give the webbrowsercontrol on it the navegatew command "http://www.xatech.com/web_gear/chat/chat.wsf?id=" + str(TextBox1.Text)
    I think i was unclear asking the question... but I want the .swf link to open up another form using the shockwave tool (which allows you to play .swf files). I was looking through the tools in VS 2010, and it didn't seem to have it, like it did in 2008. Was it taken out or just renamed?

  4. #4
    Join Date
    Jan 2002
    Posts
    195

    Re: I need help with a .swf link.

    I never owned VB 2008 however I do know that shockwave is an adobe product thierfore cannont be offered with a microsoft product. It is also a internet product which is downloaded and installed as an add on to a webbrowser. I insured I had shockwave player installed on my machine and that I was in fact able to run shockwave websites through the webbrowser control on a vb form. I am however unable to locate a shockwave active X control that can be added to the toolbox.

  5. #5
    Join Date
    Dec 2010
    Posts
    2

    Re: I need help with a .swf link.

    Under Button1_Click add the following code:
    Note: Movie1 is the ShockWave Flash Player. Rename 'Movie1' to whatever yours is named.
    Code:
    If TextBox1.Text = "0"
    MessageBox.Show("Invalid XAT CBOX ID.")
    Else
    Movie1.Movie = "http://www.xatech.com/web_gear/chat/chat.swf?id=" + TextBox1.Text
    End If
    This basically sets the movie to 'http://www.xatech.com/web_gear/chat/chat.swf?id=' and whatever the text of 'TextBox1.Text' is. You can add more methods to make sure its numerical only, but this is the basic source and will do what i think you are wanting to be done.

  6. #6
    Join Date
    Dec 2010
    Posts
    3

    Re: I need help with a .swf link.

    Quote Originally Posted by TeamACiD View Post
    Under Button1_Click add the following code:
    Note: Movie1 is the ShockWave Flash Player. Rename 'Movie1' to whatever yours is named.
    Code:
    If TextBox1.Text = "0"
    MessageBox.Show("Invalid XAT CBOX ID.")
    Else
    Movie1.Movie = "http://www.xatech.com/web_gear/chat/chat.swf?id=" + TextBox1.Text
    End If
    This basically sets the movie to 'http://www.xatech.com/web_gear/chat/chat.swf?id=' and whatever the text of 'TextBox1.Text' is. You can add more methods to make sure its numerical only, but this is the basic source and will do what i think you are wanting to be done.
    When I paste the code in the Button_Click, it says "Name 'Movie1' is not declared." Also, I didn't change the name of the Movie, I just left it how it is.
    Last edited by brann666; December 19th, 2010 at 11:55 PM. Reason: Adding info.

Tags for this Thread

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

Featured