Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-14-2007, 05:20 PM
Member
 
Join Date: Nov 2007
Posts: 46
Default loadmovie

i want swfkit to load an image file in an mc, but it wont work >
in flash i got a button and an mc (loader)
on the button i use this code:
on (release) {
fscommand("ffish_run", "openfiles");
}

in swfkit i use:
var filename = Dialogs.fileOpen("flash movies(*.jpg)|*.jpg|", "jpg");
if (filename) {
_root.loader.loadMovie(0, filename);
}

but this doesn't do anything ???
can someone help me please ??
Reply With Quote
  #2 (permalink)  
Old 11-14-2007, 07:30 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: loadmovie

You cannot control a movieclip in ffish script directly; however, you can only load an image into the level0 in ffish script:

FlashPlayer.loadMovie(0, filename);

To solve the problem, we recommend that you call swfkit objects directly in actionscript, e.g. in actionscript 2
Code:
import SWFKit.*;
var filename = Dialogs.fileOpen("flash movies(*.jpg)|*.jpg|", "jpg");
if (filename) {
 _root.loader.loadMovie(0, filename);
}
Reply With Quote
  #3 (permalink)  
Old 11-17-2007, 09:37 AM
Member
 
Join Date: Nov 2007
Posts: 46
Default Re: loadmovie

???
this doesn't work.
it doesn't pop up the load screen.
Reply With Quote
  #4 (permalink)  
Old 11-21-2007, 02:54 PM
Member
 
Join Date: Nov 2007
Posts: 46
Default Re: loadmovie

come on can't noone help me
i forgot to tell that i don't work with swfkit 3.0 but with an older version 2.2 :
Reply With Quote
  #5 (permalink)  
Old 11-23-2007, 04:35 PM
Member
 
Join Date: Nov 2007
Posts: 46
Default Re: loadmovie

please someone
Reply With Quote
  #6 (permalink)  
Old 11-24-2007, 04:55 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re: loadmovie

To code swfkit code directly in flash you need the swfkit3

In swfkit2 you have to build a workaround like this.

1. browse for a file with swfkit: you get a variable containing the path of your jpg
2. transfer the path to flash with the setVariable method
3. since this is asynch programming, let flash know you transfered the path. I used to do this with the trigger component.
4. when the trigger is activated, it calls a function in flash to load the jpg.

I made you a sample


Reply With Quote
  #7 (permalink)  
Old 11-25-2007, 08:24 AM
Member
 
Join Date: Nov 2007
Posts: 46
Default Re: loadmovie

thank you !!! ;D
is it also possible to load a png???
Reply With Quote
  #8 (permalink)  
Old 11-25-2007, 01:28 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re: loadmovie

sure
Reply With Quote
  #9 (permalink)  
Old 11-26-2007, 06:01 PM
Member
 
Join Date: Nov 2007
Posts: 46
Default Re: loadmovie

and if i want to import multiple images, i need 2 triggers, or how???
Reply With Quote
  #10 (permalink)  
Old 11-26-2007, 09:10 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: loadmovie

Sure, you can use 2 triggers. However, you can also combine the file names of the images, e.g. "c:\image.jpg,c:\sun.png" and pass it to one trigger. Then in the trigger event handler you can separate the image file names and load them separately.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:37 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.