• Anmelden

JuZzeR™

Ankömmling

  • »JuZzeR™« ist der Autor dieses Themas

Motto: Was passiert wenn... ...ups!

  • Nachricht senden

1

Freitag, 2. April 2010, 16:22

Flashskript nur bis zu ~3MB?

hey ich hb schon meie 2te Frage ich hab den Videoskript da für den Flash Player und wollte halt videos einfügen ...logisch ...
es ging bis die videos kamen die größer waren (kleinstes von den großen war 3,41 MB) die haben nicht mehr gefunzt da war dann nur noch blackscreen ich dachte mir hey die sind ja etwas größer villeicht warte ich ein bisschen das sie laden können ....ja nach dem essen kam ich dann wider und es war immernoch nicht geladen (immernoch blackscreen) also kann der flash player videos nur bis zu einer bestimmten größe abspielen? :hm: (lange Rede kurzer Sinn =] )
Was passiert wenn...

...ups!

Reborn

hat beim Stromkonzern schon Rabatt

Motto: Wer noch was vom Wochenende weis, hat es nie erlebt!

  • Nachricht senden

2

Freitag, 2. April 2010, 20:36

Also 1. ein Lösungsvorschlag :D :
Zerschnipsle deinen Film doch mal.
2. fals das 1. nicht dem entspricht was du haben willst, eine Idee wie man dir besser helfen könnte:
Schick uns doch mal das Script.
Mehr als a Allgäuer ka a Mensch it wera.


Wie soll ich wissen was ich denke, bevor ich nicht höre was ich sage?


Spoiler: OpenSource-Projects
NES-Emulator - a simple NES-Emulator
ERDL - a embedded Ruby Interpreter with the abilltiy to render images with DirectX ERDL shall be 100% compatible to RPGXP-Ruby Scripts
zum Lesen den Text mit der Maus markieren

JuZzeR™

Ankömmling

  • »JuZzeR™« ist der Autor dieses Themas

Motto: Was passiert wenn... ...ups!

  • Nachricht senden

3

Samstag, 3. April 2010, 21:12

also ich probier jetzt ma 1. und schick ma das skript aber das ich ja ok ...weil es bei anderen vids geklappt hat aber trotzden :
Spoiler

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
#==============================================================================#
#                                                                 Version 0.3  #
#                         RPG Maker XP Flash Player                            #
#                                                                              #
#  Author: 灼眼的夏娜                     Updated by: Dark_Wolf_Warrior/Dahrkael #
#                                                                              #
#  How to Use:                                                                 #
#                                      Graphics.freeze                         #
#  1. Go to Main Script and add ---->  $flash = Play.new                       #
#                                      $scene = Scene_Title.new                #
#                                                                              #
#  2. Copy the .dll and the .ocx to the game folder                            #
#                                                                              #
#  3. Make a folder called "Flash" in the folder "Graphics" -> Graphics/Flash/ #
#                                                                              #
#  4. To play a flash file use:                                                #
#    $flash.play("file.swf", button)                                           #
#                                                                              #
#    button can be 0 or 1, if 1 you can skip the flash using "Enter"           #
#                                                                              #
#                                                                              #
#                                                                              #
#  Interactive flashes requires RGSS knownledge to make they work              #
#                                                                              #
#  Original Keyb module by HoundNinja                                          #
#                                                                              #
#==============================================================================#
 
 
 
class String
 
  CP_ACP = 0
  CP_UTF8 = 65001
 
  def u2s
    m2w = Win32API.new("kernel32", "MultiByteToWideChar", "ilpipi", "i")
    w2m = Win32API.new("kernel32", "WideCharToMultiByte", "ilpipipp", "i")
 
    len = m2w.call(CP_UTF8, 0, self, -1, nil, 0)
    buf = "\0" * (len*2)
    m2w.call(CP_UTF8, 0, self, -1, buf, buf.size/2)
 
    len = w2m.call(CP_ACP, 0, buf, -1, nil, 0, nil, nil)
    ret = "\0" * len
    w2m.call(CP_ACP, 0, buf, -1, ret, ret.size, nil, nil)
 
    return ret
  end
 
  def s2u
    m2w = Win32API.new("kernel32", "MultiByteToWideChar", "ilpipi", "i")
    w2m = Win32API.new("kernel32", "WideCharToMultiByte", "ilpipipp", "i")
 
    len = m2w.call(CP_ACP, 0, self, -1, nil, 0);
    buf = "\0" * (len*2)
    m2w.call(CP_ACP, 0, self, -1, buf, buf.size/2);
 
    len = w2m.call(CP_UTF8, 0, buf, -1, nil, 0, nil, nil);
    ret = "\0" * len
    w2m.call(CP_UTF8, 0, buf, -1, ret, ret.size, nil, nil);
 
    return ret
  end
 
  def s2u!
    self[0, length] = s2u
  end  
 
  def u2s!
    self[0, length] = u2s
  end
 
end
 
class Bitmap
 
  RtlMoveMemory_pi = Win32API.new('kernel32', 'RtlMoveMemory', 'pii', 'i')
  RtlMoveMemory_ip = Win32API.new('kernel32', 'RtlMoveMemory', 'ipi', 'i')
 
  def address
    buffer, ad = "xxxx", object_id * 2 + 16
    RtlMoveMemory_pi.call(buffer, ad, 4); ad = buffer.unpack("L")[0] + 8
    RtlMoveMemory_pi.call(buffer, ad, 4); ad = buffer.unpack("L")[0] + 16
    RtlMoveMemory_pi.call(buffer, ad, 4); return buffer.unpack("L")[0]
  end
 
end 
 
class RMFlash
 
	API_NEW		      = Win32API.new("RMFlash", "_new", "piil", "l")
	API_UPDATE	    = Win32API.new("RMFlash", "_update", "l", "v")
	API_FREE	      = Win32API.new("RMFlash", "_free", "l", "v")
	API_PLAYING     = Win32API.new("RMFlash", "_is_playing", "l", "i")
	API_PAUSE	      = Win32API.new("RMFlash", "_pause", "l", "v")
	API_RESUME	    = Win32API.new("RMFlash", "_resume", "l", "v")
	API_BACK	      = Win32API.new("RMFlash", "_back", "l", "v")
	API_REWIND	    = Win32API.new("RMFlash", "_rewind", "l", "v")
	API_FORWARD	    = Win32API.new("RMFlash", "_forward", "l", "v")
	API_CURFRAME	  = Win32API.new("RMFlash", "_cur_frame", "l", "i")
	API_TOTALFRAME	= Win32API.new("RMFlash", "_total_frames", "l", "i")
	API_GOTOFRAME	  = Win32API.new("RMFlash", "_goto_frame", "li", "v")
	API_GETLOOP		  = Win32API.new("RMFlash", "_get_loop", "l", "i")
	API_SETLOOP		  = Win32API.new("RMFlash", "_set_loop", "li", "v")
	API_CLEARALL	  = Win32API.new("RMFlash", "_clear_all", "v", "v")
  API_VALID       = Win32API.new("RMFlash", "_valid", "l", "i")
  API_SENDMSG     = Win32API.new("RMFlash", "_send_message", "liii", "l")
 
  CUR_PATH        = Dir.pwd
 
	def self.get_version
 
	end
 
	def self.clear_all
		API_CLEARALL.call
	end
 
  def self.load(name, width, height, v = nil)
    new("#{CUR_PATH}/Graphics/Flash/#{name}".u2s, width, height, v)
  end
 
  attr_reader   :valid
 
	def initialize(flash_name, flash_width, flash_height, viewport = nil)
		@sprite = Sprite.new(viewport)
		@sprite.bitmap = Bitmap.new(flash_width, flash_height)
		@value = API_NEW.call(flash_name, flash_width, flash_height, @sprite.bitmap.address)
		@loop = API_GETLOOP.call(@value) > 0
    @valid = API_VALID.call(@value) > 0
	end
 
	def viewport
		@sprite.viewport
	end
 
	def update
		API_UPDATE.call(@value)
	end
 
	def dispose
		API_FREE.call(@sprite.bitmap.address)
	end
 
	def playing?
		API_PLAYING.call(@value) > 0
	end
 
	def pause
		API_PAUSE.call(@value)
	end
 
	def resume
		API_RESUME.call(@value)
	end
 
	def back
		API_BACK.call(@value)
	end
 
	def rewind
		API_REWIND.call(@value)
	end
 
	def forward
		API_FORWARD.call(@value)
	end
 
	def current_frame
		API_CURFRAME.call(@value)
	end
 
	def total_frames
		API_TOTALFRAME.call(@value)
	end
 
	def goto_frame(goal_frame)
		API_GOTOFRAME.call(@value, goal_frame)
	end
 
	def x
		@sprite.x
	end
 
	def x=(v)
		@sprite.x = v
	end
 
	def y
		@sprite.y
	end
 
	def y=(v)
		@sprite.y = v
	end
 
	def z
		@sprite.z
	end
 
	def z=(v)
		@sprite.z = v
	end
 
	def width
		@sprite.bitmap.width
	end
 
	def height
		@sprite.bitmap.height
	end
 
	def loop?
		@loop
	end
 
	def loop=(v)
		if @loop != v
			@loop = v
			API_SETLOOP.call(@value, v)
		end
	end
 
  def msg_to_flash(msg, wParam, lParam)
    return API_SENDMSG.call(@value, msg, wParam, lParam)
  end
 
  #  例
  WM_MOUSEMOVE  = 0x0200
 
  def make_long(a, b)
    return (a & 0xffff ) | (b & 0xffff) << 16
  end
 
  def on_mouse_move(x, y)
    return msg_to_flash(WM_MOUSEMOVE, 0, make_long(x, y))
  end
 
end
 
module Kernel
 
  alias origin_exit exit unless method_defined? :exit
 
  def exit(*args)
    RMFlash.clear_all
    origin_exit(*args)
  end
 
end
 
module Keyb
  $keys = {}
  $keys["Enter"] = 0x0D
  GetKeyState = Win32API.new("user32","GetAsyncKeyState",['i'],'i')
  module_function 
  def trigger(rkey) 
    GetKeyState.call(rkey) & 0x01 == 1
  end
end
 
class Play
 
  def play(filename, button)
    fondo = Sprite.new
    fondo.bitmap = Bitmap.new(640, 480)
    fondo.bitmap.fill_rect(0, 0, 640, 480, Color.new(0,0,0,255))
    fls = RMFlash.load(filename, 640, 480)
    fls.loop = 1
    fls.z = 9999
    @button = button
    @fr = Graphics.frame_rate
    Graphics.frame_rate = 40
 
    while true
      Graphics.update
      #Input.update
      fls.update
      break if @button == 1 and Keyb.trigger($keys["Enter"]) 
      break if !fls.playing?
      end
    fls.dispose
    Graphics.frame_rate = @fr
    fondo.dispose
  end
 
end
 
 
und das bei main :
#==============================================================================
# ** Main
#------------------------------------------------------------------------------
#  After defining each class, actual processing begins here.
#==============================================================================
 
begin
  # Prepare for transition
  Graphics.freeze
  $flash = Play.new
  # Make scene object (title screen)
  $scene = Scene_Title.new
  # Call main method as long as $scene is effective
  while $scene != nil
    $scene.main
  end
  # Fade out
  Graphics.transition(20)
rescue Errno::ENOENT
  # Supplement Errno::ENOENT exception
  # If unable to open file, display message and end
  filename = $!.message.sub("No such file or directory - ", "")
  print("Unable to find file #{filename}.")
end

zum Lesen den Text mit der Maus markieren

Edit
uuuuhuuuu Hindi mein Held :P es geht danke :D
der smily sollte anders sein : F der sollte so sein ->> : P
Was passiert wenn...

...ups!

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »PandaMaru« (3. April 2010, 21:12)


Ähnliche Themen

Social Bookmarks