Placing ActionScript
Basically I'm trying to make back and forwards buttons in my
flash document. I've gotten to the part of writing the
actionscripting and for some reason I'm having problems placing the
code on the individual frames. What happens is say I go to frame
one and put some script in there for an array and then I go to
frame 20 to do the same thing but it won't add new information. I
can't even get the little "a" symbol to show in my timeline. It
seems that its not even adding the scripting to the frame but the
document as a whole. I've never had this problem before so it seems
really weird to me. If anyone could help me that would be
great.
Yes to both. It just seemed weird like Flash got confused or
something. I didn't think about trying a new fla. doc before I
posted but it seems to work in the new doc. Thanks though
kglad.
Similar Messages
-
What do the little red squares on the lower left hand corner of the movieclips in the actions panel mean? [Fig. 1]
I'm working off this template in Flash CS3, that's using ActionScript 2.0 actually.
I don't know whether or not that means anything in regards to the above inquire?
Again, any help is appreciated.
Fig.1OK, I think I might have figured this out.
First. You guys keep insisting it's the Movie Explorer. It is not. It is the Actions Panel. You can see for yourself. Option+F9 opens the Actions Panel. Option+F3 opens the 'Explorer Window'. They are similar in appearance but they're not the same thing. They're just not.
Second. I believe that the red dots on the movieclips, and also buttons, indicates when there is actionscript directly on the movieclip and/or button, as oppose to actionscript written on a frame within a movie clip and/or button.
You really have to pay special attention to the top of the Actions Panel right next to where it says 'Actions' there's a dash '–' and then it says either 'Frame', 'Movie Clip', or 'Button'. This indicates exactly where you're about to write script to, or where you're reading the script from, so it's important to pay attention to this.
That left side pane, in the Actions Panel, is divided by 'Scene' and by 'Symbol Definition(s)' and it's confusing because it's possible to have a symbol appear more than once depening on where the actionscript is located (i.e. on a frame or on the movie clip or button itself).
For example if you have script on a FRAME within movie clip A, it'll appear in the SYMBOL DEFINITION(S) pane, without a red box, but if you were to write script on movie clip A itself, it would still not have the red box on it in the SYMBOL DEFINITION(S) pane, BUT it would appear again as movie clip A in the SCENE pane, and this time it would appear with the red box next to it, casue it now has actionscript directly on the movie clip itself. Wow, how confusing is that ha.
Keep in mind that if you made a movie clip B, within movie clip A, and if you placed actionscripts directly on movie clip B, NOT on a frame, then movie clip B would get a red box and appear UNDER movie clip A, within the SYMBOL DEFINITION(S) pane, NOT the SCENE pane. Ha.
If you wrote script on a FRAME within movie clip B it would appear in the SYMBOL DEFINITION(S) again, yes a second time, twice, but WITHOUT a red box. Confused yet? ha.
I don't know why Flash decided to do it this way. But it starts to make sense when you're actually viewing it, when it's in front of you. I think this is just for actionscript 2.0 (and for actionscript 1.0 presumably), but I don't think this is the case for ActionScript 3.0, because in as3 it's all instance name based, and targeting based, so there's no such thing as writing script directly onto a symbol of any kind, button, movie clip or otherwise.
But yeah, that's it in a nutshell.
Thanks for trying to help anyway. -
Need Help with ACTIONSCRIPT for Interactive Music Video
I am trying to create an interactive music video in After Effects and Flash.
The concept is that while the music video is taking place the user can decorate the hair of the woman with any of the objects they select. There will be predetermined animations and destination spots but the user can choose whatever objects they select to be delivered to the predetermined spot. I need to figure out how to let the user to select an object that will become part of the animation. I created a PDF Roughly explaining what I am trying to do. If anyone can help me I'd be very grateful as I am more versed in After Effects, I don't know ActionScript well enough to execute what I am trying to do.
Below is a rough example of what I am trying to do. There will be a music video of an animated woman singing. As she is singing the user will be able to click any of the objects , below the numbers 1-10. Below it is illustrated that the user wants to press the blue number 2. If the user presses the 2 the 2 will animate in the mouth of a bird to a predetermined pre-animated spot. I assume I need to send a movieclip to a blank holder on the timeline and use a gotoAndPlay() action ??? I am not well versed in ActionScript so any advice would help
Now whatever number (movieclip) the user chooses next needs to be placed in another blank spot in the timeline? Below the user selcts the Pink 5.
If the user just wanted to Place two "Blue 2's" then the "Blue 2's" would follow the same animated path and end up at the same predetermined space.
If the user selected just 5's and 7's they would go to the predetermined preanimated paths
How would I go about writing the Actionscript for this?Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
If I say that the code for placing one MovieClip into another is:
clip1.addChild(clip2);
will it make any difference in terms of implementation?
Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start. -
Need help with actionscript for media controller
I seem to be having a slight problem. I've been looking
around and everything I see is for .flv playback. Anyways, here's
my problem.
Client wants a video that's interactive. When a transition
occurs a simple tex button shows up which links to certain web
pages. Deploying this as a .swf would be no problem, but they want
a controlbar with it so a user can scrub back and forth in the
video. So the best way to do this would be progressive or
streaming.
I created a source file that utilizes the "loader component"
and inserted the "media controller component". I'm not very good
when it comes to actionscript and can't seem to find the proper
script which utilizes the media controller so the user can scrub
back and forth. Everything else seems to work fine with the loader
as it loads an external .swf file.
Just need to get the controller working properly. Total
frames of the swf is a little over 3,000 and dividing the total
frames by 30 was 107.7 seconds. So I round that to 108 seconds. The
online docs seem to be fragmented and not always consistant
especially when i'm not using the flvplayback or display.
Does anybody know the actionscript for this? Or where I can
find the information on this? I've associated the loader with the
controller and vice versa in the behaviors panel as well if that's
any help. Any help is much appreciated thanks.Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
If I say that the code for placing one MovieClip into another is:
clip1.addChild(clip2);
will it make any difference in terms of implementation?
Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start. -
Imported SWF actionscript not working in _root movie...
Hello.
I will tell you below what I want to accomplish, then I'll
tell you what I have done (that didn't work). I'm hoping that
someone here can tell me where I went wrong, and also how to fix it
and pull off what I'm trying to do. Thanks!...
WHAT I WANT TO DO:
I want to have a Captivate SWF loaded into the bottom half of
a main Flash "shell" SWF, and then when the Captivate SWF is done
playing, a text field on the main "shell" SWF puts the word "DONE!"
in it.
WHAT I HAVE DONE (that didn't work):
I have a Flash SWF that loads a Captivate3 SWF in its bottom
half (that works fine). The top half of the main Flash movie has a
dynamic text field on it called "doneText_txt".
I then made another SWF that is just 10x10px and all that is
on it is ActionScript on the first frame that says:
_root.doneText_txt.text = "DONE!";
I then went on the last slide/frame of my Captivate project
(in Captivate) and did an "Insert-->Animation" to insert that
small 10x10 SWF onto that final slide.
When I load that main "shell" and then the Captivate project
loads at the bottom and finishes playing, nothing is displayed in
the "doneText_txt" text box.
THINGS I NOTICED:
When I imported the SWF into Captivate, it was transparent
(didn't show up). I adjusted the transparency on it (in Captivate)
to both 0% and 100%, and it still didn't show up. I thought that it
may be just because it had nothing on it (just the default white
background), so I went back into Flash and re-exported the 10x10
SWF after filling it with black. I re-imported it into Captivate,
and still it didn't show up. Like, I figured you'd see a black
square on the slide. It was on the timeline, and I could move it
around on the slide, but it was just a clear transparent box. This
made me think that the reason the "DONE!" text wasn't getting
passed was because there was a problem with the SWF even being on
the slide in the first place.
Any ideas???? Or, if there's another way to pull off what I'm
trying to do, that would be fine with me as well. Thanks!!!quote:
Originally posted by:
jbradley88
I don't think inserted objects are placed on _root, so I
wouldn't expect it to work.
But isn't "_root" just the top-most object? So, if I'm
loading the Captivate project from my main Flash SWF, then that
main Flash SWF is the "_root" no matter what, right? Or am I wrong
about that???
quote:
Originally posted by:
jbradley88
Perhaps you need to have your object identify itself via a
global variable, then have your code reference the object via the
variable?
Can you explain in more detail how to do this? I REALLY need
to get this working, but I'm just at a total loss!
Thanks!!! -
Placed .swf does not play correctly
I have placed a .swf on a page. When exported to pdf the movie does not play correctly. It plays correctly before being placed. I used flash cs4 actionscript 3 to create the .swf.
I have selected the highest level for pdf when exporting.ok! I figured it out. This is what is happening. Apparently when you place a .swf in indesign and make a button on the page to show the movie when clicked and then export to pdf -- there is a time delay from the time you click on the button and the movie starts to play in a floating window. Its just a few frames of 24 fps movie but that is enought for whatever gaget that reads the movie to miss the first few frames.
So in effect any info in the first few frames is not read. So i had a stop on the first frame that was not being read. I put the stop on frame 7 and now it plays just like I had hoped.
I hope this helps anybody else out that has had a similar problem. -
Can i assign a child state to a movie clip that is already placed on stage
Hello
Is it possible to add a child state to a movie clip that is
already placed on stage,
i need to do this so i can move the movieclip to the top of
the display list.
thanks for the help
mt"The objects i want it to appear above are loaded swf's onto
the same main stage."
Aha, this is where things can get confusing. The terminology
between the Flash Authoring tool and ActionScript is not
consistent.
In ActionScript, the Stage is the top most DisplayObject. You
probably get that.
In Flash, the canvas that is often referred to as "the stage"
is not the Stage object of ActionScript, rather the Flash stage is
a DisplayObject class called MainTimeline (or if you assign a
document class, it's that class), which is the first and only child
of the ActionScript Stage object. It's the only child unless, of
course, you add something else to the ActionScript Stage object at
runtime... like a loaded swf. ;)
So in other words, if you are doing anything like this:
stage.addChild(myLoadedSWF)
You are actually putting myLoadedSWF above the MainTimeline
object, which is the entire Flash timeline. There's nothing wrong
with that, but in this case it means changing the depth of things
inside the MainTimeline is not going to change the fact that the
MainTimeline itself is below myLoadedSWF.
Most likely the simplest solution is to add your loaded SWFs
to the property "root", not stage. root can refer to different
things in different places, but most of the time it refers to the
MainTimeline, and if I had to guess I would say it almost certainly
does in your case. Note that the "root" property is typed as a
DisplayObject, not a DisplayObjectContainer, so addChild (which is
a DisplayObjectContainer method) will not be recognized unless you
typecast to DisplayObjectContainer or a subclass of
DisplayObjectContainer, like Sprite or MovieClip:
MovieClip(root).addChild(myLoadedSWF)
Also note that, unlike AS2, in AS3 it's very easy to simply
add your loaded SWF below existing objects you create in Flash. You
can use addChildAt(obj,0) for instance to add it to the very
bottom. -
A best-efforts session with identifying, in ActionScript, an
image placed in a TextArea and identified with id, leads me to
wonder whether the id attribute is supported.
I have on disk a jpeg file of the amazom.com logo, a small
image.
In a scene, I have a TextArea with instance name
TextAreaPane, and a Dynamic textField with instance name
DynamicPane. Both of the html attributes in their properties panes
are set to true. There is a button onstage with instance name
"ShowIt".
If my script reads:
copyToShow = 'This is one place to see it: <img
src="D:/Imgs/amazon.jpg" id="nineties"><br>'
TextAreaPane.text = copyToShow;
DynamicPane.htmlText = copyToShow;
ShowIt.onPress = function( )
trace ("Via TextArea, I can identify: " +
TextAreaPane.nineties);
trace ("Via the textField, I can identify: " +
DynamicPane.nineties);
After the movie loads both in the Player and in the Windows
Projector, the image and text show correctly in both text panes.
When I hit the button, I get:
Via TextArea, I can identify: undefined
Via the textField, I can identify:
_level0.DynamicPane.nineties
Hitting the button after the scene starts playing allows the
very short asynchronous access time to elapse, so this isn't a case
of loading a textfield in one line of script, and then in the next
line expecting for ActionScript to have access to it.
Of course for the Projector I send these statements to a
textField on stage to see what trace gives me, and they're the
same.
I tried placing the two fields inside a movie clip (and
adding that movie clip instance name to the head of their dot
addresses), wondering if being a sub-object of a movie clip would
help, but the same results -- the textField handles it, while
TextArea doesn't.
... Does anyone have a means of getting better results?Tim,
Many thanks for the clue and the amendments -- once I had
finished a late night of it, a cleanup chore unearthed a magazine
that's had me engrossed for a day and a half and produced the
appearance of ignoring your replies; actually the computers have
been off.
I won't be back to it for another few hours at least, but
wanted to acknowledge the support; the hints in your message look
like they'll be the beginning of another day at it; I'll send word
when there's some kind of results.
I sent the same message to Adobe in their LiveDocs section, a
forum where they variously now tolerate people saying 'How d'ya do
this', 'How d'ya do
that', then now reply that that isn't the right forum for
how-to's, but rather for documentation problems. Well, since the
intro to TextArea says that it supports all the html that Flash
does, I added in the message that the inability to do the
dot-addressing-image-access that they explain under id is a
discrepancy, so qualifies to post even if they're in their
rule-adhering mood, but it hasn't appeared yet -- either under
review or discarded.
The reason I'd chosen TextArea was that the text column will
sometimes be long, and it would be nice to get the overage out of
sight by having a window that shows only the window's worth, hiding
what's above and below. (As you probably know, since attempting to
cover text in a dynamic field with a mask causes all of it to
disappear, that isn't an option.) The other night I felt I'd hit an
impassable wall with Flash; in resigning myself to use the Dynamic
Text field, I decided to cover the text overage with a translucent
screen of color, and be it due to having no choice that it may, the
desaturated stretches of text above and below would add ornament
and atmosphere to the screen, a faintly techno note. Since there
will often two to four of these scrolling fields going, an
intricate, happenstance pattern would develop that might turn out
to be nice.
But if the avenue you've opened starts working, I'll have my
choice between the two objects.
Quantainne -
ADOBE -- Please note bugs in ActionScript 3.0 documentation
1) When one selects a class to view, the Properties | Methods | Events | Styles | Effects | Constants | Examples links at the top right, are getting pushed off the browser page (this happens in all Browsers, i.e. Firefox, Chrome, Opera, Internet Explorer (7).
2) The spark.components and other spark classes do not show up in the latest version of Firefox, and also do not display in Adobe Community Help. E.g. the link http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/packag e-detail.html lists no classes in Firefox 3.6.13, and also I find the Spark components cannot be seen in Adobe Community Help (even though mine is fully updated). Perhaps this is related?
3) When one selects Packages to see all classes in the left-hand column, if one clicks on a class, one leaves the all packages view, and is placed in the package for that given class. This makes it really difficult to "scroll" through various classes in the all Packages / Classes view, i.e. to simply click one after the other, and see if it is what you want.Hmm ... I uninstalled and reinstalled Firefox and am still getting errors on Windows Vista. Also tried my XP machine with the following errors:
All from the primary Flex / AS link: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/package-summary.html,
1) If I select the first class in bottom-left-pane, the AAAARecord class, then the "Properties | Methods" links in the upper right disappear off the page on all 4 browsers*. I must stretch the window to 1350 pixels wide (across 2 monitors) before I can see these links. Only in one browser out of 6**, Firefox on XP, do they display correctly in a normal sized / full screen window.
2) Amazingly, in Vista / Firefox 3.6.13, after a reinstall, the first class listed is AbstractEvent, not AAAARecord. The first 4 classes are missing. If I go to the same link in Adobe Community Help -- i.e. search on ActionScript 3.0 Reference, and select the first result, now seeing the exact same URL as the one above -- the first class I see is Accessibility. The first 19 classes are missing, and classes are missing throughout the bottom-left-pane.
This does not happen in any other browser, but since I want to use Adobe Community Help, and Firefox is my main browser, it is problematic.
3) When I select the AAAARecord class (or the first class that does appear), the bottom-left-pane does change in all browsers / all machines, leaving the All Packages view, such that the bottom-left-pane now displays:
Package flash.net.dns classes
AAAARecord
ARecord
... (5 more).
From what I understood you wrote, you are not seeing this?
If this is indeed the intended operation, it makes scrolling through various classes nearly impossible. With the left-bottom-pane getting switched out constantly, one continually loses track when attempting to scroll through various classes.
* Vista Machine Browsers: Firefox, Chrome, and Opera (all latest versions, just installed), and Internet Explorer 7.
** XP Machine Browsers: FireFox latest version (3.6.13), and Internet Explorer 8. -
Generic function to place a component on the stage in ActionScript-3.0
Hi all,
I am new to flash and ActionScript 3.0.I am learning ActionScript 3.0.
My requirement/need is the AS3 code for placing any type of Component(viz., Button, CheckBox, ComboBox, ListBox, radiobutton, Slider, Scrollbar,Label,TextField, etc.,) on the stage with desired width,height, X and Y parameters(values) which we mention in "Properties" tab of Properties Window in flash. Hence, What i need is, (say)a generic ActionScript 3.0 method/function, which places any of the components present in "Components Panel" onto the stage.
i.e., As per my idea, the function prototype or signature may be like this:
function addComponent(int <width>, int <height>, int <XPos>, int <YPos>)
Plzzz... Can anyone help me in this context.... It is a general query i think so. i.e., A basic programmer's task for defining a function for my requirement. I think, if I want to add a Button onto the stage at 100,100 pixel position and the button component's width and height are 50,50 respectively, (i.e., button.X=button.Y=100 && button.width=button.height=50).
So, a button must be placed at 100,100, then, the sample code looks like this:
Button <btn_instance> = new Button(); //creates Button instance
<btn_instance>.addComponent(50,50,100,100);// properties of button.
I hope someone will help me.
Thanks in advance..
Srihari.Ch(OTTOMH) you could have a function similar to:
function placeComponent( container:DisplayObjectContainer, component:UIComponent, w:int, h:int, xpos:int, ypos:int ):void
container.addChild( component );
component.move( xpos, ypos );
component.setSize( w, h );
called with:
var b:Button = new Button();
placeComponent( this, b, 100, 20, 200, 200 );
You were alost there -
Custom ActionScript Component icon in Design View
Hi,
I have created a custom ActionScript component in Flex. I have added the Icon metadata tag before the class definition:
[IconFile("expandable-panel.png")]
public class ExpandablePanel extends TitleWindow
However, though the path to the image is correct, the icon for the custom component does not show up in Design View.
Any idea ?
Thanks.
Best regards,
Karl Sigiscar.Not very helpful. My question is more where should the icon be placed or what kind of extra configuration is required so that Flex Builder / Flash Builder can find it in Design view.
Yeah, yeah, I'm in the wrong forum. Doh. -
Actionscript clas to MXML class error!
Thank you for your help. This problem has plagued me for hours. I have an Actionscript class which I receive data from an SQLite database. When I receive the data I call a method from my custom MXML s:BorderContainer class. The MXML class is supposed to take the data and place markers on a Google Map.
When I try to call any of my components (Buttons, Map, anything not written inside the fx:script of the MXML class it throws the one of two errors or alters nothing on the screen. I understand this means I'm trying to play with the component before a certain process has completed (I'm a bit shaky at what point the MXML class needs to be in order for the components to be usable, if thats after initialization, creationComplete or if I need to use addChild or addElement somewhere per component for them to be usable).
I've tried in the Actionscript class to create a new instance of the MXML class then call the method. Inside the MXML class when I try to access a button component it throws the Error #1009: Cannot access a property or method of a null object reference. Inside Actionscript after the new instance I used the .initialize() call to try and fix this and although it seemed to stop the null error, then I noticed it would do one of two things, it would either throw an Object not initialized error with some playing around (addElement calls, creationComplete call) or it simply would not display anything on screen. If the code all worked I made sure it had made it to the method of the MXML class just fine and all the code had been used, however, no changes or new creations were shown on screen.
I placed some simple code below to give a better visual of what I'm describing. Any and all help is appreciated and thanks again.
// The Actionscript class is named ConnectDatabase
private var test2:MainContainer;
test2 = new MainContainer();
test2.initialize();
// After the data is received from the SQLite database I call the MXML class (MainContainer) function with the following:
test2.connectionReadyMethod();
// Inside the MXML class named MainContainer
- I've tried different addElement statements, but I'm open to any advice as I'm problem doing them wrong.
- This is where I receive the nothing, the Error #1009: Cannot access a property or method of a null object reference, or the Object not Initialized errors.A couple of things come to mind.
The first is where is the MXML component and when is it instantiated? If it is in the 2nd, 3rd, etc. view of a navigator container, and creationPolicy for the container is not set to "all" (and it should not be set to "all" in some cases), then this error can occur.
If the MXML component is created based on the data returned, is it being created either in the data service result handler or at least in a method called from the result handler? Flex data calls are in general asynchronous, so you can't issue a data call send() and assume the data has been received and execute something after the send() that depends on the data.
Not sure if this helps, but this is what comes to mind.
If this post answers your question or helps, please mark it as such. Thanks!
http://www.chikaradev.com
Adobe Flex Development and Support Services -
Trigger actionscript from end of captivate movie
Hi Guys,
I'm going insane trying to work out how to trigger an
actionscript event from the last slide of my Captivate movie.
Basically I'm doing a product walk through which I am exporting as
a swf an then dynamically loading into my flash file.
I need to be able to detect when the externally loaded
Captivate swf has completed playback so that I can then continue on
with the rest of my flash movie.
I have tried adding a swf in Captivate with actionscript to
trigger the event at the end of the slide but it doesn't work?
I have also tried exporting the whole thing as an fla and
then re exporting it from Flash MX 2004 and the animation seems to
get ruined and out of synch.
Any ideas on how I can detect and trigger and AS event when
the loaded Captivate swf has completed would be much appreciated.
Thanks heaps for reading.
Chrishi Chris
i created a similar workaround. i ran into a number of issues
when trying to call an actionscript function at the end of a
Captivate swf. i determined that captivate is VERY picky about
imported swfs. for instance, i had a single imported swf that
contained an animated background and one line of actionscript, and
it never worked. however, when i split it into two separate swfs
(one just for graphics, one just for actionscript), it worked! go
figure.
i also noticed you have to be careful where you place it on
the captivate timeline, depending on what you're trying to do. if
you're calling an end-of-movie function, be sure the swf is only on
the last few frames of the last slide. sometimes when i placed the
actionscript swf on the first frame of my last slide it wouldn't
work, but after moving it down a bit, it worked fine.
lastly, i had to use "_root" to get mine working. i know many
people consider it bad form, but if it works, it works. i did the
following:
1. created a function in my Flash interface named "endDemo()"
2. created an empty Flash file with one line of actionscript:
_root.endDemo();
3. imported the swf into my captivate movie and placed it on
the last few frames of the last slide.
4. set my captivate movie prefs to stop at the end of the
movie, and not to fade out.
worked for me... good luck!
- philip -
Actionscript ignored when FLV is skipped
Hello, I hope someone can shed some light on this issue. I
have built a short presentation using Flash CS3. The presentation
was to be small enough to be emailed and delivered as a single
file. There are some short video clips contained within the
presentation that I have imported to the timeline and placed inside
movie clips.
The presentation is essentially a number of slides, and so I
have added forward and back buttons to navigate with.
The problem occurs when a user clicks either forward or back
while a FLV is playing. The player appears to ignore any remaining
actionscript on the timeline and play through to the very end of
the presentation at a very high speed for some reason.
The only way I have got around this problem is to remove the
forward and back arrows while the FLVs are playing, and return them
to the stage once the FLV has stopped, but this makes the
presentation difficult to navigate.
Are there any suggestions as to why this would happen? I
don't think it happens when you run the FLVs from an external
position into a FLVPlayBack component for example, so it may be an
issue with actually importing the FLV to the file itself.
Thanks in advance for any advice.Ned,
thanks for the response, im obviously new to actionscript. your reccomendation worked perfect.
so what i did: for each layer of embedded bone animations i made a new actionscript layer with unique code that controlled just that bone animation. so i repeated this for all other embedded bone animations and achieved the result i was looking for.
and your also right with gotoAndPlay(1) at the end of the script, at first my assumption was that i need something to reroute me back to frame 1 after the animation is played while the user still holds their mouse over the hotspot. i removed this line of code and it still works perfectly.
Cheers! -
How to separate embedded ActionScript from MXML
Hi all,
I need to separate the embedded ActionScript codes located in
between <mx:Application> tags (inside MXML). I need to
do this, becuse it will help me to simplify my job.
The embedded ActionScript code looks like this:
<mx:Script>
<![CDATA[
private var services:RemoteObject;
public function initApplication():void
services = new RemoteObject("GenericDestination");
services.source="com.mydomain.Services";
services.authorizeAccessTicket.addEventListener(ResultEvent.RESULT,
loginResultHandler);
]]>
</mx:Script>
Once I taked the whole codes, and placed inside a class
called Main.as and refere this class inside <mx:Application>
as following:
<mx:Script source="Main.as" />
I got the following error: 1037: Packages cannot be nested.
Main class looks like this:
package
import mx.rpc.remoting.RemoteObject;
public class Main
private var currentUser:User;
private var currentAccessTicket:AccessTicket;
private var services:RemoteObject;
public function Test()
services = new RemoteObject("GenericDestination");
services.source="com.mydomain.Services";
services.addEventListener(FaultEvent.FAULT, faultHandler);
services.authorizeAccessTicket.addEventListener(ResultEvent.RESULT,
loginResultHandler);
What I have to do in this case?You made your included file a class. Instead, you want to put
into your included AS files EXACTLY what appears in the
<mx:Script> block (without the CDATA). From your example, the
external AS file would start with private var services:RemoteObject
and not with package and class information.
Maybe you are looking for
-
Error while sending email from ABAP
Hi I am using function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send the email to an external id. In the debugging mode i can see the function module is getting executed successfully i.e sy-surc value is 0. But i am getting a sucess message i.e "No me
-
Hi I need help with verticle spry menu bar drop down menu. When I test locally it's working fine but when I upload the drop down menu isn't working I've spent days to fix it but couldn't can anyone help me it's driving mad!!!!! Thanks.
-
Rename and move files on remote FTP server
Hello, We have a scenario where XI transfers a file to a remote FTP server at partner end using File Receiver Communication channel. These files are huge,so there is a risk of picking up incomplete files at their end when XI is still writing the file
-
CS5 Illustrator to CS4 Illustrator
I need to save a CS5 Illustrator file down to a CS4 Illustrator without loosing any data or flattening any work. Is there a way?
-
Just upgraded to 3.0 and now I can see my notes synched from Outlook. Great update, among others. Is there a way to change the Notes view on the iPod from "By Date" to "By Subject" in order to sort by name?