Jump to content

Flash in C#

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1
kavery

kavery

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
Hi this is programming for a game for uni work

I just want to know what is possible in C# cause i'm use to C++
For Splash screen i want to make a .swf from flash to use cause it'll add some cradit to my work. but i want to know if swf file are compatible and simple to use.

The test i made didn't work, probaly cause i using 2005 on the course but the tutorials are in the new 2008 Visual Studio.

is there any tutorials you know (or methods) that work in 2005, i'm also using AnX 2.0 in this game if that imporant

#2
PGP_Protector

PGP_Protector

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 253 posts
Any reason you're not upgrading to C# 2008?

Edit:
I did see this link with some sample 2005 code.
Mike Swanson's Blog : Example C# Code for Reading Flash (SWF) Files

Edited by PGP_Protector, 18 November 2009 - 01:10 PM.
Found Link for 2005 Code


#3
kavery

kavery

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
i have 2008 on my system, but this is marked worked, and must run on 2005 for university marking. And as far as i know 2008 don't support save as 2005 .sln, so i've had to down the old one again to work.

i know it a pain but being uni work i have to do it in 2005

#4
PGP_Protector

PGP_Protector

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 253 posts
Ok, just tested this, it's simple :)

1) in your Toolbox Add a Com Object Shockwave Flash Object
2) Add this to your Splash Screen Form
3) In this Code Snip I'm calling it FlashObj
        public Form1()
        {
            InitializeComponent();
            FlashObj.Stop();
            FlashObj.Movie = Application.StartupPath + "\\MyFlashFile.swf";
            FlashObj.Play();
        }


#5
kavery

kavery

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
that seems to work, cheers thanks for the help

#6
doomsaber

doomsaber

    Newbie

  • Members
  • Pip
  • 5 posts
I didn't it was possible to do flash in c#

#7
kavery

kavery

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
it's alittle more complicated than PGP's code, but i already had the file to initate but the implementation works, it's not the best way to do it but it is possible. i have three sections of control on it but i'm sure there are better ways than what i did.

#8
jhkdf

jhkdf

    Newbie

  • Members
  • Pip
  • 1 posts

doomsaber said:

I didn't it was possible to do flash in c#

great news, i love my seed upgrade.
_________________

#9
salmjta

salmjta

    Newbie

  • Members
  • Pip
  • 1 posts
I accept with information:this is marked worked, and must run on 2005 for university marking.