Need help with this sql query
the following query returns me the correct no of rows:
select col1 from tab1 where
col1 like '%'||chr(32)||'%';
but i need to use my query in the following form and it doesn't return any row:
select col1 from tab1 where
col1 IN ('%'||chr(32)||'%');
what am I doing worng?
thanks in advance.
Or in 10g (just recycling another example):
WITH t AS (SELECT 'OPTI1457' || CHR(32) col1
FROM dual
UNION
SELECT 'OPT123' || CHR(9)
FROM dual
UNION
SELECT 'OPTIM12345'
FROM dual
SELECT t.*
FROM t
WHERE REGEXP_LIKE(t.col1, CHR(32) || '|' || CHR(9))
; C.
Similar Messages
-
Newbie - need help with a SQL query for a bar chart
Hi,
I'm a new user on APEX with no real SQL knowledge and I'm trying to build a dashboard with charts into an existing APEX application. Based on another application, I have come up with the following SQL code:
select null link
, CATEGORY label
, count (decode(PROJECT_STATUS,'1',PROJECT_ID))"Active"
, count (decode(PROJECT_STATUS,'2',PROJECT_ID))"Complete"
, count (decode(PROJECT_STATUS,'3',PROJECT_ID))"On Hold"
, count (decode(PROJECT_STATUS,'4',PROJECT_ID))"Pipeline"
, count (decode(PROJECT_STATUS,'5',PROJECT_ID))"Pending Review"
from GRAPO_PROHEADTRK
where (PROJECT_STATUS='1' or PROJECT_STATUS='2' or PROJECT_STATUS='3' or PROJECT_STATUS='4' or PROJECT_STATUS='5' or PROJECT_STATUS='6')
group by CATEGORY
Order by COUNT(PROJECT_ID) DESC
The code from the other app was:
select null link
, FUNCTIONAL_AREA label
, count (decode(PROJECT_STATUS,'Active',PROJECT_ID))"Active"
, count (decode(PROJECT_STATUS,'Complete',PROJECT_ID))"Complete"
, count (decode(PROJECT_STATUS,'On Hold',PROJECT_ID)) "On Hold"
, count (decode(PROJECT_STATUS,'Recurring',PROJECT_ID))"Recurring"
, count (decode(PROJECT_STATUS,'Pipeline',PROJECT_ID))"Pipeline"
, count (decode(PROJECT_STATUS,'Not Approved',PROJECT_ID))"Not Approved"
from PM_V2
where LOB='S2S' and (FUNCTIONAL_AREA='Accounts Payable' or FUNCTIONAL_AREA='Expense' or FUNCTIONAL_AREA='Procurement' or FUNCTIONAL_AREA='Fixed Assets')
group by FUNCTIONAL_AREA
Order by COUNT(PROJECT_ID) DESC
I'm getting a "Failed to parse SQL query!" error when I try to run validation.
Is this enough info for some assistance? Any help would really be appreciated.
Thanks,
RachelHello,
This is more of an SQL question, rather than specifically APEX-related. It's notable that you say: I'm a new user on APEX with no real SQL knowledgeWhich is fine (we all have to start somewhere, afterall) but it might be worth de-coupling the problem from APEX in the first instance. I'd also strongly recommend either taking a course, reading a book (e.g. http://books.google.co.uk/books?id=r5vbGgz7TFsC&printsec=frontcover&dq=Mastering+Oracle+SQL&hl=en#v=onepage&q=Mastering%20Oracle%20SQL&f=false) or looking for a basic SQL tutorial - it will save you a whole lot of heartache, I promise you. Search the oracle forums for the terms "Basic SQL Tutorial" and you should come up with a bunch of results.
Given that you've copied your query template from another, I would suggest ensuring that the actual query works first of all. Try running it in either:
* SQL Editor
* SQL*Plus
* an IDE like SQL Developer (available free from the OTN: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html ) or TOAD or similar.
You may find there are syntax errors associated with the query - it's difficult to tell without looking at your data model.
select null link
, CATEGORY label
, count (decode(PROJECT_STATUS,'1',PROJECT_ID))"Active"
, count (decode(PROJECT_STATUS,'2',PROJECT_ID))"Complete"
, count (decode(PROJECT_STATUS,'3',PROJECT_ID))"On Hold"
, count (decode(PROJECT_STATUS,'4',PROJECT_ID))"Pipeline"
, count (decode(PROJECT_STATUS,'5',PROJECT_ID))"Pending Review"
from GRAPO_PROHEADTRK
where (PROJECT_STATUS='1' or PROJECT_STATUS='2' or PROJECT_STATUS='3' or PROJECT_STATUS='4' or PROJECT_STATUS='5' or PROJECT_STATUS='6')
group by CATEGORYNote that your "order by" clause references a field called "PROJECT_ID", which exists in the old query but you've changed other similar references to "PROJECT_STATUS" - is it possible you've just missed this one? The perils of copy-paste coding I'm afraid... -
Need help in this sql query to use Case Statement
hi All,
I have the below query -
SELECT DISTINCT OFFC.PROV_ID
,OFFC.WK_DAY
,CASE
WHEN OFFC.WK_DAY ='MONDAY' THEN 1
WHEN OFFC.WK_DAY ='TUESDAY' THEN 2
WHEN OFFC.WK_DAY ='WEDNESDAY' THEN 3
WHEN OFFC.WK_DAY ='THURSDAY' THEN 4
WHEN OFFC.WK_DAY ='FRIDAY' THEN 5
WHEN OFFC.WK_DAY ='SATURDAY' THEN 6
WHEN OFFC.WK_DAY ='SUNDAY' THEN 7
END AS DOW
,OFFC.OFFC_OPENG_TIME
,OFFC.OFFC_CLSNG_TIME
FROM GGDD.PROV_OFFC_HR OFFC
WHERE OFFC.PROV_ID='0000600'
WITH UR;
this query is bringing results in 6 differnt rows with opening and closing time for each day separately. I want to generate the data in one row with each day having opening and closing time, so for 7 days, total 14 columns with opening and closing time. But i am not able to do that using case statement.
can somebody help me in achieving that.
thanks,
iamhereHi,
Welcome to the forum!
That's called a Pivot .
Instead of having 1CASE expression, have 14, one for the opening and one for the closing time each day, and do GROUP BY to combine them onto one row.
SELECT OFFC.PROV_ID
, MIN (CASE WHEN OFFC.WK_DAY ='MONDAY' THEN OFFC.OFFC_OPENG_TIME END) AS mon_opn
, MIN (CASE WHEN OFFC.WK_DAY ='MONDAY' THEN OFFC.OFFC_CLSNG_TIME END) AS mon_cls
, MIN (CASE WHEN OFFC.WK_DAY ='TUESDAY' THEN OFFC.OFFC_OPENG_TIME END) AS tue_opn
, MIN (CASE WHEN OFFC.WK_DAY ='TUESDAY' THEN OFFC.OFFC_CLSNG_TIME END) AS tue_cls
FROM GGDD.PROV_OFFC_HR OFFC
WHERE OFFC.PROV_ID = '0000600'
GROUP BY offc.prov_id
;This assumes there is (at most) only one row in the table for each distinct prov_id and weekday. If not, what do you want to do? Post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data.
The staement above works in Oracle 8.1 and up, but there's a better way (SELECT ... PIVOT) available in Oracle 11. What version are you using? (It's always a good idea to include this when you post a question.)
Edited by: Frank Kulash on Jan 6, 2011 8:22 PM -
Need Help with Advanced SQL Query
It's advanced for me, at least. I have three tables that I
need to use:
Product (product_id and product_title are the fields)
shipRegion (shipRegion_ID)
product_shipRegion_shipCharge (product_id, shipRegion_ID,
primaryShipCharge, secondaryShipCharge)
What I am trying to do is create a query that will look for
two things:
1. Any product that is listed in the
product_shipRegion_shipCharge table that has a primary or secondary
ship charge of $0.00 or is NULL.
That part is easy:
SELECT DISTINCT p.product_id, p.product_title
FROM product p
INNER JOIN product_shipRegion_shipCharge pss ON p.product_id
= pss.product_id AND (pss.primaryShipCharge IS NULL OR
pss.primaryShipCharge = 0 OR pss.secondaryShipCharge IS NULL OR
pss.secondaryShipCharge = 0)
WHERE p.display = 1
AND p.price > 0
It's this next part that's tricky for me:
2. Get the product_id and product_title (from the product
table) that does NOT have any entry in the
product_shipRegion_shipCharge table.
I'm guessing that I need to include some kind of LEFT JOIN in
the above query to find out what all of the regions are (from the
shipRegion table) and then see what's missing for each product in
the product_shipRegion_shipCharge table, but I have no idea how to
do it.
Anyone?
JoshThis should be what the query would look like using the left
join:
SELECT product_table.product_id, product_table.product_title
FROM product_table
LEFT OUTER JOIN product_shipRegion_shipCharge
ON product_shipRegion_shipCharge.product_id =
product_table.product_id
WHERE product_shipRegion_shipCharge. product_id IS NULL
SQL Server's query optimizer will probably turn the '...IN
(subquery)' or '...exists (subquery)' into this kind of execution
plan on its own - depending on your table structures. -
Please need help on this SQL query ..
hi peers,
here is my situation :
Field1 Field2 Field3
xa group1 req_id1
xb group2 req_id2
xc group3 req_id3
xa group4 req_id4
xb group5 req_id5
i need to pull only the group3 record that comes right away after group2. Req_id's are in chronological order and groupx are texts
: i.e : req_id1 < req_id2 < req_id3 <.....
in other terms, i need the record that comes after the re cord flagged by group2..knowing that req_id3 is right after req_id2.
any thoughts ?
thanksHi,
Use the analytic LAG function to get a value from an earlier row:
WITH got_prev_field2 AS
SELECT field1, field2, field3
, LAG (field2) OVER (ORDER BY field3) AS prev_field2
FROM my_situation
SELECT field1, field2, field3
FROM got_prev_field2
WHERE prev_field2 = 'group2'
;Like all analytic functions, LAG is computed after the WHERE clause is applied. To use the value returned by LAG in a WHERE clause, we have to compute it in a sub-query.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data. -
Help with this SQL Query please
How many garments has each dressmaker constructed? You should give the number of garments and the name, house number and post code of each dressmaker.
tables; dressmaker contains D_NO, D_NAME, D_HOUSE_NO, D_POST_CODE
garment contains STYLE_NO, DESCRIPTION, LABOUR_COST, NOTIONS
quantities contains STYLE_Q, SIZE_Q, QUANTITY
The question title is multitableJOINS
I believe i have to use (garment.style_no=quantities.style_q) if it will work, im new to oracle & SQL so all the help i get i am grateful for, thankyou.Not to be a jerk, but this forum is really not intended for homework. Show a little effort, and try it out. Post some results, and maybe someone will help you out. Getting others to do your homework will not help you when you get out of school.
-
Need Help with this SQL Report
Declare @Total int
Select
@Total=count(*)
From
v_Add_Remove_Programs
Where
v_Add_Remove_Programs.DisplayName0 Like '@DisplayName'
Select Distinct
v_Add_Remove_Programs.DisplayName0 as [Software Product],
Version0 as [Version],
COUNT(v_GS_System.Name0) as [Count],
Round(100.0*count(*)/@Total,1) as [Percentage]
FROM
v_Add_Remove_Programs
Join
v_GS_System ON v_Add_Remove_Programs.ResourceID = v_GS_System.ResourceID
WHERE
v_Add_Remove_Programs.DisplayName0 Like '@DisplayName'
GROUP BY
Version0,
v_Add_Remove_Programs.DisplayName0
ORDER BY
[Percentage] DESC
Select Distinct
v_GS_SYSTEM.Name0 as [Computer Name],
v_Add_Remove_Programs.DisplayName0 as [Software Product],
Version0 as [Version]
FROM
v_Add_Remove_Programs
Join
v_GS_SYSTEM ON v_Add_Remove_Programs.ResourceID = v_GS_SYSTEM.ResourceID
WHERE
v_Add_Remove_Programs.DisplayName0 Like '@DisplayName'
GROUP BY
v_GS_SYSTEM.Name0,
Version0,
v_Add_Remove_Programs.DisplayName0
ORDER BY
[Version] DESC
If I remove the @DisplyaName variables and type in a product name sucha as:
= 'Microsoft Office Professional 2013" or something, it works fine. How can I get the @DisplayName variables to work for me?
Thanksv_Add_Remove_Programs.DisplayName0 Like '%'+ @DisplayName+'%'
-
Help with an SQL Query on the Logger
We are running UCCE 8.5(3) and need help with an SQL query. When I run the below I would also like to see skill group information(name preferably)? Any help would be greatly appreciated!
select * from dbo.t_Termination_Call_Detail where DateTime between '10-11-2012 00:00:00:00' and
'10-11-2012 23:59:59:59'David, thanks for replying. Unfortunitly I don't know enough about SQL to put that into a query and have it return data. Would you be able to give an example on what the query would look like?
-
Please need help with this query
Hi !
Please need help with this query:
Needs to show (in cases of more than 1 loan offer) the latest create_date one time.
Meaning, In cases the USER_ID, LOAN_ID, CREATE_DATE are the same need to show only the latest, Thanks!!!
select distinct a.id,
create_date,
a.loanid,
a.rate,
a.pays,
a.gracetime,
a.emailtosend,
d.first_name,
d.last_name,
a.user_id
from CLAL_LOANCALC_DET a,
loan_Calculator b,
bv_user_profile c,
bv_mr_user_profile d
where b.loanid = a.loanid
and c.NET_USER_NO = a.resp_id
and d.user_id = c.user_id
and a.is_partner is null
and a.create_date between
TO_DATE('6/3/2008 01:00:00', 'DD/MM/YY HH24:MI:SS') and
TO_DATE('27/3/2008 23:59:00', 'DD/MM/YY HH24:MI:SS')
order by a.create_datePerhaps something like this...
select id, create_date, loanid, rate, pays, gracetime, emailtosend, first_name, last_name, user_id
from (
select distinct a.id,
create_date,
a.loanid,
a.rate,
a.pays,
a.gracetime,
a.emailtosend,
d.first_name,
d.last_name,
a.user_id,
max(create_date) over (partition by a.user_id, a.loadid) as max_create_date
from CLAL_LOANCALC_DET a,
loan_Calculator b,
bv_user_profile c,
bv_mr_user_profile d
where b.loanid = a.loanid
and c.NET_USER_NO = a.resp_id
and d.user_id = c.user_id
and a.is_partner is null
and a.create_date between
TO_DATE('6/3/2008 01:00:00', 'DD/MM/YY HH24:MI:SS') and
TO_DATE('27/3/2008 23:59:00', 'DD/MM/YY HH24:MI:SS')
where create_date = max_create_date
order by create_date -
I need help with this script please ASAP
So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if you can.
The script (Sorry if it's a bit long):
#------------Startup-------------
display dialog "Social Studies Exchange Trviva Game by Justin Parzik" buttons {"Take the Quiz", "Cyaaaa"} default button 1
set Lolz to (button returned of the result)
if Lolz is "Cyaaaa" then
killapp()
else if Lolz is "Take the Quiz" then
do shell script "say -v samantha Ok starting in 3…2…1…GO!"
#------------Question 1-----------
display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
set A1 to (button returned of the result)
if A1 is "Apprentices" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#----------Question 2--------
display dialog "Most children were taught
to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
set A2 to (button returned of the result)
if A2 is "Bible" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#------------Question 3---------
display dialog "In the 1730s and 1740s, a religious movement called the_______swept through the colonies." buttons {"Glorius Revolution", "Great Awakening", "The Enlightenment"}
set A3 to (button returned of the result)
if A3 is "Great Awakening" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#-----------Question 4--------
display dialog "_______ was
a famous American Enlightenment figure." buttons {"Ben Franklin", "George Washington", "Jesus"}
set A4 to (button returned of the result)
if A4 is "Ben Franklin" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#----------Question 5-------
display dialog "______ ownership gave colonists political rights as well as prosperity." buttons {"Land", "Dog", "Slave"}
set A5 to (button returned of the result)
if A5 is "Land" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#---------Question 6--------
display dialog "The first step toward guaranteeing these rights came in 1215. That
year, a group of English noblemen forced King John to accept the…" buttons {"Declaration of Independence", "Magna Carta", "Constitution"}
set A6 to (button returned of the result)
if A6 is "Magna Carta" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#----------Question 7--------
display dialog "England's cheif lawmaking body was" buttons {"the Senate", "Parliament", "King George"}
set A7 to (button returned of the result)
if A7 is "Parliament" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#--------Question 8-----
display dialog "Pariliament decided to overthrow _______ for not respecting their rights" buttons {"King James II", "King George", "King Elizabeth"}
set A8 to (button returned of the result)
if A8 is "King James II" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#--------Question 9------
display dialog "Parliament named ___ and ___ as England's new monarchs in something called ____." buttons {"William/Mary/Glorius Revolution", "Adam/Eve/Great Awakening", "Johhny/Mr.Laphalm/Burning of the hand ceremony"}
set A9 to (button returned of the result)
if A9 is "William/Mary/Glorius Revolution" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#---------Question 10-----
display dialog "After accepting the throne William and Mary agreed in 1689 to uphold the English Bill of _____." buttons {"Money", "Colonies", "Rights"}
set A10 to (button returned of the result)
if A10 is "Rights" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#---------Question 11------
display dialog "By the late 1600s French explorers had claimed the ___ River Valey" buttons {"Mississippi", "Ohio", "Hudson"}
set A11 to (button returned of the result)
if A11 is "Ohio" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#------Question 12---------
display dialog "______ was sent to ask the French to leave 'English Land'." buttons {"Johhny Tremain", "George Washington", "Paul Revere"}
set A12 to (button returned of the result)
if A12 is "George Washington" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#---------Question 13-------
display dialog "_____ proposed the Albany Plan of Union" buttons {"George Washingon", "Ben Franklin", "John Hancock"}
set A13 to (button returned of the result)
if A13 is "Ben Franklin" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#--------Question 14------
display dialog "The __________ declared that England owned all of North America east of the Mississippi" buttons {"Proclomation of England", "Treaty of Paris", "Pontiac Treaty"}
set A14 to (button returned of the result)
if A14 is "" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#-------Question 15-------
display dialog "Braddock was sent to New England so he could ______" buttons {"Command an attack against French", "Scalp the French", "Kill the colonists"}
set A15 to (button returned of the result)
if A15 is "Command an attack against French" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#------TheLolQuestion-----
display dialog "____ is the name of the teacher who runs this class." buttons {"Mr.White", "Mr.John", "Paul Revere"} default button 1
set LOOL to (button returned of the result)
if LOOL is "Mr.White" then
do shell script "say -v samantha Congratulations…you…have…common…sense"
else
do shell script "say -v alex Do…you…have…eyes?"
#------END------
display dialog "I hope you enjoyed the quiz!" buttons {"I did!", "It was horrible"}
set endmenu to (button returned of the result)
if endmenu is "I did!" then
do shell script "say -v samantha Your awesome"
else
do shell script "say -v alex Go outside and run a lap"
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end ifUse code such as:
display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
set A1 to (button returned of the result)
if A1 is "Apprentices" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
return
end if
#----------Question 2--------
display dialog "Most children were taught to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
set A2 to (button returned of the result)
if A2 is "Bible" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
return
end if
(90444) -
I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?
For MS Visio (any version) only the appropriate version of Acrobat *PRO* provides PDFMaker for Visio.
For Visio 2013 specifically you must have Acrobat XI Pro (updated to at least 11.0.1).
See:
http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html
Be well... -
I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?
For MS Visio (any version) only the appropriate version of Acrobat *PRO* provides PDFMaker for Visio.
For Visio 2013 specifically you must have Acrobat XI Pro (updated to at least 11.0.1).
See:
http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html
Be well... -
Hi!!
I urgently need help with this:
When I compile this in Flex Builder 3 it says: The element type 'mx:Application' must be terminated by the matching end-tag '</mx:Application>'.
but I have this end tag in my file, but when I try to switch from source view to desgin view it says, that: >/mx:Script> expected to terminate element at line 71, this is right at the end of the .mxml file. I have actionscript(.as) file for scripting data.
This is the mxml code to terminate apllication tag which I did as you can see:
MXML code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#007200, #000200]" width="1024" height="768" applicationComplete="popolni_vse()">
<mx:HTTPService id="bazaMME" url="lokalnabaza/baza_MME_svn.xml" showBusyCursor="true" resultFormat="e4x"/>
<mx:Script source="dajzaj.as"/>
<mx:states>
<mx:State name="Galerije">
<mx:SetProperty target="{panel1}" name="title" value="Galerije MME"/>
<mx:SetProperty target="{panel2}" name="title" value="opis slik"/>
<mx:SetProperty target="{panel3}" name="title" value="Opis Galerije"/>
<mx:AddChild relativeTo="{panel1}" position="lastChild">
<mx:HorizontalList x="0" y="22" width="713.09863" height="157.39436" id="ListaslikGalerije"></mx:HorizontalList>
</mx:AddChild>
<mx:SetProperty target="{text1}" name="text" value="MME opisi galerij "/>
<mx:AddChild relativeTo="{panel1}" position="lastChild">
<mx:Label x="217" y="346" text="labela za test" id="izbr"/>
</mx:AddChild>
<mx:SetProperty target="{label1}" name="text" value="26. November 2009@08:06"/>
<mx:SetProperty target="{label1}" name="x" value="845"/>
<mx:SetProperty target="{label1}" name="width" value="169"/>
<mx:SetProperty target="{Gale}" name="text" value="plac za Galerije"/>
</mx:State>
<mx:State name="Projekti"/>
</mx:states>
<mx:MenuBar id="MMEMenu" labelField="@label" showRoot="true" fillAlphas="[1.0, 1.0]" fillColors="[#043D01, #000000]" color="#9EE499" x="8" y="24"
itemClick="dajVsebino(event)" width="1006.1268" height="21.90141">
<mx:XMLList id="MMEmenuModel">
<menuitem label="O nas">
<menuitem label="reference podjetja" name="refMME" type="check" groupName="one"/>
<menuitem label="reference direktor" name="refdir" type="check" groupName="one"/>
<menuitem label="Kontakt" name="podatMME" groupName="one" />
<menuitem label="Kje smo" name="lokaMME" type="check" groupName="one" />
</menuitem>
<menuitem type="separator"/>
<menuitem label="Galerija">
<menuitem label="Slovenija" name="galSvn" type="check" groupName="one"/>
<menuitem label="Nemčija" name="galDeu" type="check" groupName="one" />
</menuitem>
<menuitem type="separator"/>
<menuitem label="projekti">
<menuitem label="Slovenija" name="projSvn" type="check" groupName="one"/>
<menuitem label="Nemčija" name="projDeu" type="check" groupName="one" />
<menuitem label="Madžarska" name="projHun" type="check" groupName="one"/>
</menuitem>
</mx:XMLList>
</mx:MenuBar>
<mx:Label x="845" y="10" text="25. November 2009@08:21" color="#FFFFFF" width="169" height="18.02817" id="label1"/>
<mx:Label x="746" y="10" text="zadnja posodobitev:" color="#FFFFFF"/>
<mx:Panel x="9" y="57" width="743.02814" height="688.4507" layout="absolute" title="Plac za Vsebino" id="panel1">
<mx:Text x="0" y="-0.1" text="MME vsebina" width="722.95776" height="648.4507" id="Gale"/>
</mx:Panel>
<mx:Label x="197.25" y="748.45" color="#FFFFFF" text="Copyright © 2009 MME d.o.o." fontSize="12" width="228.73239" height="20"/>
<mx:Label x="463.35" y="748.45" text="izdelava spletnih strani: FACTUM d.o.o." color="#FBFDFD" fontSize="12" width="287.60565" height="20"/>
<mx:Panel x="759" y="53" width="250" height="705.07043" layout="absolute" title="Plac za hitre novice" id="panel3">
<mx:Text x="0" y="0" text="MME novice" width="230" height="665.07043" id="text1"/>
<mx:Panel x="-10" y="325.35" width="250" height="336.61972" layout="absolute" title="začasna panela" color="#000203" themeColor="#4BA247" cornerRadius="10" backgroundColor="#4B9539" id="panel2">
<mx:Label x="145" y="53" text="vrednost" id="spremmen"/>
<mx:Label x="125" y="78" text="Label"/>
<mx:Label x="125" y="103" text="Label"/>
<mx:Label x="0" y="53" text="spremenljivka iz Menuja:"/>
<mx:Label x="45" y="78" text="Label"/>
<mx:Label x="45" y="103" text="Label"/>
</mx:Panel>
</mx:Panel>
<mx:Label x="9.9" y="10" text="plac za naslov MME vsebine" id="MMEnaslov" color="#040000"/>
</mx:states></mx:Application>I know it's been a while but… did you fix this?
It looks to me like you are terminating the <mx:Application> tag at the top. The opening tag should end like this: resultFormat="e4x">, not resultFormat="e4x"/> (Remove the /).
Carlos -
Please I really need help with this video problem.
Hi!
Please I need help with this app I am trying to make for an Android cellphone and I've been struggling with this for a couple of months.
I have a main flash file (video player.fla) that will load external swf files. This is the main screen.When I click the Sets Anteriores button I want to open another swf file called sets.swf.The app is freezing when I click Sets Anteriores button
Here is the code for this fla file.
import flash.events.MouseEvent;
preloaderBar.visible = false;
var loader:Loader = new Loader();
btHome.enabled = false;
var filme : String = "";
carregaFilme("home.swf");
function carregaFilme(filme : String ) :void
var reqMovie:URLRequest = new URLRequest(filme);
loader.load(reqMovie);
loader.contentLoaderInfo.addEventListener(Event.OPEN,comeco);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,progresso);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completo);
palco.addChild(loader);
function comeco(event:Event):void
preloaderBar.visible = true;
preloaderBar.barra.scaleX = 0;
function progresso(e:ProgressEvent):void
var perc:Number = e.bytesLoaded / e.bytesTotal;
preloaderBar.percent.text = Math.ceil(perc*100).toString();
preloaderBar.barra.scaleX = perc;
function completo(e:Event):void
preloaderBar.percent.text = '';
preloaderBar.visible = false;
btHome.addEventListener(MouseEvent.MOUSE_DOWN,onHomeDown);
btHome.addEventListener(MouseEvent.MOUSE_UP,onHomeUp);
btSets.addEventListener(MouseEvent.MOUSE_DOWN,onSetsDown);
btSets.addEventListener(MouseEvent.MOUSE_UP,onSetsUp);
btVivo.addEventListener(MouseEvent.MOUSE_DOWN,onVivoDown);
btVivo.addEventListener(MouseEvent.MOUSE_UP,onVivoUp);
btHome.addEventListener(MouseEvent.CLICK,onHomeClick);
btSets.addEventListener(MouseEvent.CLICK,onSetsClick);
function onSetsClick(Event : MouseEvent) : void
if (filme != "sets.swf")
filme = "sets.swf";
carregaFilme("sets.swf");
function onHomeClick(Event : MouseEvent) : void
if (filme != "home.swf")
filme = "home.swf";
carregaFilme("home.swf");
function onHomeDown(Event : MouseEvent) : void
btHome.y += 1;
function onHomeUp(Event : MouseEvent) : void
btHome.y -= 1;
function onSetsDown(Event : MouseEvent) : void
btSets.y += 1;
function onSetsUp(Event : MouseEvent) : void
btSets.y -= 1;
function onVivoDown(Event : MouseEvent) : void
btVivo.y += 1;
function onVivoUp(Event : MouseEvent) : void
btVivo.y -= 1;
Now this is the sets.fla file:
Here is the code for sets.fla
import flash.utils.Timer;
import flash.events.TimerEvent;
var video:Video;
var nc:NetConnection;
var ns:NetStream;
var t : Timer = new Timer(1000,0);
var meta:Object = new Object();
this.addEventListener(Event.ADDED_TO_STAGE,init);
function init(e:Event):void{
video= new Video(320, 240);
addChild(video);
video.x = 80;
video.y = 100;
nc= new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
ns.bufferTime = 1;
ns.client = meta;
video.attachNetStream(ns);
ns.play("http://www.djchambinho.com/videos/segundaquinta.flv");
ns.pause();
t.addEventListener(TimerEvent.TIMER,timeHandler);
t.start();
function onStatusEvent(stat:Object):void
trace(stat.info.code);
meta.onMetaData = function(meta:Object)
trace(meta.duration);
function timeHandler(event : TimerEvent) : void
if (ns.bytesLoaded>0&&ns.bytesLoaded == ns.bytesTotal )
ns.resume();
t.removeEventListener(TimerEvent.TIMER,timeHandler);
t.stop();
The problem is when I test it on my computer it works but when I upload it to my phone it freezes when I click Sets Anteriores button.
Please help me with this problem I dont know what else to do.
thank youMy first guess is you're simply generating an error. You'll always want to load this on your device in quick debugging over USB so you can see any errors you're generating.
Outside that, if you plan on accessing anything inside the SWF you should be loading the SWF into the correct context. Relevant sample code:
var context:LoaderContext = new LoaderContext();
context.securityDomain = SecurityDomain.currentDomain;
context.applicationDomain = ApplicationDomain.currentDomain;
var urlReq:URLRequest = new URLRequest("http://www.[your_domain_here].com/library.swf");
var ldr:Loader = new Loader();
ldr.load(urlReq, context);
More information:
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7de0.html
If you're doing this on iOS you'll need to stripped SWFs if you plan on using any coding (ABC) inside the files. You mentioned iOS so I won't get into that here, but just incase, here's info on stripping external SWFs:
http://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air- apps-on-ios/ -
Please help! I am trying to change my Apple Id that used to be my mother to Mine- Every time i have it changed and i go and try and do an update it continues to ask for her old password. I really need help with this!
Phil0124 wrote:
Apps downloaded with an Apple ID are forever tied to that Apple ID and will always require it to update.
The only way around this is to delete the apps that require the other Apple ID and download them again with yours.
Or simply log out of iTunes & App stores then log in with updated AppleID.
Maybe you are looking for
-
Hey ive heard that the nike+ adapter falls out of the new nano easily, is this true does any body have any experience with the new nano and nike+?
-
Link DN with information coming from active directory
I have setup a Unified CM and IM/presence server. The Unified CM server is connected to LDAP active directory to authenticate the users that login via the Cisco Jabber Windows client. I have configured CSFdevices for each user and created a DN which
-
How to generate/get the selected PO
Hi to all Im doing a addon, were i need to get the selected po , example GRPO forms then press the copy button and choose the PO, then select the PO from the list i hope you could also show me the vb code to do this... Thanks Loren
-
Batch processing source/destination folder issues
Hi, I am trying to set up a batch process however when I try to select the source folder I am only presented with my Desktop and 1 subfolder on my desktop. I cannot select any other drives/folders. I am using CS3 on Vista Ultimate 64. My photos are s
-
PowerPC アプリケーションはサポートされなくなったため.アプリケーション"Adobe Photoshop CS5.1"を開けません.
OS X 10.8.2のPowerMacProにAdobe CS5.5 Web Premiumをインストールしたところ.Photoshopのみ「PowerPC アプリケーションはサポートされなくなったため.アプリケーション"Adobe Photoshop CS5.1"を開けません.」という表示がでて立ち上がりません.また.ソフトのアイコン自体にもスラッシュ(/)が表示されています.原因は何でしょうか?