Pausing a linked .flv with actionscript
Hi all.
Let me preface by saying that I'm fist-and-foremost a
designer... and an actionscript novice.
I have an external .flv and I simply need to be able to pause
it with a frame action and start it back up with another frame
action.
I found some references to "flvStream.play" through google
but I haven't been able to properly implement it.
Any help would be greatly appreciated. Thanks in
advance.
Geisen,
> I have an external .flv and I simply need to be able to
> pause it with a frame action and start it back up with
> another frame action.
The most important tip I can share with you is this: think
in terms of
objects. An FLV video, external or not, is a file format that
needs a bit
of help getting displayed. A very popular approach is to use
the
FLVPlayback Component (see the Components panel), which
includes a number of
configurable (and optional) "skins" that allow for pausing,
playing, volume
control, etc. The FLVPlayback Component, in that scenario, is
your object.
Many people use a Video asset from the Library in cahoots
with something
called NetConnection and NetStream, in which case you're
dealing with three
objects (Video, NetConnection, and NetStream) that
collaborate. Going back
further, there are Media Components that provide much of the
functionality
of FLVPlayback, in which case the focus of your object(s)
changes again.
In all cases, objects are defined by something called
classes. Movie
clips are defined by the MovieClip class, text fields by the
TextField
class, FLVPlayback by the FLVPlayback class, and so on.
Classes define
objects in the way a recipe defines a certain kind of cake or
a blueprint
defines a certain kind of structure. In the ActionScript 2.0
Language
Reference, you'll find that most classes list one or more of
the following
three headings: properties (characteristics of the object),
methods (things
the object can do), and events (things the object can react
to). In the
ActionScript 3.0 Langauge Reference (if you have Flash CS3),
you'll find the
same format, with the occasional additional heading. From a
bird's eye
view, however, the layout is the same: objects have certain
properties, and
can do certain things and react in certain ways (to button
clicks, internal
timers, etc.) -- and it's the combination of these qualities
that makes a
given object the type it is (e.g., text fields don't have
timelines, so the
TextField class doesn't mention anything about a text field's
current frame,
yet text fields and movie clips both have width and height,
and both their
classes mention as much).
So ... the way you're going to pause your FLV video depends
on entirely
on the object(s) being used to display that video. If you're
using
FLVPlayback, you'll have to give that Component on the Stage
an instance
name (see the Property inspector while the Component is
selected). Instance
names allow ActionScript to speak directly to individual
instances of an
object -- this particular FLVPlayback in the lower left, for
example, rather
than the other one in the upper right.
Once it has an instance name, you can reference that name
and invoke
FLVPlayback class members on that instance. If you've given
it the instance
name myPlayer, you would invoke FLVPlayback.pause() (the
pause method) as
follows:
// In a keyframe of your scripts layer ...
myPlayer.pause();
And to start it up again, you would invoke
FLVPlayback.play() (the play
method) at a later keyframe like this:
myPlayer.play();
If you're using a combination of a Video element from the
Library and
the NetConnection and NetStream classes, you'll reference
your NetStream
object by its instance name (this will be the variable you
use to
instantiate the object) and invoke NetStream.pause(), and so
on.
Here are a few articles in ActionScript 2.0 on the topic:
http://www.quip.net/blog/2006/flash/how-to-load-external-video
http://www.quip.net/blog/2006/flash/how-to-control-flv-without-component
http://www.quip.net/blog/2007/flash/actionscript-20/how-to-determine-completion-of-flv/
Those should at least get you a bit more comfortable with
the idea of
classes, objects, and their members (properties, methods, and
events). If
you're building a movie in ActionScript 3.0, the syntax may
change ... not
so much for quick method calls, but certainly for event
handling. For what
you're described, even these AS2 examples should be helpful.
David Stiller
Co-author, Foundation Flash CS3 for Designers
http://tinyurl.com/2k29mj
"Luck is the residue of good design."
Similar Messages
-
Controlling external flv with ActionScript
I'm using the NetStream Class to control the playback of an
external flv. I've got a Pause/Play button using .pause, and Fast
Forward and Rewind buttons using .seek. What I want to do is once
the video is done playing to automatically reset back to the
beginning of the video, allowing the user to press play to view the
video again without having to reload the page. Right now when the
video finishes, the user has to rewind the video in order to watch
it again. I thought I could use .time to determine when the video
reaches the end to go back to "0" in the video playhead but so far
I have not been able to get this to work. Any ideas would be
appreciated. Currently everything is done in frame one of the swf.
Thanks.>>I think obviously there is a difference between FMS
and Flash MX04. The documents I
>>refer to are built into the help menu in Flash 7 and
8 both include the onStatus event
>>and absolutely no onPlayStatus event.
Yeah you're right onPlayStatus isn't in the NetStream class
Flash documentation as this is more about using this class for
progressive download, whereas the documentation i linked to
referred to the NetStream class used in FMS Client-side scripting
for streaming video.
>>I made a mistake. I meant NetStream.Play.Stop –
which was very poorly named. That
>>is what onStatus will return when it reaches the end.
It isn't really "stop" it is "complete."
>>So I tend to read it as such!
NetStream.Play.Stop does seem to be very similar to
NetStream.Play.Complete in progressive downloads. however i know
you can't guarantee that NetStream.Play.Stop occurs at the same
time as NetStream.Play.Complete in a streaming video through FMS,
as a NetStream.Play.Stop can occur for reasons other than
completion.
>>...My guess is that when they took the bits from FMS
into Flash MX04 they didn't do a
>>very good job. They purposefully renamed onPlayStatus
to onStatus...
onStatus does still exist in FMS Client side scripting...
>> – with a limited variety of events returned
(What is Switch?)
switch refers to playlists - only relevant to FMS streams.
Anyway, it appears as though all of this talk of the FMS is
moot regarding the original poster, as I've just had a look at
skauty's posts in the Flash Media Server forums, ironically, and
discovered that skauty is using progressive download and not FMS...
Simple but important distinction... -
Remove video flv with actionScript
Concerning
flv handling : how can I remove the video object called on
the Stage by the following script? :
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("video1.flv");
I know, as showed in flash help, stream_ns.stop() or
stream_ns.pause or my_video.clear();
but it don't remove the video from the Stage and the flv
stil remain in sight>>I think obviously there is a difference between FMS
and Flash MX04. The documents I
>>refer to are built into the help menu in Flash 7 and
8 both include the onStatus event
>>and absolutely no onPlayStatus event.
Yeah you're right onPlayStatus isn't in the NetStream class
Flash documentation as this is more about using this class for
progressive download, whereas the documentation i linked to
referred to the NetStream class used in FMS Client-side scripting
for streaming video.
>>I made a mistake. I meant NetStream.Play.Stop –
which was very poorly named. That
>>is what onStatus will return when it reaches the end.
It isn't really "stop" it is "complete."
>>So I tend to read it as such!
NetStream.Play.Stop does seem to be very similar to
NetStream.Play.Complete in progressive downloads. however i know
you can't guarantee that NetStream.Play.Stop occurs at the same
time as NetStream.Play.Complete in a streaming video through FMS,
as a NetStream.Play.Stop can occur for reasons other than
completion.
>>...My guess is that when they took the bits from FMS
into Flash MX04 they didn't do a
>>very good job. They purposefully renamed onPlayStatus
to onStatus...
onStatus does still exist in FMS Client side scripting...
>> – with a limited variety of events returned
(What is Switch?)
switch refers to playlists - only relevant to FMS streams.
Anyway, it appears as though all of this talk of the FMS is
moot regarding the original poster, as I've just had a look at
skauty's posts in the Flash Media Server forums, ironically, and
discovered that skauty is using progressive download and not FMS...
Simple but important distinction... -
Linking videos with actionscript 3
Hey guys. I'm very new to actionscript (or at least to using video in it) and have an issue.
As part of a project I am making a 7 minute interactive video made up of about 15 short video clips. This is going to go on a website and the idea is that the user will click some sort of start button and the first video will play. At the end of that video, I have two buttons appear on a certain frame and depending on which button you press, a different clip will play, advancing the story.
My problem is that while it originally worked before, now that I have it up on the website, the videos take 2 or 3 seconds to loads but the timeline seems to play ahead without them, meaning the buttons are appearing too early.
Surely there is a fix to this. And sorry if I made that sound confusing.you'll need to stop your timeline while waiting for enough video to buffer and start playing and, when the video starts, start you timeline that you stopped while waiting for the video to buffer and start playing.
how you listen for you video(s) to start play depends on whether you're using the netstream class or flvplayback component to play your video. i'm assuming your video(s) is (are) not embedded in a timeline. -
Can I rotate a playing FLV video with ActionScript?
Hello,
I have some ActionScript 3 already written. It'd be weird to
explain why I'd want to do this, but basically, I'm playing an FLV
file with the FLV Playback ActionScript. I want to rotate the video
itself as it is playing. It needs to rotate 90-degrees over 15
seconds, (6 frames/sec) and stop.
I tried putting the FLV component in a movie clip, and
tweening the rotation on the FLV component. Then my AS3 event
listener calls a "container_mc.play()", but appears to do nothing
to the FLV. I also tweened a basic shape in the same container and
that visibly rotates, so I'm sure the AS3 is correct.
Also, I'm triggering the rotation by events, not button
presses or mouse actions.
Is there a way to do this?Yep better ask in the Premeire Pro forums, but while loading their forum page check the cutter tool (C) it will allow you to cut your footage
-
Creating swf file with along with linked flv content
Can anyone tell me the procedure for creating an swf and
linked flv file with Sorenson Squeeze for deployment on the Breeze
server or in Breeze Presenter. All Adobe will share is the how to
ithis with Flash. I feel certain this can be done, but all my
attempts have failed in that the published swf will not display the
referred flv content. To interpret the Flash procedure it seems
that all one has to do is add /output "file name" to the swf player
flve linked url, but the published swf file does not seem to be
linked with the published flv file. - even when I have made that
flv file public.You wrote "I've imported the FLV into the 'stage' and added a skin through the wizard" from this I conclude that you choose the deafult option, that says "load external video with plyback component" (only this one offers you a skin wizard). But when you deploy that swf to a server it still needs the flv source (search Help for FLVplayback), and even the Skin (its an extra swf) must be depoyed to the server. What you instead want to do is option 2: embed FLV in swf. There are some disadvantages to this solution: the longer the video, the more probable it is, Audio and Video will get desynchronized, and: you can`t use Adobes premade skins for the controls
-
Flash with linked flv: Waiting while playing
Hello
for an automatic running projector I want to use flash with
linked flvs. While the flash is running the movie shell wait, after
finishing playing the movie jumps to next marker.
I used following script:
on exitFrame
if sprite (5).playing then
go to the frame
end if
end
The script don't function. Has anyone an idea how to let the
movie waiting for the end of embedded flash?
Thanks and regards
PeterIf the .flv is loaded in to a movieClip in your .swf, you
would want to
test the clip's playing property, not the .swf. Another
method is to
build a telltale in to the .swf to mark the end of the .flv
play. You
could set a boolean variable in the .swf and then look at the
value from
the Director movie. A better method is to call a Director
function from
the .swf, when the .flv finishes.
Rob
Rob Dillon
Adobe Community Expert
http://www.ddg-designs.com
412-243-9119
http://www.macromedia.com/software/trial/ -
Stop and Play All Child MovieClips in Flash with Actionscript 3.0
I am stuck with the ActionScript here. I have a very complex animated flash movie for eLearning. These contain around 10 to 15 frames. In each frame I am having multiple movie clip symbols. The animation has been created using a blend of scripting and also normal flash animation.
Now I want to create pause and play functionality for the entire movie. I was able to create the pause function but when i try to play the movie it behaves very strange.
I was able to develop the pause functionality by refering to the below mentioned links:
http://www.unfocus.com/2009/12/07/stop-all-child-movieclips-in-flash-with-actionscript-3-0 /
http://www.curiousfind.com/blog/174
Any help in this regard is highly appreciated as i am approaching a deadline.
I am pasting the code below:
import flash.display.MovieClip;
import flash.display.DisplayObjectContainer;
import flash.utils.Timer;
import flash.events.TimerEvent;
import fl.transitions.*;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
import flash.events.Event;
import flash.events.MouseEvent;
stop();
// function to stop all movieclips
function stopAll(content:DisplayObjectContainer):void
if (content is MovieClip)
(content as MovieClip).stop();
if (content.numChildren)
var child:DisplayObjectContainer;
for (var i:int, n:int = content.numChildren; i < n; ++i)
if (content.getChildAt(i) is DisplayObjectContainer)
child = content.getChildAt(i) as DisplayObjectContainer;
if (child.numChildren)
stopAll(child);
else if (child is MovieClip)
(child as MovieClip).stop();
// function to play all movieclips
function playAll(content:DisplayObjectContainer):void
if (content is MovieClip)
var movieClip:MovieClip = content as MovieClip;
if (movieClip.currentFrame < movieClip.totalFrames) // if the main timeline has reached the end, don't play it
movieClip.gotoAndPlay(currentFrame);
if (content.numChildren)
var child:DisplayObjectContainer;
var n:int = content.numChildren;
for (var i:int = 0; i < n; i++)
if (content.getChildAt(i) is DisplayObjectContainer)
child = content.getChildAt(i) as DisplayObjectContainer;
if (child.numChildren)
playAll(child);
else if (child is MovieClip)
var childMovieClip:MovieClip = child as MovieClip;
if (childMovieClip.currentFrame < childMovieClip.totalFrames)
//childMovieClip.play();
childMovieClip.play();
function resetMovieClip(movieClip:MovieClip):MovieClip
var sourceClass:Class = movieClip.constructor;
var resetMovieClip:MovieClip = new sourceClass();
return resetMovieClip;
pauseBtn.addEventListener(MouseEvent.CLICK, onClickStop_1);
function onClickStop_1(evt:MouseEvent):void
MovieClip(root).stopAll(this);
myTimer.stop();
playBtn.addEventListener(MouseEvent.CLICK, onClickPlay_1);
function onClickPlay_1(evt:MouseEvent):void
MovieClip(root).playAll(this);
myTimer.start();
Other code which helps in animating the movie and other functionalities are as pasted below:
stage.addEventListener(Event.RESIZE, mascot);
function mascot():void {
// Defining variables
var mc1:MovieClip = this.mascotAni;
var sw:Number = stage.stageWidth;
var sh:Number = stage.stageHeight;
// resizing movieclip
mc1.width = sw/3;
mc1.height = sh/3;
// positioning mc
mc1.x = (stage.stageWidth/2)-(mc1.width/2);
mc1.y = (stage.stageHeight/2)-(mc1.height/2);
// keeps the mc1 proportional
mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
stage.removeEventListener(Event.RESIZE, mascot);
mascot();
this.mascotAni.y = 100;
function mascotReset():void
// Defining variables
var mc1:MovieClip = this.mascotAni;
stage.removeEventListener(Event.RESIZE, mascot);
mc1.width = 113.45;
mc1.height = 153.85;
mc1.x = (stage.stageWidth/2)-(mc1.width/2);
mc1.y = (stage.stageHeight/2)-(mc1.height/2);
// keeps the mc1 proportional
mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
var interval:int;
var myTimer:Timer;
// function to pause timeline
function pauseClips(secs:int, myClip:MovieClip):void
interval = secs;
myTimer = new Timer(interval*1000,0);
myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
myTimer.start();
function goNextFrm(evt:TimerEvent):void
myTimer.reset();
myClip.nextFrame();
myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
// function to pause timeline on a particular label
function pauseClipsLabel(secs:int, myClip:MovieClip, myLabel:String):void
interval = secs;
myTimer = new Timer(interval*1000,0);
myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
myTimer.start();
function goNextFrm(evt:TimerEvent):void
myClip.gotoAndStop(myLabel);
myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
MovieClip(root).pauseClips(4.5, this);
// function to fade clips
function fadeClips(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number):void
var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, 0.5, true);
fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
function fadeFinish(evt:TweenEvent):void
next_mc.nextFrame();
fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
// function to fade clips with speed
function fadeClipsSpeed(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number, speed:int):void
var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, speed, true);
fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
function fadeFinish(evt:TweenEvent):void
next_mc.nextFrame();
fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
// function to show screen transitions
function screenFx(target_mc:MovieClip, next_mc:MovieClip):void
//var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
var tranFx:TransitionManager = new TransitionManager(target_mc);
tranFx.startTransition({type:Iris, direction:Transition.OUT, duration:1.2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});
tranFx.addEventListener("allTransitionsOutDone",doneTrans);
function doneTrans(evt:Event):void
next_mc.nextFrame();
tranFx.removeEventListener("allTransitionsOutDone",doneTrans);
// function to show screen transitions inverse
function screenFxInv(target_mc:MovieClip, next_mc:MovieClip):void
var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
var tranFx:TransitionManager = new TransitionManager(target_mc);
tranFx.startTransition({type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.SQUARE});
tranFx.addEventListener("allTransitionsInDone",doneTrans);
function doneTrans(evt:Event):void
next_mc.nextFrame();
tranFx.removeEventListener("allTransitionsInDone",doneTrans);
// function to zoom in
function zoomFx(target_mc:MovieClip):void
//var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
var tranFx:TransitionManager = new TransitionManager(target_mc);
tranFx.startTransition({type:Zoom, direction:Transition.IN, duration:3, easing:Strong.easeOut});
//tranFx.addEventListener("allTransitionsInDone",doneTrans);
/*function doneTrans(evt:Event):void
next_mc.nextFrame();
// Blinds Fx
function wipeFx(target_mc:MovieClip):void
var tranFx:TransitionManager = new TransitionManager(target_mc);
tranFx.startTransition({type:Wipe, direction:Transition.IN, duration:3, easing:Strong.easeOut, startPoint:9});
// Blinds Fx Center
function fadePixelFx(target_mc:MovieClip):void
var tranFx:TransitionManager = new TransitionManager(target_mc);
tranFx.startTransition({type:Fade, direction:Transition.IN, duration:1, easing:Strong.easeOut});
tranFx.startTransition({type:PixelDissolve, direction:Transition.IN, duration:1, easing:Strong.easeOut, xSections:100, ySections:100});This movie is an animated movie from the start to end. I mean to say that though it stops at certain keyframes in the timeline it stops for only a certain time and then moves on to the next animation sequence.
Its not an application where the user can interact.
On clicking the play button i want the movie to play normally as it was playing before. If the user has not clicked on the pause button it would anyhow play from start to finish.
Is there anyway where i could send in the fla file? -
How can I use LCCS with ActionScript 3 and Flash CS4?
Hi,
Using Stratus I was able to create an an application using Action Script 3 and Flash CS4. The sample code on the Adobe site was quite straight forward and easy to understand. I now want to switch over to LCCS but can't find anything any where on how to use Action Script 3 and Flash CS4 with LCCS. Do I need to know Flex to be able to use LCCS? Everything was quite simple and easy to understand with Stratus and makes complete sense. But LCCS is really confusing. Is there any sample code on how to establish a connection in Action Script 3 and then stream from a webcam to a client. There is nothing in the LCCS SDK that covers Flash and Action Script 3. Please help! I found the link below on some forum but it takes me nowhere.
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=75 9&threadid=1407833&enterthread=yThanks Arun!
Date: Thu, 29 Apr 2010 11:44:10 -0600
From: [email protected]
To: [email protected]
Subject: How can I use LCCS with ActionScript 3 and Flash CS4?
Hi,
Welcome to the LCCS world.
Please refer to the SDK's sampleApps folder. There would be an app called FlashUserList. The app demonstrates how LCCS can be used with Flash CS4. Its a pretty basic app, but should help you moving.
We are trying to improve our efforts to help developers in understanding our samples. Please do let us know if we can add something that would help others.
Thanks
Arun
> -
Using linked flv content in swf file -for deployment on Breeze server
Can anyone tell me the procedure for creating swf and linked
flv file with Sorenson Squeeze for deployment on the Breeze server
or in Breeze Presenter? All Adobe will share is the how to this
with Flash. I feel certain this can be done but all my attempts
have failed to have the swf show the referred flv link. To
interpret the Flash procedure, it seems that all one has to do is
add /output "file name" to the swf player flve linked url, but the
published flv file only shows a white screen. It does not seem to
load the linked flv file - even if I have allowed public viewing of
the flv content.The procedure may be the same - I'm pretty familiar wit h
that by now - but the results are not. I think the key difference
is that the linked file url addendum "/output/filename" required
from Breeze when creating the linked flv url call-out from the swf
file, does not work is advertised in Sorenson Squeeze. Before
attempting to insert this linked swf file in Presenter, I have
attempted to elicit the same interactivity just by uploading the
fwo files to the Breeze server. Sorenson does not seem to be able
to recognize that additional linked url with the additional "output
/ file name" addendum that Breeze requires. I have replicated that
same procedure in Flash 8 and the results work perfectly. I just
don't like being forced to use a 900 lb gorilla like Flash 8 to
create this simple task when a less costly program like Sorenson is
squeeze should work correctly. Frankly, I think a lot of other
Breeze authors, who are not as adept with this video encoding
process, or who want to be using a developer tool like Flash to
create their video clips. My experience with our users is that that
most shy away from using video in Breeze because it is way too
cumbersome. - Something Adobe should consider before more prospects
move over to another similar authoring program that has actually
dedicated itself to advancing their authoring software
capabilities. -
Hi all,
I have some pictures of the interior of a house and I want
the user to change the color of the walls. When I try to fill some
areas of the image with a specific color I get some "unreal"
results, and the final picture is not neat. I wander if there is
some clever way to change the color leaving the lighting, shadows
etc as they are to have a more realistic result.
I'll appreciate if someone have any useful links or
guidelines for this, thanks in advancejgeorgiou,
> there is an EXCELLENT desktop application I found in
>
http://www.crownpaint.co.uk/expcolour/create/
following
> the link "Dowload My Rooms in Colour Tool", but it's
> not made with Flash.
I didn't download the app, but I did watch the Flash
demonstration.
> Is it possible to have this result with ActionScript?
The demo showed a user clicking around a photo to define
anchor points,
then filling the enclosed shape with a color. This sort of
thing is indeed
possible with ActionScript, and when combined with blend
modes might give a
reasonably "realistic" rendering.
What you're after is a collection of MovieClip class methods
known as
the Drawing API. Look up MovieClip.lineTo() in the
ActionScript 2.0
Language Reference and you'll find the others. :)
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design." -
Deploy FLV with FLVPlayback Errors #2024 #2124
I've deployed an FLV video, using Flash CS3 default settings
and a supplied skin, to an IBM WebSphere (JSP) web site. The FLV
plays but the skin's swf file does not. The following error is
displayed:
Error #2044: Unhandled skinError:. text=[IOErrorEvent
type="ioError" bubbles=false cancelable=false eventPhase=2
text="Error #2124: Loaded file is an unknown type. URL:
SkinUnderPlayStopSeekFullVol.swf"]
It also seems that AC_RunActiveContent.js isn't found either.Thank you for your answer. I am not an experienced Flash
developer, use it occasionally and I’d appreciate some
further help here please. Firstly I have sorted the lost
AC_RunActiveContent.js file issue.
Ignoring the Error #2044 error message for the moment the
main SWF, FLV file and skin SWF are all in the same folder. The
main SWF plays the linked FLV file but not the skin SWF, unless I
paste the main SWF’s URL straight into the browser address
bar. In which case it all plays perfectly.
This suggests the problem is with the
<object>/<embed> and/or the page script for the
AC_RunActiveContent (as opposed to the
AC_RunActiveContent.js). Is this where the base URL property
may help?
Using the base URL property – the SWF files and FLV
file are stored in the folder
http://www.myweb.co.uk/wcsstore/Publishing/images/Videos/.
On page delivery this is resolved from
<%=jspStoreImgDir%>images/Videos/. e.g. name="movie"
value="<%=jspStoreImgDir%>images/Videos/main.swf". I guess
the base URL is
http://www.myweb.co.uk/wcsstore/Publishing/ but how is the
base URL property structured in the <object>/<embed>
scripts and, if needed, in the local AC_RunActiveContent
javascript? And should it be used instead of
<%=jspStoreImgDir%>?
I hope you can help.
TW -
Moving movie clips with ActionScript
I am trying to move four movie clips with actionscript in a
circler motion with two buttons, one to rotate the mc’s to
the left and one button to rotate the mc’s to the right. Here
is a link to what I am trying to do;
http://www.us.playstation.com/Lair/
and it is undrer game features.Yes, that's what the code I gave you is intended to do....
you replace that code with whatever action you need to take to turn
your movie around.
I have no idea what your movieclip is doing, but I'm guessing
by your response that if it was an arrow pointing left to right
(just an example), you want it to be pointing right to left when
the left arrow is pressed. If you want an immediate turn around,
then the simplest way to do that is to have another frame
containing the movieclip that it moves to where it faces the other
direction--and to have it appear turned around, from the toolbar
you select Modify -> Transform -> Flip Horizontal.
So the movieclip would live inside another movieclip that has
two frames with stop()'s for each frame. In the first frame you
would have the subclip facing left to right, and in the second you
would have it facing right to left. If we call that 2-framed
movieclip "walker", the code I provided before would
become... -
Can't access object using "id" or "name" if created with actionscript
How can you register an instance of an object with actionscript so that it's id or name value is accessible?
I included a simple example where a Button is created using mxml and in the same way it is created using actionscript. The actionscript object is inaccessible using it's "id" and "name" property.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
creationComplete="application1_creationCompleteHandler(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function application1_creationCompleteHandler(event:FlexEvent):void
import spark.components.Button;
var asBtn:Button = new Button();
asBtn.label = "actionscript";
asBtn.x = 200;
asBtn.id = "asButton";
asBtn.name = "asButtonName";
addElement(asBtn);
trace("mxmlButton="+this["mxmlButton"].label); // returns: mxml label
//trace("mxmlButton="+this["asButton"].label); // returns runtime error: ReferenceError: Error #1069: Property asButton not found on TestId and there is no default value.
//trace("mxmlButton="+this["asButtonName"].label); // returns runtime error: ReferenceError: Error #1069: Property asButtonName not found on TestId and there is no default value.
]]>
</fx:Script>
<s:Button
id="mxmlButton"
label="mxml label"
alpha="0.8"/>
</s:Application>Hi Dan,
It is a very rare occurrence when I miss not being able to access an object (object property, really) using the ["name"] notation for objects created using actionscript.
In MXML the compiler is conveniently adding an attribute to the class with the same name as the id, so you can conveniently refer to it using the [] notation. While we explicitly specify an application container to use, the MXML compiler creates a custom container which is a derivative of the base container and to that it adds properties for the children declared in MXML. I guess it also effectively calls "addElement" for us when the container is being constructed.
Your example assumes that using "addElement" to add the button to the application container is the same as declaring a variable (ie property ). It isn't, so there's no point in looking for an property of the name "as3Button" using the [] notation, because it doesn't exist. The container is managing a collection of children in it's display list and that's not the same as being accessible as properties of the container.
Generally speaking, accessing properties using the ["name"] syntax isn't necessary.
Paul
[edit: you may wonder why "addElement" doesn't conveniently also add the "id" attribute to be an property of the container class. Unfortunately, it can't because the container class would need to be dynamic and it's not. A further complication would be that adding properties at runtime would invite naming clashes at runtime with associated mayhem. MXML can do this because the compiler generates the class and can trap name duplication at compile time.
Great question, BTW.
-last edit changed my "attributes" to be "properties" in line with Adobe's terminology] -
my iphone is connected to a old account that i have used in a while i have a new icloud i tried reseting my phone but now i can get in becuase it linked in with my old account how can i fix this so i can log in with my new account i reset my phone but i did it before on my new phone but this old is link to a account that i set up when i was so much younger can you advise what to do?
ThanksGo into Settings App and turn OFF Find My iPhone. It will ask for your old password, but in the future you can use your new Apple ID account. If you need to reset the old password try this: https://iforgot.apple.com/password/verify/appleid?language=US-EN&returnURL=https ://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa&app_id=93&app_type=ext
Maybe you are looking for
-
REQUIREMENT TO POPULATE PLANNER GROUP in REPAIR SERVICE ORDER
Hi Gurus, We are using Standard repair process, These are the Following Steps 1.Service Notification Creation. 2.Sale order Creation (RAS order type) 3.Returns Delivary 4.Posts Goods Receipt 5.Repair Service Order created in the Backend.
-
Error Viewing the Execution option of a Report
I select the option execution from a report (it's in properties option) and then raise an error which says An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help EXECUTE permission denie
-
Item category TA YTAK cannot be invoiced with billing type F2
Hi Experts, Error message in creating billing I did not make shipment and directly make delivery PGI This is transportation relevance showing in delivery. Is this reason preventing from creating F2 blling type? I am getting error for item category YT
-
Missing all the versions of a project.
I work with Aperture 3.2.1 under Snow Leopard. Recently I noticed that the previews of my versions ware blurred (not sharp). So I selected my projecst one by one and used PHOTOS/Update Previews. After "a while" all the previews were sharp again. But
-
I always turn on my computer first thing in morning to see if any important e-mail comes through and since it's at least another hour before I get to work, the computer goes to sleep. Well, yesterday, the display wouldn't wake up and stayed black. I