ActionScript 3 code help?
I am a newbie to flash and only know some simple stuff. I would appreciate some help please?
I'm trying to create a simple tween animation with button, the animation work perfectly,
The problem is that I want my animation, to play also if there is no button action... like a loop function or a replay?
There's my AS3 code
import fl.transitions.Tween;
import fl.transitions.easing.*;
var tmelX : Number = 0;
var coletteX : Number = -958;
var lakayX : Number = -1916;
var offerX : Number = -2874;
var xTween:Tween;
xTween = new Tween(content_mc,"x",Elastic.easeInOut,content_mc.x,coletteX,2,true);
var buttons : Array = [btn1,btn2,btn3,btn4];
for (var i:int = 0; i< buttons.length ; i++){
buttons[i].addEventListener(MouseEvent.MOUSE_OVER,navigate);
function navigate(event:MouseEvent):void{
switch (event.target){
case (btn2) : setTween(coletteX);
break;
case (btn1) : setTween(tmelX);
break;
case (btn3) : setTween(lakayX);
break;
case (btn4) : setTween(offerX);
break;
function setTween(tweenX:Number):void
xTween.begin = content_mc.x;
xTween.finish = tweenX;
xTween.start();
// time between auto rollovers is idleTime+timeBetweenRollOvers (=5 seconds in example)
var idleTime:int = 4000;
// time between each buttons rollover
var timeBetweenRollOvers:int = 1000;
var t1:Timer=new Timer(idleTime,0);
t1.addEventListener(TimerEvent.TIMER,navF);
t1.start();
var buttonIndex:int;
var t2:Timer=new Timer(timeBetweenRollOvers,4);
t2.addEventListener(TimerEvent.TIMER,timerF);
function navF(e:TimerEvent):void{
buttonIndex=0;
t2.start();
function timerF(e:TimerEvent):void{
buttons[buttonIndex].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OVER));
buttonIndex++;
this.addEventListener(MouseEvent.MOUSE_MOVE,mousemoveF);
function mousemoveF(e:MouseEvent):void{
t2.reset();
t1.reset();
t1.start();
import fl.transitions.Tween;
import fl.transitions.easing.*;
var tmelX : Number = 0;
var coletteX : Number = -958;
var lakayX : Number = -1916;
var offerX : Number = -2874;
var xTween:Tween;
xTween = new Tween(content_mc,"x",Elastic.easeInOut,content_mc.x,coletteX,2,true);
var buttons : Array = [btn1,btn2,btn3,btn4];
for (var i:int = 0; i< buttons.length ; i++){
buttons[i].addEventListener(MouseEvent.MOUSE_OVER,navigate);
function navigate(event:MouseEvent):void{
switch (event.target){
case (btn2) : setTween(coletteX);
break;
case (btn1) : setTween(tmelX);
break;
case (btn3) : setTween(lakayX);
break;
case (btn4) : setTween(offerX);
break;
function setTween(tweenX:Number):void
xTween.begin = content_mc.x;
xTween.finish = tweenX;
xTween.start();
Similar Messages
-
Hi everyone just signed up to this forum today, really need help, would appreciate your help.
Basically I have created 5 buttons on one single layer. I am now trying to link each button to a website, but to no success as of yet.
I realised that maybe in order to make it easier for myself I need to put each button in its own layer and insert the following actionscript code I've inserted for one of my buttons:
stop()
home_btn.addEventListener(MouseEvent.CLICK, mouseClick);
function mouseClick(event:MouseEvent):void
var request = new URLRequest("http://www.sign-technologies.net/");
navigateToURL(request,"_blank");
This code links my first button "home_btn" to my site, which is still underconstruction. When I run it in flash it works, but when I click the button in the actual web browser it will not go to the webpage, so I'm stuck.
Another question: For convience sake is there a way I can have all the buttons in one layer, but insert code that can seperate one button from the other? Anyone have that code?You can place all of your buttons in one layer and all of your code preferably in another layer. What you will need to do is have differently named functions for each button. You can not name them all "mouseClick"... I'll suggest you name the function in relation to the button, as in....
home_btn.addEventListener(MouseEvent.CLICK, homeClick);
function homeClick(event:MouseEvent):void
var request = new URLRequest("http://www.sign-technologies.net/");
navigateToURL(request,"_blank");
As far as the file not working when testing in a browser, it should. There is nothing wrong with the code.
There are other ways of coding where you can have the same function shared by all the buttons, but that might be a better lesson for another day. -
Revision: 12077
Revision: 12077
Author: [email protected]
Date: 2009-11-20 18:16:32 -0800 (Fri, 20 Nov 2009)
Log Message:
Although Spark RichText does not support link formats, modifying compiled FXG to not generate ActionScript code that will cause compile time exceptions.
Removing references to Flex Builder 3 in RPC.
QE notes: N/A
Doc notes: N/A
Bugs:
SDK-24305 - Link format property nodes cause errors on RichText in FXG 2.0
SDK-24322 - A couple references to Flex Builder 3 in Flex 4 LangRef (and code comments)
Reviewer: Deepa
Tests run: checkintests
Is noteworthy for integration: No
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-24305
http://bugs.adobe.com/jira/browse/SDK-24322
Modified Paths:
flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java -
Actionscript code can be seen in a search, but not seen in Actions Panel nor symbol
I purchased a template which has flash menu buttons. The current button url's go to index.html, index-2.html, index-3.html, and so on. I want to change these. In Flash, I searched for index-3.html and it finds it at the location: Symbol 'Button2 copy 3' -> Layer 'Layer 4' -> Frame '1' and the actionscript command is: getURL("index-3.html");
Everything is fine so far. However, when I double-click the symbol and go to the location (or double-click the search result), the actionscript command cannot be found at all. I tried pressing F9 to open the Actions Panel, and I see the button symbol but I don't see any actionscript commands associated with it. It seems to be very unusual - the search picks up the actionscript command but it can't be seen in the symbol's location where it says it is nor can it be seen in the Actions Panel. The script does work but it just cannot be seen! Does anyone know how to see the actionscript code in the Actions Panel or in the button symbol?show a screenshot of movie explorer after searching for getURL("index-3.html")
-
Survey creation abap code help needed
hello experts,
I need to create a survey in crm, by taking values from end-user from a webpage
A sample code help is needed.
Thanks in advanceTake a look at this SAP note - It does a pretty good job of detailing the steps for you. No coding necessary, it worked out of the box for us after patching this note.
https://service.sap.com/sap/support/notes/638320 -
Software for convert Filter Presets to ActionScript Code
This software convert filter presets in Flash 8, CS3 and CS4
to ActionScript code...
Very Fast and Usseful...
http://www.astrodreams.com/flashfilterpresets/convert_flash_filters_presets_to_actionscrip t117release.rarthat's the easy way. just load the bitmap into the library
and reference it. but my client needs the entire app to rely upon
code only, no timeline or library references. so i need to recreate
the line art of the bitmap of a grab icon into graphics api.
wondering if there's an easy convert of a bitmap to graphics api
actionscript code or do i have to just do it by hand which would be
a pain. -
Will app store approve an app to load external swf containing actionscript code in it?
Will app store approve an app to load external swf containing actionscript code in it?
Hi...It is not in the application bundle...it will be hosted on a server and from there it will be loaded in the application. I had created one sample application where it is loading a swf which is hosted on different server. This swf contained some actionscript code on its timeline. This app was working on ipad. I just wanted to know whether App Store will approve this.
-
Inquiring minds may find this error code helpful: 0x207
Hopefully I'm asking this in the right forum. I just downloaded the update for Microsoft Remote Desktop for Windows Phone 8.1 (I am actually running Denim on a 1520 but that may not matter). The version is 8.1.8.13 released 3/4/2015. I am trying to connect
to a RemoteApp application but I am receiving the following error message shortly after it tries the redirection process (I think it fails at the securing remote connection part after it attemps the redirction to the RemoteApp application collection server):
Connection error
We couldn't connect to the remote PC. This might be due to an expired password. If this keeps happening, ask your admin or tech support for help.
Inquiring minds may find this error code helpful: 0x207
I am able to connect directly to both the broker server as well as the RemoteApp collection server with this application with the same credentials and am only experiencing this when trying to connect to a RemoteApp application.
We are running Server 2012 R2 for both the broker/web and the collection servers. We are not using a gateway server as we use an SSL VPN concentrator instead for access outside of our network. We have server farms set up as well in the RemoteApp topology.
Any info would help or let me know if I'm not posting in the right forum for this issue. I know this is a very recent release so I'm trying to figure out if I should wait for a bug fix or if there's something that I can do on my end.
Thank you in advance for your time!Hi Scott,
Please check your configuration once again and the certificate must be well configured. Also for accessing RemoteApp there might be the permission issue for your use, recheck once and verify. You can also got through
this article for information.
Hope it helps!
Thanks.
Dharmesh Solanki
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Redemption code help that you keep sending everyone to is NOT HELPING. It just tells you to put in the redemption code. IF I HAD THE CODE I WOULD HAVE PUT IT IN!! How do I find the code?
Version 5.5 was/is not part of the Cloud, so you could not have subscribed to that version
You install version 5.5 on a 2nd computer exactly the same way you did the 1st time... put the disc in the drive and enter your serial number when asked
Does your serial number show on your account page?
https://www.adobe.com/account.html for serial numbers on your Adobe page... or
Lost serial # http://helpx.adobe.com/x-productkb/global/find-serial-number.html -
Code help in writing report Program
Hello experts
I have to write a selection screen program based on the following requirements (only for sales Org:5090, plant:9000, Outbound delivery type= "LF")
Selection parameters:
Material (lips-matnr)
Sold to party(likp-kunag): can hardcode it to 5090
Sales Org(likp-vkorg)
Plant(lips-werks) : hard code it to plant:9000
Sales order(likp-vbeln)
Actual goods movement dates(likp-wadat_ist)
Invoice number
Sales order
Output
material numberlips~matnr ( should Display only S* materials and material type FERT)
Serial number of the device shipped (objk-sernr)
Delivery number (lips~vbeln)
Invoice number (vbrp-vbeln)
Invoice price=Vbrp-vbeln/quantity (invoice price)
Notification number (Viqmel-QMNUm)
KBB Repair Level(VIQMEL-QMTXT from QMCOD )
KBC Repair level(VIQMMA-MNCOD from KBC-SM07 code group(VIQMMA-MNGRP))
code help is higly appreciated,
Thanks
SpHi anurag,
Code is going like this, i could able to display it but when i run it ABAP Dump is coming.
what could be the reason?
Tahnks
SP
*& Report ZSDR_PRICING_KSE_RPT *
REPORT ZSDR_PRICING_KSE_RPT .
TABLES: likp, lips, vbfa, vbak.
TYPE-POOLS: slis.
*/ Selection and Input Parameters
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-003.
SELECT-OPTIONS: s_matnr FOR lips-matnr,
s_kunag FOR likp-kunag.
SELECT-OPTIONS: s_vkorg FOR likp-vkorg NO INTERVALS,
s_werks FOR lips-werks.
SELECT-OPTIONS: s_vbeln FOR likp-vbeln,
s_waist FOR likp-wadat_ist.
SELECT-OPTIONS: s_vgbel FOR lips-vgbel.
SELECTION-SCREEN END OF BLOCK block2.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
TYPES: BEGIN OF ty_data,
matnr TYPE lips-matnr,
sernr TYPE equi-sernr,
vbeln TYPE lips-vbeln,
invno TYPE vbfa-vbeln,
qmnum TYPE vbak-qmnum,
netwr type vbrp-netwr,
END OF ty_data.
DATA: gt_data TYPE TABLE OF ty_data WITH HEADER LINE.
TYPES: BEGIN OF ty_lips,
vbeln TYPE likp-vbeln,
matnr TYPE lips-matnr,
wersk TYPE lips-werks,
vgbel TYPE lips-vgbel,
END OF ty_lips.
DATA: gt_lips TYPE TABLE OF ty_lips WITH HEADER LINE.
DATA: gt_vbfa TYPE TABLE OF vbfa WITH HEADER LINE.
DATA: gt_vbrp TYPE TABLE OF vbrp WITH HEADER LINE.
TYPES: BEGIN OF ty_ser01,
lief_nr TYPE ser01-lief_nr,
obknr TYPE ser01-obknr,
sernr TYPE objk-obknr,
END OF ty_ser01.
DATA: gt_ser01 TYPE TABLE OF ty_ser01 WITH HEADER LINE.
START-OF-SELECTION.
PERFORM get_data.
PERFORM display_data.
*& Form get_data
FORM get_data.
SELECT likpvbeln lipsmatnr lipswerks lipsvgbel
INTO CORRESPONDING FIELDS OF TABLE gt_lips
FROM likp INNER JOIN lips ON lipsvbeln = likpvbeln
WHERE lips~matnr IN s_matnr
AND lips~werks IN s_werks
AND likp~kunag IN s_kunag
AND likp~wadat_ist IN s_waist
AND lips~vgbel IN s_vgbel
AND likp~vkorg IN s_vkorg.
IF NOT gt_lips[] IS INITIAL.
SELECT vbeln vbelv INTO CORRESPONDING FIELDS OF TABLE gt_vbfa
FROM vbfa
FOR ALL ENTRIES IN gt_lips
WHERE vbelv = gt_lips-vgbel
AND vbtyp_n = 'M'.
IF NOT gt_vbfa[] IS INITIAL.
SELECT vbeln matnr netwr
INTO CORRESPONDING FIELDS OF TABLE gt_vbrp
FROM vbrp FOR ALL ENTRIES IN gt_vbfa
WHERE vbeln = gt_vbfa-vbeln.
SELECT ser01lief_nr ser01obknr objk~sernr
INTO CORRESPONDING FIELDS OF TABLE gt_ser01
FROM ser01 INNER JOIN objk ON objkobknr = ser01obknr
FOR ALL entries IN gt_vbfa
WHERE ser01~lief_nr = gt_vbfa-vbeln
AND taser EQ 'SER01'.
ENDIF.
ENDIF.
clear: gt_data[].
LOOP AT gt_lips.
LOOP AT gt_vbfa WHERE vbelv = gt_lips-vgbel.
READ TABLE gt_vbrp WITH KEY vbeln = gt_vbfa-vbeln
matnr = gt_lips-matnr.
LOOP AT gt_ser01 WHERE lief_nr = gt_vbfa-vbeln.
gt_data-matnr = gt_lips-matnr.
gt_data-sernr = gt_ser01-sernr.
gt_data-vbeln = gt_lips-vbeln.
gt_data-invno = gt_vbfa-vbeln.
gt_data-netwr = gt_vbrp-netwr.
APPEND gt_data.
ENDLOOP.
ENDLOOP.
ENDLOOP.
ENDFORM. " get_data
*& Form display_data
FORM display_data.
DATA: lv_repid TYPE sy-repid.
lv_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = lv_repid
I_INTERNAL_TABNAME =
i_structure_name = gt_data
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = gt_fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = lv_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT =
it_fieldcat = gt_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_data
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. -
I was messing around with my iPad and put in a in app purchese and forgot the pass code help!
I was messing around with my iPad and put in a in app purchese and forgot the pass code help!
Do you mean you forgot the passcode for your iPad? If so you need to restore it through the recovery mode described in http://support.apple.com/kb/HT1808
-
Hello,
Apologies in advance if this question has been asked many
times before - I know virtually nothing about Flash or
Actionscript.
We're investigating the possiblity of distributing Flash
projectors with our application. We'd like to copy-protect the
projectors and we're looking using Actionscript to write some
copy-protection code.
Before we even start this, we need to know whether it's
possible to hide our Actionscript code - it looks like there are
tools available to enable someone to take a peak at our code (e.g.
Action Script
Viewer).
Is it possible to hide ActionScript code? Would we need to
use an obfuscator?
Many thanks.there are two related, but different issues here. one is
hiding/encrypting/obscurring actionscript in a swf and the other is
stopping someone that has a legit copy of your software from
distributing it without your approval.
first, you can obscure your code and make it difficult for a
novice to unobscure without using a secure external file.
actionscript obsfucator is an example of one such (trivial)
obscuring program.
but it's very easy to "crack" (and that term is used very
loosely because the schemes are all trivial to unravel and probaby
don't deserve the term). and it's easy to automate the unobscuring
of such swf-obscurring schemes using a jsfl file.
in the end, it's quicker and easier to unobscure actionscript
that an author has run through a program like actionscript
obsfucator than it was for the actionscript's author to obscure.
and that's a pretty bad obscuring scheme. but it's still good
enough to block the majority of would-be code lifters.
now to answer your question, flash can load several file
types (like txt files, xml files, aso files) that may be relevent
in this discussion and several file types that i don't think are
relevent (jpg, mp3 and swf) files. it can also prompt the execution
of some programs.
however, files on a computer, no matter the file-type, are
not secured from an authorized user of that computer. a local file
can hide nothing that it contains from unrestricted users of that
system. though again, it may be difficult for a novice to inspect
some file types (like aso files).
further, this external file has to be loaded (or executed)
using actionscript in flash and this part of the flash actionscript
would have to be "unencrypted/not obscured" in order to prompt the
loading/excecution of the external file. so, anyone could "see"
what file is being used to load the "key". and therefore it's
location and that fact that it is "the key" cannot be hidden. and
that eliminates your security.
the user simply copies that "key" file along with your
projector file and can distribute that pair to anyone they like.
the user need not even unobscure or decrypt the remainder of your
actionscript and need understand nothing about your (possibly)
sophisticated encryption/obscurring scheme.
so, for your purposes that won't work. for someone that only
wants to protect their actionscript from being inspected it is
possible to encrypt the actionscript and prevent that from being
decrypted by all but the most sophisticated of decryption
specialists, IF they have, at least, one secure file (that would
contain the "key(s)"). -
Redemption Code Help, where do I locate it?
Redemption Code Help, where do I locate it?
You have activate the subscription only once in the month of August 2014, so you can activate it one more time, if the Cc is asking for serial number then please follow the steps:
Creative cloud do not need a serial number. it will be using your Adobe ID on which you have purchased the creative cloud membership.
So you need to login with your Adobe ID and password to activate the cloud membership.
Log out & log back in of the CC Desktop App.
In case it is not signing in successfully please try the following:
I don't know which operating system you are working on so i am giving you some steps windows and MAC OS:
Windows:
In windows 7 navigate to following location:
/windows/system32/drivers/etc
1. look out for "Hosts" file
2. Open it with notepad
3. Check if you have any entry for Adobe
4. Remove the entries and try again launching any product from CC
On Windows XP navigate to following location:
\windows\system32\drivers\etc
1. look out for "Hosts" file
2. Open it with notepad
3. Check if you have any entry for Adobe
4. Remove the entries and try again launching any product from CC
Mac:
1. Please click on "Go" and navigate to /private/etc
2. Open "hosts" file and check out for any entries for Adobe.com
3. Remove the entries and save the file
4. try again launching any product from CC
You can refer :
http://helpx.adobe.com/creative-cloud/kb/ccm-prompt-serial-number.html
http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-i ssues.html.
Please let us know if it worked.
Regards,
Rajshree -
When I build a movie in Flash, how do I switch to the
Actionscript code? is it like switching in Dreamweaver?Hi,
Press F9 to open the actions panel.
Alan -
HT201209 When I try to redeem it says error invalid code help me please.
When I try to redeem it says error invalid code help me please.
Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact
Note: iTunes Gift Cards are only Valid in Country of issue -
I just had to buy a new computer because my "vintage" Mac died. After migrating my backup drive over to my New mac book my Adobe CS no longer works. I get a 150:30 error code HELP!
You need to reinstall it properly, not use migration.
Mylenium
Maybe you are looking for
-
flash cs6 has this: http://www.adobe.com/devnet/air/articles/using-ane-in-flash.html flash builder 4.6 seems to only allow this through command line compilation.
-
Online galleries without Flash???
Hi, in PSE 6 or 7, when building an online gallery of pictures to be put on a web site, I seem to be unable to find a way to build a gallery that doesn't use Flash for navigation. Is there any template somewhere that builds a thumbnail page with only
-
my n80 takes 90 seconds to send atext message and during this sending time the whole phone freezes and no buttons or functions work . is this normal ? please help
-
How to download RAW plugin for Elements 7
I used to be able to edit RAW files without much trouble but now I can`t . I understand that some plug in is now required but I don`t understand this or how to do it.
-
Why 10g & 9i DB on AMD-64 still under Dev Release?
In MetaLink, it shows that Oracle 10g and 9i are certified Linux AMD64 on SLES-9, SLES-8, RH 3, SuSE 8n and RH 3 for 10g and 9i repectively. Oracle downloads still shows under Developer's Release for above databases. When will be the GA version avail