Showing posts with label FLASH. Show all posts
Showing posts with label FLASH. Show all posts

Friday, August 10, 2012

Codigo para loader un swf dentro de otro swf AS 3.0





var myLoader:Loader = new Loader();                     // create a new instance of the Loader class
var url:URLRequest = new URLRequest("ExternalSWF.swf"); // in this case both SWFs are in the same folder
myLoader.load(url);                                     // load the SWF file
addChild(myLoader);                                     // add that instance to the display list, adding it to the Stage at 0,0
// (optional)
myLoader.x = 10;                                        // move the loaded SWF 10 pixels to the right (from the left edge)  
myLoader.y = 175;                                       // move the loaded SWF 175 pixels down from the top
// (optional) load a second external SWF file
var my2ndLoader:Loader = new Loader();
var url2:URLRequest = new URLRequest("ExternalSWF2.swf");
my2ndLoader.load(url2);
addChild(my2ndLoader);                                  // optionally, you could put the 2nd SWF beneath
                                                        // the 1st by using addChildAt(my2ndLoader, 1);
                                                        // displacing the 1st SWF from position 1 to 2 in the display list
// (optional) scaling of the 2nd SWF file
my2ndLoader.scaleX = 2;                                 // scale the SWF horizontally by 200%
my2ndLoader.scaleY = 2;                                 // scale the SWF vertically by 200%

Friday, March 9, 2012

Convertir Power point in flash

Converting PowerPoint to Flash would absolutely be a good choice to distribute your bulky PowerPoint Presentation.

You can do the whole PowerPoint-to-Flash conversion manually or with related softwares.

First, you’ll need to prepare the PowerPoint document. Make sure you are not using any complicated gradients or animations. These will be interpreted poorly when they are brought into Flash. Also, make sure there are no objects that fall outside the confines of the slide area. This will ensure that all the slides align correctly when they are imported to Flash. Now, save a copy of your presentation without any background images. You may want to also choose a contrasting background color to easily see the content of each slide. You all import the background images into Flash at a later time.

Second, choose File > Save As… from your PowerPoint document and save the presentation as a Windows Metafile (*.wmf). This will save your entire presentation as a sequence of files. WMF files keep all text.

Next, create a new Flash Document and resize the Stage to 720 x 540. Change the background color to black. Choose File > Import > Import to Stage… and import the first WMF file. When asked to import all of the images in the sequence, choose Yes. This will place each slide from your presentation onto a sequence of frames.

Then, create a new layer under the slides layer and import the images to use for your background. You’ll probably need two images, one for title slides and one for the regular slides.

Now it’s time for some manual labor. You’ll need to go through every frame of the movie and delete the solid background shape from your slides layer. Once this is complete, you should see the content of each slide with the correct background image behind it.

Finally, add a frame to the end of your movie. Place some static text on that frame that says something like “End of slideshow, click to exit.”

Alright, now it’s time to move on to some ActionScript. Create a new layer for your actions. There are a few statements you’ll need to include right away. First, you want this movie to play full screen so add an fscommand.

fscommand(“fullscreen”,”true”)-;To make sure the Stage resizes correctly specify the scaleMode.

Stage.scaleMode = “exactFit”; Finally, you don’t want the movie to begin playing through all the slides right away before the user starts clicking, so add a stop function.

stop(); You’ll need to include some functions that will be used frequently to navigate the presentation.

function gotoNextSlide():Void {
if (_currentframe < _totalframes) {
gotoAndStop(_currentframe + 1);
} else {
quit();
}

}

function gotoPreviousSlide():Void {
gotoAndStop(_currentframe - 1);

}

function gotoHome():Void {
gotoAndStop(1);

}

function gotoEnd():Void {
if (_currentframe < _totalframes) {
gotoAndStop(_totalframes - 1);
}

}

function quit():Void {
fscommand("quit");

}
Next, we need to handle all the keyboard and mouse events so that the user can navigate through the slides. We'll do this by creating a new listener object.

var myListener:Object = new Object();

myListener.onKeyDown = myOnKeyDown;
myListener.onKeyUp = myOnKeyUp;
Key.addListener(myListener);

myListener.onMouseUp = myOnMouseUp;
Mouse.addListener(myListener);-Here are the listener functions.

function myOnKeyDown():Void {
if (Key.isDown(Key.DOWN) || Key.isDown(Key.PGDN)) {
gotoNextSlide();
} else if (Key.isDown(Key.UP) || Key.isDown(Key.PGUP)) {
gotoPreviousSlide();
} else if (Key.isDown(Key.END)) {
gotoEnd();
} else if (Key.isDown(Key.HOME)) {
gotoHome();
}

}

function myOnKeyUp():Void {
if (Key.getCode() == 27) {
quit();
}

}

function myOnMouseUp():Void {
gotoNextSlide();

}

Thursday, March 8, 2012

Como copiar un Intro Flash

Go Firefox Browser
Localizas el intro
Click in View
Click in Favicon del Intro
Aparece un window More Info Click
Click in Media
Click in .swf or save as  Entonces save in Desktop
Open con programa  Sothink swf
Convert to fla file