Jump to content

Flash embedded not playing movie!


Recommended Posts

Hi guys. I dont know why the swf flash does not playing... just freezed... Can anyone help pls?

#NoTrayIcon
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <SendMessage.au3>
Global $FlashCtrl
Global $oFlash
Global $fError = False
Global Const $SC_DRAGMOVE = 0xF012
FileInstall ("condom.swf", @TempDir & "\condom.swf")
Opt("GuiOnEventMode", 1)
$mygui = GuiCreate ("Simple ToolBox", 140, 500, 1000, 400, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_TOPMOST)
    GuiSetState (@SW_SHOW)
GuiSetBkColor(0xffffff)
WinSettrans("Simple ToolBox", "", 200)
GuiSetOnEvent($GUI_EVENT_PRIMARYDOWN, "messagetogui")
Func messagetogui()
    _SendMessage($mygui, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)
EndFunc
$oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash.10")
$oAutoItError = ObjEvent("AutoIt.Error", "COMError")
$FlashCtrl = GUICtrlCreateObj($oFlash, 0, 0, 0, 559)
With $oFlash
    .Movie = @TempDir & "\condom.swf"
    .wmode = "Opaque"
    .Loop = True
    .allowScriptAccess = "Always"
    .Playing = True
    .FlashVars = ""
    .ScaleMode = 2
EndWIth
GuiSetState()
While 1
    Sleep(10)
WEnd

Link for the swf file is : http://www.filefactory.com/file/b1a02ed/n/condom.swf (sorry for such hosting)

Link to comment
Share on other sites

Can any 1 fix me?

Perhaps but please wait at least 24 hours before bumping a post.

Why the next post has already more than 1400 views and mine - only 21??

Primarily since it's been around since September of 2009 and it's on a topic that many people are interested in.

Is here any professional who can help to fix my code so flash will run?

In all liklihood, yes. Again you need to display some patience. I never work with flash and have no interest in working with it now either so you will have to wait until someone who is interested AND has the knowledge to come along.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I played with your script and when I removed the bolded line, it played:

.Movie = @TempDir & "\condom.swf"

.wmode = "Opaque"

.Loop = True

.allowScriptAccess = "Always"

.Playing = True

.FlashVars = ""

.ScaleMode = 2

#include <ByteMe.au3>

Link to comment
Share on other sites

GeoSoft, i understood,- it is almost warn ) OK will be fine next time.

And to last reply.. Sleepydvdr, thank you, it really works fine, but plays movie only once.

I will decide something about repeat.

Edited by electrico
Link to comment
Share on other sites

What kind of values are .Playing and .Loop? Are they string values, BOOLs, or what? In your example code you're using the AutoIt boolean value True, which is not a string value or a numerical value. You should check your object documentation and see what is really expected. It could be a string value of "True" or a BOOL (1 or 0).

Link to comment
Share on other sites

This is not the first time I have seen flash issues like this. Check out this and try searching for simlar posts.

Edited by bo8ster

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

  • 2 weeks later...

I had the the same issue that failed to create embedded flash player object.

I tried to register flash10e.ocx then anything was fine.

Hope it's useful for you. :mellow:

1. Press'Win' key + 'R' to show run box

2. Execute "regsver32 C:\Windows\System32\Macromed\Flash\flash10e.ocx"

3. Run your AutoIt script again.

Edited by Weasly
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...