Knowledge Base |
Loader Pro V3
(views: 13843)
The Loader Pro V3 is a professional loader that features scale modes (scale, crop, scale-crop, resize), align modes, built in preloaders and customized transition tweens. Here are all known issues for Loader Pro V3. If you have any questions that you think we should discuss here please let us know.
Create MCTE and Loader v3 using code
(2008-01-19 - views: 10787)
Q: How does one apply mcte effects to objects loaded with Loaderv3 using actionscript 3.0 ?
A: The idea is to create the target object (in this case the loader) before the MCTE instance is created. If you create the MCTE instance using only the constructor. After that, simply set the parameters and it will work. Here is the code snippet that will create an instance of the loader component and then an instance of the MCTE component (using the constructor). Finally, some parameters of the loader will be set, then added to the display list and the source parameter set to load some content.
// Create the instances for the loader and the MCTE components.
var myLoader:LoaderProV3AS3 = new LoaderProV3AS3();
var scaleMCTE:MCTE = new MCTE(myLoader, false, "show", "Scale", 6, 16, "Back", "easeOut", 15);
// Set the loader's visibility property, because, when added by code,
// the MCTE component automatically turns visibility off for the loader
// component.
myLoader.visibility = true;
// Set the loader's size and position.
myLoader.setSize(605, 240);
myLoader.x = 10;
myLoader.y = 70;
// The transition type must be set to "MCTE" or "MCTEfade", otherwise
// the MCTE transition will not be applied.
myLoader.transitionType = "MCTE";
addChild(myLoader);
myLoader.source= "ExternalContent.swf";
// Create the instances for the loader and the MCTE components.
var myLoader:LoaderProV3AS3 = new LoaderProV3AS3();
var scaleMCTE:MCTE = new MCTE(myLoader, false, "show", "Scale", 6, 16, "Back", "easeOut", 15);
// Set the loader's visibility property, because, when added by code,
// the MCTE component automatically turns visibility off for the loader
// component.
myLoader.visibility = true;
// Set the loader's size and position.
myLoader.setSize(605, 240);
myLoader.x = 10;
myLoader.y = 70;
// The transition type must be set to "MCTE" or "MCTEfade", otherwise
// the MCTE transition will not be applied.
myLoader.transitionType = "MCTE";
addChild(myLoader);
myLoader.source= "ExternalContent.swf";
User Comments
Visibilty Property
1119: Access of possibly undefined property visibility through a reference with static type LoaderProV3AS3.
Here is the rest of my code:
import com.jumpeye.Events.MCTEEvents;
import com.jumpeye.Events.LoaderEvents;
import flash.events.MouseEvent;
// Create the instances for the loader and the MCTE components.
var myLoader:LoaderProV3AS3 = new LoaderProV3AS3();
var scaleMCTE:MCTE = new MCTE(myLoader, false, "show", "Scale", 6, 16, "Back", "easeOut", 15);
// Set the loader's size and position.
myLoader.setSize(600, 400);
myLoader.x = 0.0;
myLoader.y = 0.0;
// The transition type must be set to "MCTE" or "MCTEfade", otherwise
// the MCTE transition will not be applied.
myLoader.transitionType = "MCTE";
addChild(myLoader);
// Set the loader's visibility property, because, when added by code,
// the MCTE component automatically turns visibility off for the loader
// component.
myLoader.visibility = true;
myLoader.source = "img1.jpg";
one.addEventListener(MouseEvent.CLICK, oneclickHandler);
two.addEventListener(MouseEvent.CLICK, twoclickHandler);
three.addEventListener(MouseEvent.CLICK, threeclickHandler);
four.addEventListener(MouseEvent.CLICK, fourclickHandler);
five.addEventListener(MouseEvent.CLICK, fiveclickHandler);
one.buttonMode=true;
two.buttonMode=true;
three.buttonMode=true;
four.buttonMode=true;
five.buttonMode=true;
function oneclickHandler(evt:MouseEvent):void
{
myLoader.source = "img1.jpg";
}
function twoclickHandler(evt:MouseEvent):void
{
myLoader.source = "img2.jpg";
}
function threeclickHandler(evt:MouseEvent):void
{
myLoader.source = "img3.jpg";
}
function fourclickHandler(evt:MouseEvent):void
{
myLoader.source = "img4.jpg";
}
function fiveclickHandler(evt:MouseEvent):void
{
myLoader.source = "img5.jpg";
}
Any help? These tutorials are shaky.
posted by xFLASHSTUDENTx on 2009-09-07
This code isn't working. I'm trying to do the same thing. I'm getting this error:1119: Access of possibly undefined property visibility through a reference with static type LoaderProV3AS3.
Here is the rest of my code:
import com.jumpeye.Events.MCTEEvents;
import com.jumpeye.Events.LoaderEvents;
import flash.events.MouseEvent;
// Create the instances for the loader and the MCTE components.
var myLoader:LoaderProV3AS3 = new LoaderProV3AS3();
var scaleMCTE:MCTE = new MCTE(myLoader, false, "show", "Scale", 6, 16, "Back", "easeOut", 15);
// Set the loader's size and position.
myLoader.setSize(600, 400);
myLoader.x = 0.0;
myLoader.y = 0.0;
// The transition type must be set to "MCTE" or "MCTEfade", otherwise
// the MCTE transition will not be applied.
myLoader.transitionType = "MCTE";
addChild(myLoader);
// Set the loader's visibility property, because, when added by code,
// the MCTE component automatically turns visibility off for the loader
// component.
myLoader.visibility = true;
myLoader.source = "img1.jpg";
one.addEventListener(MouseEvent.CLICK, oneclickHandler);
two.addEventListener(MouseEvent.CLICK, twoclickHandler);
three.addEventListener(MouseEvent.CLICK, threeclickHandler);
four.addEventListener(MouseEvent.CLICK, fourclickHandler);
five.addEventListener(MouseEvent.CLICK, fiveclickHandler);
one.buttonMode=true;
two.buttonMode=true;
three.buttonMode=true;
four.buttonMode=true;
five.buttonMode=true;
function oneclickHandler(evt:MouseEvent):void
{
myLoader.source = "img1.jpg";
}
function twoclickHandler(evt:MouseEvent):void
{
myLoader.source = "img2.jpg";
}
function threeclickHandler(evt:MouseEvent):void
{
myLoader.source = "img3.jpg";
}
function fourclickHandler(evt:MouseEvent):void
{
myLoader.source = "img4.jpg";
}
function fiveclickHandler(evt:MouseEvent):void
{
myLoader.source = "img5.jpg";
}
Any help? These tutorials are shaky.
Image Transition with MCTE via actionscript
myLoader.visibility = true;
posted by xFLASHSTUDENTx on 2009-09-11
I fixed it. Just remove this line:myLoader.visibility = true;
Login to post your comment










can you put an example of as3