Embeding 3D tween
Hi,
i'm trying to embed a MovieClip (which contains 3D tween) from .swf file to AS3 project.
[Embed (source="graphics.swf", symbol="MyAnimation")]
public dynamic class MyClass extends MovieClip
But it doesnt work... any ideas?
Thanks!
You need a class var assigned to "MyAnimation" and instantiate that class as MovieClip in order to use it in your app. For example:
[Embed (source="graphics.swf", symbol="MyAnimation")]
public var MyAnimationClass:Class;
var myAnimation:MovieClip = new MyAnimationClass() as MovieClip;
Kenneth Kawamoto
http://www.materiaprima.co.uk/
Similar Messages
-
How to tween embedded flv file
Hello. I am actually working in Flash cs5.5, but I didn't know where else to post this as this is not really based on Actionscript.
I've imported 4 flv video files into my main file. What'd I'd like is for there to be a video in each corner and have each one enlarge to fill the screen for a moment and then shrink back up and go back into its original corner. I can't put a keyframe into an embedded flv file, though. Anyone know how to do this? Let me know if I need to explain this more.Awesome!! Thank you! The flv playback component didn't work b/c when I put a keyframe in there to make the size larger, it just started the movie back from the beginning.
So then I did the flv inside a movieclip action that you suggested, and it works perfectly! Thank you very much. -
Setting dynamic text in tweened animation
I'd like to be able to dynamically control text in an
imported clip, where the artist has used shape tweening to animate
the text.
From my reading of the documentation, to do shape tweening of
text you have to convert it to objects which can no longer be
accessed as a text field. So clearly I can't do this directly. Is
there any trick or work-around that might help?
Like, could the text be left as a text field, then somehow,
the main application does the work of converting it to an object at
runtime so that it will work with the tweening? (That seems like a
pretty dubious prospect honestly, but it's all I can think
of...)I appreciate your taking the time to help me and others on
this board. (I actually have another -- probably related question
-- that has never been answered, but that one is more confusing
because it involved multiple language support and worked *until* I
embedded the font.)
My understanding of Flash is definitely a mixed bag. I have
encountered so many problems (really quirks) with Flash that I kind
of start with the assumption that I'm dealing with something
quirky.
In this case, since I don't know your style, I just couldn't
see where you were going with your questions. In any case, thanks.
I'm smarter re Flash as a result of your help. -
Embedded glyphs for alpha not working for non-Latin letters
Even after reading through all the posts here, I'm still
confused about why embedding is necessary for alphas on text and
how embedding works, so maybe someone can sort it out and help me
with my problem:
I have a FLA that is trying to present the same script in
(the user's choice of) several languages -- including non-Latin
alphabets like Korean, Japanese, Russian, Chinese and Arabic. I'm
using the Strings library to load translations into my text movie
clips on the stage.
The language stuff works great except that alpha tweens
weren't working. So I selected the movie clip symbols (three of
them) in the library and told Flash to embed all glpyhs. Each of
these symbols is using Trebuchet MS, so my thinking is that I'm not
exceeding the 65K limit because I'm embedding the same glyphs for
each. (But I'm not sure if that limit is for the SWF or per
symbol.) I only have one other font in the FLA and for that one,
I'm just embedding English alpha characters.
(Perhaps as an aside, I also included these fonts Stone Sans
and Trebuchet MS as fonts in my library, but I don't understand
whether this is absolutely necessary or if embedding glyphs
eliminates the need for these.)
So with those glyphs embedded, my text alpha tweens work
beautifully. However -- and this is where I begin to shed tears --
all the Korean and Cyrillic text is gone. It's just punctuation and
no characters. I don't have Chinese, Japanese or Arabic text loaded
yet, but I imagine that these would suffer from the same problem.
What am I doing wrong? Do I need to create more than one
movie to achieve my multilanguage goal? (Or worse, render each
language separately? -- yuck!) In my old version of Flash (just
up'd to CS3) I could tween alpha text with no problem, so why is
all this embedding even necessary?
Thanks,
TimIs this just impossible? Or really hard?
-
Embedded Text - Animation problem
Hi All,
I'm having a strange problem with animated text and embedded fonts. The best way to explain is to show you...
When I don't embed the font, the problem goes away. It happens in both IE and Firefox and on multiple machines. I've also tried different fonts with the same results. I've also tried recreating the FLA from scratch with no luck. Also, after the page loads, the "streaking" effect goes away if I resize the page.
I am using CS4/AS3. Any ideas what is going on here?
Thanks.
- Adamthen there wouldn't be any problem. you must be doing something else.
to confirm, create a new project that contains just your timeline tweened text. retest. -
Embedded swf not playing in Captivate 4
Hi - I have embedded a flash authored swf into CP4, it is published from flash as a ver 9 swf. I am using Flash Player 10 on the PC. It's a single frame swf and contains AS3 code to make a simple rollover image popup (further development is planned but just testing for now). It works when viewed standalone in a browser or with the flash player
In CP4 when played by either previewing it or by publishing and viewing in a browser, the screen with that swf on it is a 'white screen of death'. I have tried the following:
1. clicking and unclicking synchronise with project
2. click and unclick externalize animations check box in prefs - the swf file was also manually copied over to the publish directory
3. set display for "duration of animation"..also tried 'rest of slide' and 'specific time'
4. click and unclick - 'synchronise with project'
5. Set Actionscript Version in prefs to "AS3"
6. I placed another different swf (flash ver9) onto the following slide in CP4 - this one with no Actionscript content at all - just a simple timeline based motion tween. It works!
Does anyone know if CP4 cannot accept embedded swf's with Actionscript 3 code in them?Hi there
Oftentimes the warning about referencing Root is simply a nuisance and may be totally ignored.
I find that the animation works here on my own PC if I click Edit > Preferences... > Project node > Publish Settings node and configure for AS3.
Perhaps try that?
Cheers... Rick
Click here for Adobe Certified Captivate and RoboHelp HTML Training
Click here for the SorcerStone Blog
Click here for RoboHelp and Captivate eBooks -
Here's the scenario: I have a main flash movie that has some
buttons and a container. When you click a button, a MovieclipLoader
loads an external swf. Both files were originally created with
Flash 7 and previously had very little actionscript. Mainly just
some stops, gotos and code for a preloader. The swf being loaded
previously had some static content and worked fine. Now I want it
to load an xml file and fade in some text, but the actionscript
tweens don't work. If I play the swf by itself, it works fine.
However, when I load it into the main movie the tweens don't work.
Right now, for testing purposes, I have the text load with _alpha =
100 and wait a couple frames before the tween script. When the
tween script starts everything being tweened disappears. I figure
it has something to do with the fact that they were Flash 7, and
maybe something isn't being imported right? But even if I publish
them as Flash 7, the tweens don't work. I've embeded all the fonts
too. Even non-text (images, shapes, etc) won't tween. They just
disappear. I've googled this and searched the forums, but I can't
find anything. So, any suggestions would be greatly appreciated.
Thanks,
-RyanJust as information the Tween class uses the _root timeline
to generate an onEnterFrame event to animate objects. If you
mistakenly used the onEnterFrame on the _root to create another
thing like a loader for example. That might be erasing the
tweenings. Try using the onEnterFrame on an empty movie
clip. -
Is it possible to make a seamless loop on an embedded video?
Hello!
I have an embedded 10-second video (of water ripples, for example) that I would like to loop continuously without displaying an obvious break/jump from the end frame to the first frame.The video itself does not end at the beginning, so it cannot simply be looped. The only way I can think of to simulate a seamless loop it to use the alpha/fade tween somehow, but I have no clue where to begin, or if this is even possible in flash. I just have these two theories:
THEORY #1:
If a movie clip can be reversed, then I can append a reversed copy of the clip on the end, which would create an actual seamless loop.
THEORY#2:
If I can cut the first 2 seconds of the clip, and paste it over the last 2 seconds of the clip, then fade in on the first one, this would create a virtual seamless loop.
Of course, I have no idea if these options are possible in Flash (I have CS3).
Many thanks in advance for any assistance,
DavideUnfortunately, fading out at the end and fading in at the beginning does not create a seamless loop, since there are a few moments when the clip alpha is 0% and everything is completely black.This might be ok for some situations. But for creating a seamless loop, I need to have something, well, more seamless.
Actually, I think I may have come up with a possible workaround to simulate a true seamless loop of an embedded video (at least get closer to it) by placing a still image (which has been converted into a movie clip) of the first frame on a new layer at the last frame, and then copying that keyframe and pasting it about 25 frames before the end, then alpha fading from the first keyframe to the final frame.
It is not perfect, but it's something.
Perhaps someone else might have a better solution? -
What can I do to smooth the jerkiness of my tweening text? The actual textFields are all already set to "anti-alias form animation". But they aren't behaving as nicely as they could be. I tried embedding the font etc...
package
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import gs.com.greensock.*;
import gs.com.greensock.easing.*;
import gs.com.greensock.plugins.*;
public class Main extends MovieClip
private var picArray:Array = new Array();
private var titleArray:Array = new Array();
private var textArray:Array = new Array();
private var newStuff:Number = 0;
private var oldStuff:Number = -1;
private var tallTime:Number = 8000;
private var time:Number = tallTime/1000;
private var changeTimer:Timer = new Timer(tallTime, 9999);
private var txtDelay:Number = 1500;
private var titleDelay:Number = 1250;// delay before calling myDelayedFunction
private var titleInt:Number = 0;
private var txtInt:Number = 1;
private var fmotion:String = "30";
private var rmotion:String = "-30";
private var blur:BlurFilter;
private var glow:GlowFilter;
private var shade:DropShadowFilter;
public function Main()
OverwriteManager.init();
TweenPlugin.activate([GlowFilterPlugin, BlurFilterPlugin]);
picArray.push(pic1_mc, pic2_mc, pic3_mc, pic4_mc, pic5_mc);
titleArray.push(title1_mc, title2_mc, title3_mc, title4_mc, title5_mc);
textArray.push(txt1_mc, txt2_mc, txt3_mc, txt4_mc, txt5_mc);
this.mask = mask_mc;
blur = makeBlur();
glow = makeGlow();
for(var j:int = 0; j < numChildren; j++)
if(getChildAt(j) is MovieClip)
getChildAt(j).alpha = 0;
changeTimer.start();
changeTimer.addEventListener(TimerEvent.TIMER, changeStuff);
changeStuff();
private function changeStuff(event:TimerEvent = null):void
if(oldStuff != -1)
txtOut(textArray[oldStuff]);
titleOut(titleArray[oldStuff]);
picIn(picArray[newStuff]);
if(titleInt == 0){titleInt = 1}
else{titleInt = 0}
if(txtInt == 0){txtInt = 1}
else{txtInt = 0}
var tDelay:uint = setTimeout(animateTitle, titleDelay, titleArray[newStuff], titleInt);
var intervalId:uint = setTimeout(animateTxt, txtDelay, textArray[newStuff], txtInt);
oldStuff = newStuff;
if(newStuff == 4)
newStuff = 0;
else
newStuff++;
// INS
private var picRandomizer:Number = 0;
private function picIn(mc:MovieClip):void
addChildAt(mc, picArray.length);
mc.alpha = 1;
mc.buttonMode = true;
mc.addEventListener(MouseEvent.CLICK, chooser);
TweenLite.from(mc.getChildAt(0), time/2, {alpha:0, blurFilter:{blurX:15, blurY:15}});
if(picRandomizer == 0)
picRandomizer = 1;
TweenLite.to(mc, time, {scaleX:.98, scaleY:.98});
else
picRandomizer = 0;
TweenLite.to(mc, time, {scaleX:1.02, scaleY:1.02});
private function animateTitle(mc:MovieClip, dir:Number):void
var lettersArray:Array = new Array();
var mcArray:Array = new Array();
mc.alpha = 1;
if(dir == 0)
TweenLite.to(mc, time, {x:rmotion, scaleX:1.04, scaleY:1.04, ease:Linear.easeNone});
else
TweenLite.to(mc, time, {x:fmotion, scaleX:.96, scaleY:.96, ease:Linear.easeNone});
for(var i:int = 0; i < mc.numChildren; i++)
lettersArray[i] = mc.getChildAt(i);
for(var j:int = 0; j < lettersArray.length; j++)
mcArray[j] = new MovieClip();
mc.addChild(mcArray[j]);
mcArray[j].addChild(lettersArray[j]);
mcArray[j].filters = [glow, blur];
mcArray.reverse();
for(var k:int = mcArray.length - 1; k >= 0; k--)
TweenLite.from(mcArray[k], .2, {delay:k*.03, alpha:0, onComplete:clarify, onCompleteParams:[mcArray[k]]});
private function animateTxt(mc:MovieClip, dir:Number):void
var lettersArray:Array = new Array();
var mcArray:Array = new Array();
mc.alpha = 1;
if(dir == 0)
TweenLite.to(mc, time, {x:rmotion, scaleX:1.03, scaleY:1.03, ease:Linear.easeNone});
else
TweenLite.to(mc, time, {x:fmotion, scaleX:.97, scaleY:.97, ease:Linear.easeNone});
for(var i:int = 0; i < mc.numChildren; i++)
lettersArray[i] = mc.getChildAt(i);
for(var j:int = 0; j < lettersArray.length; j++)
mcArray[j] = new MovieClip();
mc.addChild(mcArray[j]);
mcArray[j].addChild(lettersArray[j]);
mcArray.reverse();
for(var k:int = mcArray.length - 1; k >= 0; k--)
TweenLite.from(mcArray[k], .2, {delay:k*.03, alpha:0});
private function clarify(mc:MovieClip):void
TweenMax.to(mc, .3, {blurFilter:{blurX:2, blurY:2}, glowFilter:{color:0xFFFFFF, blurX:1, blurY:1}, onComplete:removeFilter, onCompleteParams:[mc]});
// OUTS
private function titleOut(mc:Object):void
TweenLite.to(mc, .5, {alpha:0});
private function txtOut(mc:Object):void
TweenLite.to(mc, 1, {alpha:0});
private function remove(mc:MovieClip):void
removeChild(mc);
private function removeFilter(mc:MovieClip):void
mc.filters = [];
// CLICK HANDLING
private function chooser(event:MouseEvent):void
switch(event.currentTarget.name)
default:
trace("ERROR");
break;
case "pic1_mc":
navigateToURL(new URLRequest("http://lodestarfinancial.com/familyplanning"), "_self");
break;
case "pic2_mc":
navigateToURL(new URLRequest("http://lodestarfinancial.com/estateplanning"), "_self");
break;
case "pic3_mc":
navigateToURL(new URLRequest("http://lodestarfinancial.com/retirementplanning"), "_self");
break;
case "pic4_mc":
navigateToURL(new URLRequest("http://lodestarfinancial.com/businessplanning"), "_self");
break;
case "pic5_mc":
navigateToURL(new URLRequest("http://lodestarfinancial.com/wealthplanning"), "_self");
break;
// FILTERS
private function makeBlur():BlurFilter
var blurX:Number = 10;
var blurY:Number = 10;
var quality:Number = BitmapFilterQuality.HIGH;
return new BlurFilter(blurX, blurY, quality);
private function makeGlow():GlowFilter
var color:Number = 0xFFFFFF;
var alpha:Number = 1;
var blurX:Number = 10;
var blurY:Number = 10;
var strength:Number = 255;
var inner:Boolean = false;
var knockout:Boolean = false;
var quality:Number = BitmapFilterQuality.HIGH;
return new GlowFilter(color,
alpha,
blurX,
blurY,
strength,
quality,
inner,
knockout);Using the onUpdate property sounds like it would help a lot but I am not sure how to pass that number to the Tween...
Since I am using TweenLite to create the tween how do I get it to hit only whole pixels?
TweenLite.to(mc, time, {x:fmotion, scaleX:.96, scaleY:.96, onUpdate:functionForWholePixels, ease:Linear.easeNone});
//but I would have to somehow pass that variable back into and already created tween..... I don't understand.
Thanks for all your help,
Bigmama -
Tooltips not working inside Embedded Movie Clip but works on main stage
Hey,
I have a movie clip that is a navigation window and I am trying to have some tooltip hover over the buttons inside the navigation window.
If I create a button on the main stage it hovers and works fine but if I create the same clip inside the embedded navigation window the tooltip does not show up. I do not have any error messages but it is not there that I can see.
Any ideas?
Thanks!Even you place your mc within another clip for example NavWindowMC:
Write the code in the maintimeline as
import fl.transitions.easing.*;
import fl.transitions.*;
NavWindowMC.mc.addEventListener("mouseOver", mouseRollOver);
NavWindowMC.mc.addEventListener("mouseOut", mouseRollOut);
NavWindowMC.mc.addEventListener("mouseMove", mouseMove1);
var tooltip:Tooltip = new Tooltip();
tooltip.txt.text = "Design";
tooltip.x = stage.mouseX;
tooltip.y = stage.mouseY - NavWindowMC.mc.height;
function mouseRollOver(e:MouseEvent):void {
addChild(tooltip);
var myTween:Tween = new Tween(tooltip, "alpha", Regular.easeIn, 0, 1, 0.5, true);
function mouseRollOut(e:MouseEvent):void {
removeChild(tooltip);
function mouseMove1(e:MouseEvent):void {
tooltip.x = stage.mouseX;
tooltip.y = stage.mouseY - NavWindowMC.mc.height; -
Rotation won't work; embedded in .pdf
hi all
I've embedded a few .swf's in a .pdf presentation--they all work great except for one, where a rotation tween (using tweenlite) won't work. It works fine playing it in flash player however... I've tried both reader and acrobat, with the same results
any ideas?
thanks!
LMLMy iPad 2 is having the same orientation issues since the upgrade. I have reset my iPad about once a day since the upgrade to resolve the orientation getting stuck in either portrait or landscape. Most of the day it works correctly but at some point it just stops. I have tried switching the mute/lock setting back and forth but that doesn't help. Only a hard reset resolves the issue...until it happens again a few hours later.
Wondering if my only option is a re-install, which I would rather avoid. -
On export, embedded flv video restart issue
After exporting my project (either as SWF or MOV), when I play the exported file, the flv video I have embedded in the timeline starts over whenever a motion tween begins in a separate layer. Why might this be happening? I'm using CS6.
Ah, figured it out. Totally my fault- in playback within flash, the video freezes on its final frame, which was the effect I intended, but on export embedded flvs apparently repeat, so I just took a screen shot of the final frame and put that in for the duration I wanted the frame to stay frozen. Your suggestion actually led me to this realization, thank you.
-
Playing embedded movie backwards
I am patching together my first flash, which is definitly not
optimal (lots of redundant code etc.) Since there is a deadline,
ill go back and learn about how to make it much more optimal after
this first version is done, so keeping all that in mind:
Is there any way to play an embedded movie backwards upon
calling it with a gotoAndPlay() command from the same scene?
Thanks, a simple solution would definitly save me a lot of
time, thanks for any tips!!projection83 wrote:
> hi urami, thanks for the reply
>
> this seems to half work for me,
>
> I say gotoAndPlay(1000), which is the end of the movie
which starts at 500
>
> it goes there, and there is an actionscript at 1000
saying prevFrame();
> same for 999, 998 all the way to 500. (start simple:P
and lonnng code style)
>
> The problem is that the code takes me right to 500
without actually playing
> the movie - but it does get to its desination - what am
i missin?
Not all timelines can reversed their playback. This will work
on motion/shape tween
and frame by frame animation, nothing.
What kind of content do you have on these frames ?
Best Regards
Urami
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Can you use more than transformation in a smart object in the timeline, ie for tweening?
I know I can use transformation, but ideally I wish to 'distort' the pixels within a selection without changing the boundary, say with the liquify tool.
If you can't do this, maybe Adobe can consider this feature for future release, ie giving greater manipulation control when tweening in a smart object layer in the timeline.Coq rouge wrote:
NI is not making the Real Time OS in house. I do not remember which firm that is making it. Anyway you are allowed to use a hard drive that has been partitioned. And 126GB is some space is it not? I remember Bill Gates declared one time that 640Kb ram should be more than enough for any PC application also in the future
Coq Rouge (formerly t06afre),
The RealTime OS is an NI Product that is purchased from NI.
NI may or may not outsource design, developement, or manufacturing of the products that it sells under its own Company name.
For this reason I would be concerned if I were a PXI Embedded Controller designer/developer in the United States.
Yes, 126GB is some space. I see that there are now 2TB drives available. 126GB would be 6.3% of a new 2TB drive. Should we all be happy with being able to use 6.3% of the available drive space. Moore's Law seams to be alive and well. Drives larger than 126GB have been readily available for 5 or 6 Years. This should not be a surprise to NI. Why don't they do something about it.
Thanks for the trivia on Bill Gates. I must have missed that one since I don't try to keep up with Microsoft. I believe that he is a wonderful person and he and his family are doing wonders for the world in their "retirement". The world needs more like him.
What I do remember is Steve Jobs telling us that we would never need more that 128MB and that we would never to need to do anymore software development because everything was already in the "ToolBox".
McKevin. -
Flash CS3 Fade tween nightmare
Mac OSX 10.5.2 Leopard
Flash CS3 Trial
Hi All,
My text fade tween seems to be corrupt. The font (Arial)
shows bits missing and other bits filled in?
The text field is static, I have broken the text apart twice
and the tween shows arrows between the key frames. But when I test
movie it looks really weird. Sometimes it even moves the text
about!!!????
I have tried embedding the font and this has not made any
difference.
Please help.By weird i mean the text has diagonal sections missing. The
tips of the characters flicker and sometimes just one letter fades
in and out. Quite random.
Maybe you are looking for
-
Cursor not right-justifying in Oracle Forms 11.1.1.6.0
Hi All, A user notice during testing that 'cursor not right-justifying' in a field on a form. There were not such problem in the old forms enviroment 10.1.2.0.2 and clients running JInitiator 1.3.1.22. The new forms enviroment is Oracle weblogic 10.3
-
Where is updates for Map 3.01? or has discontinued...
I have Nokia N82 which is uses Nokia Maps 3.01, its maps is very useful for me but seems maps updates has discontinued for this version, because after several updates for 3.06/3.07/3.08/3.09 still nothing for 3.01! What is going on? No service for
-
CS3 will not print color pictures
Photo Shop will not print color pictures. It printed fine for over a year then just quit printing in color a few months ago. A work around was given by our Higher head Quarters but when printing this way the pictures do not print properly and the pi
-
Hi, I am trying to get out the frequencies of a signal I have measured before! THerefore I am using the Spectral Measurement VI, but it doesn't work... There must be a problem with the dynamic data... I have build a waveform with my array of y-values
-
BDC or lsmw for ABT1N Transaction
Hi gurus, last day i got some problem when i do a lSMW for ABT1n Tran.i am thankful to u if u please help me that how can i do it.please give me a complete document for that trans and also a text file so that i properly update it. i